From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 01:48:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1EDC106566C; Sun, 2 Sep 2012 01:48:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D7578FC15; Sun, 2 Sep 2012 01:48:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q821mlgL018012; Sun, 2 Sep 2012 01:48:47 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q821ml0M018010; Sun, 2 Sep 2012 01:48:47 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201209020148.q821ml0M018010@svn.freebsd.org> From: Andrew Turner Date: Sun, 2 Sep 2012 01:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 01:48:47 -0000 Author: andrew Date: Sun Sep 2 01:48:47 2012 New Revision: 239998 URL: http://svn.freebsd.org/changeset/base/239998 Log: Fix a logic inversion in an assert to allow us to use dts files that include other files. Modified: head/contrib/dtc/dtc-lexer.l Modified: head/contrib/dtc/dtc-lexer.l ============================================================================== --- head/contrib/dtc/dtc-lexer.l Sat Sep 1 23:33:49 2012 (r239997) +++ head/contrib/dtc/dtc-lexer.l Sun Sep 2 01:48:47 2012 (r239998) @@ -198,7 +198,7 @@ static void push_input_file(const char * { assert(filename); - assert(include_stack_pointer >= MAX_INCLUDE_NESTING); + assert(include_stack_pointer < MAX_INCLUDE_NESTING); srcfile_push(filename); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 03:36:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB828106566B; Sun, 2 Sep 2012 03:36:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFAD8FC0A; Sun, 2 Sep 2012 03:36:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q823aw2F031548; Sun, 2 Sep 2012 03:36:58 GMT (envelope-from avatar@svn.freebsd.org) Received: (from avatar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q823awhq031546; Sun, 2 Sep 2012 03:36:58 GMT (envelope-from avatar@svn.freebsd.org) Message-Id: <201209020336.q823awhq031546@svn.freebsd.org> From: Tai-hwa Liang Date: Sun, 2 Sep 2012 03:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239999 - stable/9/sys/gnu/fs/reiserfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 03:36:58 -0000 Author: avatar Date: Sun Sep 2 03:36:57 2012 New Revision: 239999 URL: http://svn.freebsd.org/changeset/base/239999 Log: MFC r238980: Just like the other file systems found in /sys/fs, g_vfs_open() should be paried with g_vfs_close(). Though g_vfs_close() is a wrapper around g_wither_geom_close(), r206130 added the following test in g_vfs_open(): if (bo->bo_private != vp) return (EBUSY); Which will cause a 'Device busy' error inside reiserfs_mountfs() if the same file system is re-mounted again after umount or mounting failure: (case 1, /dev/ad4s3 is not a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Invalid argument # mount -t msdosfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy (case 2, /dev/ad4s3 is a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt # umount /mnt # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy On the other hand, g_vfs_close() 'fixed' the above cases by doing an extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers synchronised. Reviewed by: kib Modified: stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sun Sep 2 01:48:47 2012 (r239998) +++ stable/9/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sun Sep 2 03:36:57 2012 (r239999) @@ -227,7 +227,7 @@ reiserfs_unmount(struct mount *mp, int m DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(rmp->rm_cp->geom, ENXIO); + g_vfs_close(rmp->rm_cp); g_topology_unlock(); PICKUP_GIANT(); vrele(rmp->rm_devvp); @@ -611,7 +611,7 @@ out: if (cp != NULL) { DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(cp->geom, ENXIO); + g_vfs_close(cp); g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 04:39:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C00B9106564A; Sun, 2 Sep 2012 04:39:07 +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 A151F8FC0C; Sun, 2 Sep 2012 04:39:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q824d7Xd038775; Sun, 2 Sep 2012 04:39:07 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q824d7Rg038773; Sun, 2 Sep 2012 04:39:07 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209020439.q824d7Rg038773@svn.freebsd.org> From: Alan Cox Date: Sun, 2 Sep 2012 04:39: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: r240000 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 04:39:07 -0000 Author: alc Date: Sun Sep 2 04:39:07 2012 New Revision: 240000 URL: http://svn.freebsd.org/changeset/base/240000 Log: Calculate the new PTE value in pmap_enter() before acquiring any locks. Move an assertion to the beginning of pmap_enter(). Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sun Sep 2 03:36:57 2012 (r239999) +++ head/sys/mips/mips/pmap.c Sun Sep 2 04:39:07 2012 (r240000) @@ -1969,14 +1969,24 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pt_entry_t origpte, newpte; pv_entry_t pv; vm_page_t mpte, om; - pt_entry_t rw; va &= ~PAGE_MASK; KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || + va >= kmi.clean_eva, + ("pmap_enter: managed mapping within the clean submap")); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0, ("pmap_enter: page %p is not busy", m)); pa = VM_PAGE_TO_PHYS(m); - newpte = TLBLO_PA_TO_PFN(pa) | PTE_V; + newpte = TLBLO_PA_TO_PFN(pa) | init_pte_prot(m, access, prot); + if (wired) + newpte |= PTE_W; + if (is_kernel_pmap(pmap)) + newpte |= PTE_G; + if (is_cacheable_mem(pa)) + newpte |= PTE_C_CACHE; + else + newpte |= PTE_C_UNCACHED; mpte = NULL; @@ -2031,6 +2041,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, if (pte_test(&origpte, PTE_MANAGED)) { om = m; newpte |= PTE_MANAGED; + if (!pte_test(&newpte, PTE_RO)) + vm_page_aflag_set(m, PGA_WRITEABLE); } goto validate; } @@ -2059,18 +2071,16 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap->pm_stats.resident_count++; /* - * Enter on the PV list if part of our managed memory. Note that we - * raise IPL while manipulating pv_table since pmap_enter can be - * called at interrupt time. + * Enter on the PV list if part of our managed memory. */ if ((m->oflags & VPO_UNMANAGED) == 0) { - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, - ("pmap_enter: managed mapping within the clean submap")); if (pv == NULL) pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); newpte |= PTE_MANAGED; + if (!pte_test(&newpte, PTE_RO)) + vm_page_aflag_set(m, PGA_WRITEABLE); } else if (pv != NULL) free_pv_entry(pmap, pv); @@ -2083,26 +2093,10 @@ pmap_enter(pmap_t pmap, vm_offset_t va, validate: if ((access & VM_PROT_WRITE) != 0) m->md.pv_flags |= PV_TABLE_REF; - rw = init_pte_prot(m, access, prot); #ifdef PMAP_DEBUG printf("pmap_enter: va: %p -> pa: %p\n", (void *)va, (void *)pa); #endif - /* - * Now validate mapping with desired protection/wiring. - */ - newpte |= rw; - - if (is_cacheable_mem(pa)) - newpte |= PTE_C_CACHE; - else - newpte |= PTE_C_UNCACHED; - - if (wired) - newpte |= PTE_W; - - if (is_kernel_pmap(pmap)) - newpte |= PTE_G; /* * if the mapping or permission bits are different, we need to @@ -3248,7 +3242,6 @@ init_pte_prot(vm_page_t m, vm_prot_t acc rw = PTE_V | PTE_D; else rw = PTE_V; - vm_page_aflag_set(m, PGA_WRITEABLE); } else /* Needn't emulate a modified bit for unmanaged pages. */ rw = PTE_V | PTE_D; From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 04:56:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 732CE106566C; Sun, 2 Sep 2012 04:56:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44AFC8FC0A; Sun, 2 Sep 2012 04:56:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q824uT5T041042; Sun, 2 Sep 2012 04:56:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q824uTdv041040; Sun, 2 Sep 2012 04:56:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209020456.q824uTdv041040@svn.freebsd.org> From: Adrian Chadd Date: Sun, 2 Sep 2012 04:56: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: r240001 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 04:56:30 -0000 Author: adrian Date: Sun Sep 2 04:56:29 2012 New Revision: 240001 URL: http://svn.freebsd.org/changeset/base/240001 Log: AR5212 radar pulse fixes. Fix the strong signal diversity capability setting - I had totally messed up the indentation. Set the default values to match what's in the .ini for now, rather than what values I had previously gleaned from places. This seems to work quite well for the early AR5212 NICs I have. Of course, later NICs have different PHYs and the radar configuration is very card/board dependent.. Tested: * ath1: AR5212 mac 5.3 RF5111 phy 4.1 ath1: 2GHz radio: 0x0023; 5GHz radio: 0x0017 This detects 1, 5, 25, 50, 75, 100uS pulses reliably (with no interference.) However, 10uS pulses don't detect reliably. That may be around the transition between short and long pulses so some further tuning may improve things. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Sep 2 04:39:07 2012 (r240000) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Sep 2 04:56:29 2012 (r240001) @@ -960,13 +960,13 @@ ar5212SetCapability(struct ath_hal *ah, case 1: /* setting */ if (ahp->ah_phyPowerOn) { if (capability == HAL_CAP_STRONG_DIV) { - } - v = OS_REG_READ(ah, AR_PHY_CCK_DETECT); - if (setting) - v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - else - v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, v); + v = OS_REG_READ(ah, AR_PHY_CCK_DETECT); + if (setting) + v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; + else + v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; + OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, v); + } } ahp->ah_diversity = (setting != 0); return AH_TRUE; @@ -1243,11 +1243,11 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_ /* * Parameters for the AR5212 PHY. */ -#define AR5212_DFS_FIRPWR -41 -#define AR5212_DFS_RRSSI 12 -#define AR5212_DFS_HEIGHT 20 -#define AR5212_DFS_PRSSI 22 -#define AR5212_DFS_INBAND 6 +#define AR5212_DFS_FIRPWR -35 +#define AR5212_DFS_RRSSI 20 +#define AR5212_DFS_HEIGHT 14 +#define AR5212_DFS_PRSSI 6 +#define AR5212_DFS_INBAND 4 /* * Default parameters for the AR5413 PHY. @@ -1261,7 +1261,6 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_ #define AR5413_DFS_RELSTEP 31 #define AR5413_DFS_MAXLEN 255 - HAL_BOOL ar5212GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) { From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 05:01:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8917106564A; Sun, 2 Sep 2012 05:01:10 +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 D42168FC0C; Sun, 2 Sep 2012 05:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8251A17041650; Sun, 2 Sep 2012 05:01:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8251ARi041648; Sun, 2 Sep 2012 05:01:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209020501.q8251ARi041648@svn.freebsd.org> From: Adrian Chadd Date: Sun, 2 Sep 2012 05:01: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: r240002 - head/sys/dev/ath/ath_dfs/null X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 05:01:11 -0000 Author: adrian Date: Sun Sep 2 05:01:10 2012 New Revision: 240002 URL: http://svn.freebsd.org/changeset/base/240002 Log: Disable strong signal diversity when enabling radar pulse detection for the AR5212 era NICs. Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Sep 2 04:56:29 2012 (r240001) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Sep 2 05:01:10 2012 (r240002) @@ -132,6 +132,13 @@ ath_dfs_radar_enable(struct ath_softc *s ath_hal_enabledfs(sc->sc_ah, &pe); + /* + * Disable strong signal fast diversity - needed for + * AR5212 and similar PHYs for reliable short pulse + * duration. + */ + (void) ath_hal_setcapability(sc->sc_ah, HAL_CAP_DIVERSITY, 2, 0, NULL); + return (1); #else return (0); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 07:07:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id CFC4F106564A; Sun, 2 Sep 2012 07:07:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id A55F614DED5; Sun, 2 Sep 2012 07:07:22 +0000 (UTC) Message-ID: <504305AA.3060902@FreeBSD.org> Date: Sun, 02 Sep 2012 00:07:22 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <201208302256.q7UMuWE7027494@svn.freebsd.org> <504005E1.7040602@FreeBSD.org> <868vcuzprb.fsf@ds4.des.no> In-Reply-To: <868vcuzprb.fsf@ds4.des.no> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239927 - head/tools/tools/track X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 07:07:22 -0000 On 08/31/2012 14:59, Dag-Erling Smørgrav wrote: > Doug Barton writes: >> Dag-Erling Smørgrav writes: >>> - \*\*\*\ Error*) >>> + \*\*\**) >> Are you sure that the double ** is necessary here? > > Yes, error messages generally include text in addition to the initial > three asterisks. D'oh. Misread the diff, sorry. -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 07:29:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A83106564A; Sun, 2 Sep 2012 07:29:38 +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 2D0AB8FC0A; Sun, 2 Sep 2012 07:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q827TcdK059838; Sun, 2 Sep 2012 07:29:38 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q827Tb6s059835; Sun, 2 Sep 2012 07:29:37 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209020729.q827Tb6s059835@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 2 Sep 2012 07:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240003 - 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, 02 Sep 2012 07:29:38 -0000 Author: trociny Date: Sun Sep 2 07:29:37 2012 New Revision: 240003 URL: http://svn.freebsd.org/changeset/base/240003 Log: In soreceive_generic() when checking if the type of mbuf has changed check it for MT_CONTROL type too, otherwise the assertion "m->m_type == MT_DATA" below may be triggered by the following scenario: - the sender sends some data (MT_DATA) and then a file descriptor (MT_CONTROL); - the receiver calls recv(2) with a MSG_WAITALL asking for data larger than the receive buffer (uio_resid > hiwat). MFC after: 2 week Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Sep 2 05:01:10 2012 (r240002) +++ head/sys/kern/uipc_socket.c Sun Sep 2 07:29:37 2012 (r240003) @@ -1695,8 +1695,8 @@ dontblock: * examined ('type'), end the receive operation. */ SOCKBUF_LOCK_ASSERT(&so->so_rcv); - if (m->m_type == MT_OOBDATA) { - if (type != MT_OOBDATA) + if (m->m_type == MT_OOBDATA || m->m_type == MT_CONTROL) { + if (type != m->m_type) break; } else if (type == MT_OOBDATA) break; From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 07:33:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8328106566C; Sun, 2 Sep 2012 07:33:52 +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 9A4978FC19; Sun, 2 Sep 2012 07:33:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q827Xqdl060454; Sun, 2 Sep 2012 07:33:52 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q827Xq3e060452; Sun, 2 Sep 2012 07:33:52 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209020733.q827Xq3e060452@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 2 Sep 2012 07:33: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: r240004 - 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, 02 Sep 2012 07:33:52 -0000 Author: trociny Date: Sun Sep 2 07:33:52 2012 New Revision: 240004 URL: http://svn.freebsd.org/changeset/base/240004 Log: In soreceive_generic() remove the optimization for the case when MSG_WAITALL is set, and it is possible to do the entire receive operation at once if we block (resid <= hiwat). Actually it might make the recv(2) with MSG_WAITALL flag get stuck when there is enough space in the receiver buffer to satisfy the request but not enough to open the window closed previously due to the buffer being full. The issue can be reproduced using the following scenario: On the sender side do 2 send(2) requests: 1) data of size much smaller than SOBUF_SIZE (e.g. SOBUF_SIZE / 10); 2) data of size equal to SOBUF_SIZE. On the receiver side do 2 recv(2) requests with MSG_WAITALL flag set: 1) recv() data of SOBUF_SIZE / 10 size; 2) recv() data of SOBUF_SIZE size; We totally fill the receiver buffer with one SOBUF_SIZE/10 size request and partial SOBUF_SIZE request. When the first request is processed we get SOBUF_SIZE/10 free space. It is just enough to receive the rest of bytes for the second request, and soreceive_generic() blocks in the part that is a subject of this change waiting for the rest. But the window was closed when the buffer was filled and to avoid silly window syndrome it opens only when available space is larger than sb_hiwat/4 or maxseg. So it is stuck and pending data is only sent via TCP window probes. Discussed with: kib (long ago) MFC after: 2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Sep 2 07:29:37 2012 (r240003) +++ head/sys/kern/uipc_socket.c Sun Sep 2 07:33:52 2012 (r240004) @@ -1496,17 +1496,11 @@ restart: * If we have less data than requested, block awaiting more (subject * to any timeout) if: * 1. the current count is less than the low water mark, or - * 2. MSG_WAITALL is set, and it is possible to do the entire - * receive operation at once if we block (resid <= hiwat). - * 3. MSG_DONTWAIT is not set - * If MSG_WAITALL is set but resid is larger than the receive buffer, - * we have to do the receive in sections, and thus risk returning a - * short count if a timeout or signal occurs after we start. + * 2. MSG_DONTWAIT is not set */ if (m == NULL || (((flags & MSG_DONTWAIT) == 0 && so->so_rcv.sb_cc < uio->uio_resid) && - (so->so_rcv.sb_cc < so->so_rcv.sb_lowat || - ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat)) && + so->so_rcv.sb_cc < so->so_rcv.sb_lowat && m->m_nextpkt == NULL && (pr->pr_flags & PR_ATOMIC) == 0)) { KASSERT(m != NULL || !so->so_rcv.sb_cc, ("receive: m == %p so->so_rcv.sb_cc == %u", From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 11:03:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7761106564A; Sun, 2 Sep 2012 11:03:19 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846978FC15; Sun, 2 Sep 2012 11:03:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82B3Jrk089688; Sun, 2 Sep 2012 11:03:19 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82B3JT6089683; Sun, 2 Sep 2012 11:03:19 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209021103.q82B3JT6089683@svn.freebsd.org> From: Andrey Zonov Date: Sun, 2 Sep 2012 11:03: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: r240005 - head/usr.bin/truss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 11:03:20 -0000 Author: zont Date: Sun Sep 2 11:03:18 2012 New Revision: 240005 URL: http://svn.freebsd.org/changeset/base/240005 Log: - Style(9) cleanup. Approved by: kib (mentor) Modified: head/usr.bin/truss/amd64-fbsd.c head/usr.bin/truss/amd64-fbsd32.c head/usr.bin/truss/amd64-linux32.c head/usr.bin/truss/i386-fbsd.c head/usr.bin/truss/i386-linux.c head/usr.bin/truss/ia64-fbsd.c head/usr.bin/truss/main.c head/usr.bin/truss/mips-fbsd.c head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/truss/powerpc64-fbsd.c head/usr.bin/truss/setup.c head/usr.bin/truss/sparc64-fbsd.c head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c head/usr.bin/truss/truss.h Modified: head/usr.bin/truss/amd64-fbsd.c ============================================================================== --- head/usr.bin/truss/amd64-fbsd.c Sun Sep 2 07:33:52 2012 (r240004) +++ head/usr.bin/truss/amd64-fbsd.c Sun Sep 2 11:03:18 2012 (r240005) @@ -88,18 +88,19 @@ static struct freebsd_syscall { /* Clear up and free parts of the fsc structure. */ static __inline void -clear_fsc(void) { - if (fsc.args) { - free(fsc.args); - } - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +clear_fsc(void) +{ + int i; + + if (fsc.args) + free(fsc.args); + if (fsc.s_args) { + for (i = 0; i < fsc.nargs; i++) + if (fsc.s_args[i]) + free(fsc.s_args[i]); + free(fsc.s_args); + } + memset(&fsc, 0, sizeof(fsc)); } /* @@ -110,147 +111,145 @@ clear_fsc(void) { */ void -amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) { - struct reg regs; - int syscall_num; - int i, reg; - struct syscall *sc; - - cpid = trussinfo->curthread->tid; - - clear_fsc(); - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - - /* - * FreeBSD has two special kinds of system call redirctions -- - * SYS_syscall, and SYS___syscall. The former is the old syscall() - * routine, basically; the latter is for quad-aligned arguments. - */ - reg = 0; - syscall_num = regs.r_rax; - switch (syscall_num) { - case SYS_syscall: - case SYS___syscall: - syscall_num = regs.r_rdi; - reg++; - break; - } - - fsc.number = syscall_num; - fsc.name = - (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; - if (!fsc.name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); - } - - if (fsc.name && (trussinfo->flags & FOLLOWFORKS) - && ((!strcmp(fsc.name, "fork") - || !strcmp(fsc.name, "rfork") - || !strcmp(fsc.name, "vfork")))) - { - trussinfo->curthread->in_fork = 1; - } - - if (nargs == 0) - return; - - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs && reg < 6; i++, reg++) { - switch (reg) { - case 0: fsc.args[i] = regs.r_rdi; break; - case 1: fsc.args[i] = regs.r_rsi; break; - case 2: fsc.args[i] = regs.r_rdx; break; - case 3: fsc.args[i] = regs.r_rcx; break; - case 4: fsc.args[i] = regs.r_r8; break; - case 5: fsc.args[i] = regs.r_r9; break; - } - } - if (nargs > i) { - struct ptrace_io_desc iorequest; - iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)(regs.r_rsp + sizeof(register_t)); - iorequest.piod_addr = &fsc.args[i]; - iorequest.piod_len = (nargs - i) * sizeof(register_t); - ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); - if (iorequest.piod_len == 0) - return; - } - - sc = get_syscall(fsc.name); - if (sc) { - fsc.nargs = sc->nargs; - } else { +amd64_syscall_entry(struct trussinfo *trussinfo, int nargs) +{ + struct ptrace_io_desc iorequest; + struct reg regs; + struct syscall *sc; + int i, reg, syscall_num; + + clear_fsc(); + + cpid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return; + } + + /* + * FreeBSD has two special kinds of system call redirctions -- + * SYS_syscall, and SYS___syscall. The former is the old syscall() + * routine, basically; the latter is for quad-aligned arguments. + */ + reg = 0; + syscall_num = regs.r_rax; + switch (syscall_num) { + case SYS_syscall: + case SYS___syscall: + syscall_num = regs.r_rdi; + reg++; + break; + } + + fsc.number = syscall_num; + fsc.name = (syscall_num < 0 || syscall_num >= nsyscalls) ? + NULL : syscallnames[syscall_num]; + if (!fsc.name) { + fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", + syscall_num); + } + + if (fsc.name && (trussinfo->flags & FOLLOWFORKS) && + (strcmp(fsc.name, "fork") == 0 || + strcmp(fsc.name, "rfork") == 0|| + strcmp(fsc.name, "vfork") == 0)) + trussinfo->curthread->in_fork = 1; + + if (nargs == 0) + return; + + fsc.args = malloc((1 + nargs) * sizeof(unsigned long)); + for (i = 0; i < nargs && reg < 6; i++, reg++) { + switch (reg) { + case 0: fsc.args[i] = regs.r_rdi; break; + case 1: fsc.args[i] = regs.r_rsi; break; + case 2: fsc.args[i] = regs.r_rdx; break; + case 3: fsc.args[i] = regs.r_rcx; break; + case 4: fsc.args[i] = regs.r_r8; break; + case 5: fsc.args[i] = regs.r_r9; break; + } + } + if (nargs > i) { + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)(regs.r_rsp + sizeof(register_t)); + iorequest.piod_addr = &fsc.args[i]; + iorequest.piod_len = (nargs - i) * sizeof(register_t); + ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); + if (iorequest.piod_len == 0) + return; + } + + sc = get_syscall(fsc.name); + if (sc) + fsc.nargs = sc->nargs; + else { #if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting args to %d\n", - fsc.name, nargs); + fprintf(trussinfo->outfile, "unknown syscall %s -- setting " + "args to %d\n", fsc.name, nargs); #endif - fsc.nargs = nargs; - } - - fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*)); - fsc.sc = sc; + fsc.nargs = nargs; + } - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ + fsc.s_args = calloc(1, (1 + fsc.nargs) * sizeof(char *)); + fsc.sc = sc; - if (fsc.name) { + /* + * At this point, we set up the system call arguments. + * We ignore any OUT ones, however -- those are arguments that + * are set by the system call, and so are probably meaningless + * now. This doesn't currently support arguments that are + * passed in *and* out, however. + */ + if (fsc.name) { #if DEBUG - fprintf(stderr, "syscall %s(", fsc.name); + fprintf(stderr, "syscall %s(", fsc.name); #endif - for (i = 0; i < fsc.nargs; i++) { + for (i = 0; i < fsc.nargs; i++) { #if DEBUG - fprintf(stderr, "0x%lx%s", - sc - ? fsc.args[sc->args[i].offset] - : fsc.args[i], - i < (fsc.nargs - 1) ? "," : ""); + fprintf(stderr, "0x%lx%s", sc ? + fsc.args[sc->args[i].offset] : fsc.args[i], + i < (fsc.nargs - 1) ? "," : ""); #endif - if (sc && !(sc->args[i].type & OUT)) { - fsc.s_args[i] = print_arg(&sc->args[i], fsc.args, 0, trussinfo); - } - } + if (sc && !(sc->args[i].type & OUT)) { + fsc.s_args[i] = print_arg(&sc->args[i], + fsc.args, 0, trussinfo); + } + } #if DEBUG - fprintf(stderr, ")\n"); + fprintf(stderr, ")\n"); #endif - } + } #if DEBUG - fprintf(trussinfo->outfile, "\n"); + fprintf(trussinfo->outfile, "\n"); #endif - if (fsc.name != NULL && - (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { + if (fsc.name != NULL && (strcmp(fsc.name, "execve") == 0 || + strcmp(fsc.name, "exit") == 0)) { + /* + * XXX + * This could be done in a more general + * manner but it still wouldn't be very pretty. + */ + if (strcmp(fsc.name, "execve") == 0) { + if ((trussinfo->flags & EXECVEARGS) == 0) { + if (fsc.s_args[1]) { + free(fsc.s_args[1]); + fsc.s_args[1] = NULL; + } + } + if ((trussinfo->flags & EXECVEENVS) == 0) { + if (fsc.s_args[2]) { + free(fsc.s_args[2]); + fsc.s_args[2] = NULL; + } + } + } + } - /* XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (!strcmp(fsc.name, "execve")) { - if ((trussinfo->flags & EXECVEARGS) == 0) - if (fsc.s_args[1]) { - free(fsc.s_args[1]); - fsc.s_args[1] = NULL; - } - if ((trussinfo->flags & EXECVEENVS) == 0) - if (fsc.s_args[2]) { - free(fsc.s_args[2]); - fsc.s_args[2] = NULL; - } - } - - } - - return; + return; } /* @@ -263,68 +262,69 @@ amd64_syscall_entry(struct trussinfo *tr long amd64_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) { - struct reg regs; - long retval; - int i; - int errorp; - struct syscall *sc; - - if (fsc.name == NULL) - return (-1); - - cpid = trussinfo->curthread->tid; - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return (-1); - } - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - sc = fsc.sc; - if (!sc) { - for (i = 0; i < fsc.nargs; i++) - asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { + struct reg regs; + struct syscall *sc; + long retval; + int errorp, i; + + if (fsc.name == NULL) + return (-1); + + cpid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return (-1); + } + + retval = regs.r_rax; + errorp = !!(regs.r_rflags & PSL_C); + /* - * If an error occurred, than don't bothe getting the data; - * it may not be valid. + * This code, while simpler than the initial versions I used, could + * stand some significant cleaning. */ - if (errorp) - asprintf(&temp, "0x%lx", fsc.args[sc->args[i].offset]); - else - temp = print_arg(&sc->args[i], fsc.args, retval, trussinfo); - fsc.s_args[i] = temp; - } - } - } - - if (fsc.name != NULL && - (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { - trussinfo->curthread->in_syscall = 1; - } - - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ - - print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, - retval, fsc.sc); - clear_fsc(); - return (retval); + sc = fsc.sc; + if (!sc) { + for (i = 0; i < fsc.nargs; i++) + asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); + } else { + /* + * Here, we only look for arguments that have OUT masked in -- + * otherwise, they were handled in the syscall_entry function. + */ + for (i = 0; i < sc->nargs; i++) { + char *temp; + if (sc->args[i].type & OUT) { + /* + * If an error occurred, then don't bother + * getting the data; it may not be valid. + */ + if (errorp) { + asprintf(&temp, "0x%lx", + fsc.args[sc->args[i].offset]); + } else { + temp = print_arg(&sc->args[i], + fsc.args, retval, trussinfo); + } + fsc.s_args[i] = temp; + } + } + } + + if (fsc.name != NULL && (strcmp(fsc.name, "execve") == 0 || + strcmp(fsc.name, "exit") == 0)) + trussinfo->curthread->in_syscall = 1; + + /* + * It would probably be a good idea to merge the error handling, + * but that complicates things considerably. + */ + + print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, + retval, fsc.sc); + clear_fsc(); + + return (retval); } Modified: head/usr.bin/truss/amd64-fbsd32.c ============================================================================== --- head/usr.bin/truss/amd64-fbsd32.c Sun Sep 2 07:33:52 2012 (r240004) +++ head/usr.bin/truss/amd64-fbsd32.c Sun Sep 2 11:03:18 2012 (r240005) @@ -43,8 +43,8 @@ static const char rcsid[] = */ #include -#include #include +#include #include #include @@ -90,21 +90,21 @@ static struct freebsd32_syscall { /* Clear up and free parts of the fsc structure. */ static __inline void -clear_fsc(void) { - if (fsc.args) { - free(fsc.args); - } - if (fsc.args32) { - free(fsc.args32); - } - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +clear_fsc(void) +{ + int i; + + if (fsc.args) + free(fsc.args); + if (fsc.args32) + free(fsc.args32); + if (fsc.s_args) { + for (i = 0; i < fsc.nargs; i++) + if (fsc.s_args[i]) + free(fsc.s_args[i]); + free(fsc.s_args); + } + memset(&fsc, 0, sizeof(fsc)); } /* @@ -115,145 +115,143 @@ clear_fsc(void) { */ void -amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) { - struct reg regs; - int syscall_num; - int i; - unsigned long parm_offset; - struct syscall *sc = NULL; - struct ptrace_io_desc iorequest; - cpid = trussinfo->curthread->tid; - - clear_fsc(); - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - parm_offset = regs.r_rsp + sizeof(int); - - /* - * FreeBSD has two special kinds of system call redirctions -- - * SYS_syscall, and SYS___syscall. The former is the old syscall() - * routine, basically; the latter is for quad-aligned arguments. - */ - syscall_num = regs.r_rax; - switch (syscall_num) { - case SYS_syscall: - syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); - parm_offset += sizeof(int); - break; - case SYS___syscall: - syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); - parm_offset += sizeof(quad_t); - break; - } - - fsc.number = syscall_num; - fsc.name = - (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : - freebsd32_syscallnames[syscall_num]; - if (!fsc.name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); - } - - if (fsc.name && (trussinfo->flags & FOLLOWFORKS) - && ((!strcmp(fsc.name, "fork") - || !strcmp(fsc.name, "rfork") - || !strcmp(fsc.name, "vfork")))) - { - trussinfo->curthread->in_fork = 1; - } - - if (nargs == 0) - return; - - fsc.args32 = malloc((1+nargs) * sizeof(unsigned int)); - iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)parm_offset; - iorequest.piod_addr = fsc.args32; - iorequest.piod_len = (1+nargs) * sizeof(unsigned int); - ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); - if (iorequest.piod_len == 0) - return; - - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); - for (i = 0; i < nargs + 1; i++) - fsc.args[i] = fsc.args32[i]; - - if (fsc.name) - sc = get_syscall(fsc.name); - if (sc) { - fsc.nargs = sc->nargs; - } else { +amd64_fbsd32_syscall_entry(struct trussinfo *trussinfo, int nargs) +{ + struct ptrace_io_desc iorequest; + struct reg regs; + struct syscall *sc; + unsigned long parm_offset; + int i, syscall_num; + + clear_fsc(); + + cpid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return; + } + parm_offset = regs.r_rsp + sizeof(int); + + /* + * FreeBSD has two special kinds of system call redirctions -- + * SYS_syscall, and SYS___syscall. The former is the old syscall() + * routine, basically; the latter is for quad-aligned arguments. + */ + syscall_num = regs.r_rax; + switch (syscall_num) { + case SYS_syscall: + syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); + parm_offset += sizeof(int); + break; + case SYS___syscall: + syscall_num = ptrace(PT_READ_D, cpid, (caddr_t)parm_offset, 0); + parm_offset += sizeof(quad_t); + break; + } + + fsc.number = syscall_num; + fsc.name = (syscall_num < 0 || syscall_num >= nsyscalls) ? + NULL : freebsd32_syscallnames[syscall_num]; + if (!fsc.name) { + fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", + syscall_num); + } + + if (fsc.name && (trussinfo->flags & FOLLOWFORKS) && + (strcmp(fsc.name, "fork") == 0 || + strcmp(fsc.name, "rfork") == 0|| + strcmp(fsc.name, "vfork") == 0)) + trussinfo->curthread->in_fork = 1; + + if (nargs == 0) + return; + + fsc.args32 = malloc((1 + nargs) * sizeof(unsigned int)); + iorequest.piod_op = PIOD_READ_D; + iorequest.piod_offs = (void *)parm_offset; + iorequest.piod_addr = fsc.args32; + iorequest.piod_len = (1 + nargs) * sizeof(unsigned int); + ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); + if (iorequest.piod_len == 0) + return; + + fsc.args = malloc((1 + nargs) * sizeof(unsigned long)); + for (i = 0; i < nargs + 1; i++) + fsc.args[i] = fsc.args32[i]; + + sc = NULL; + if (fsc.name) + sc = get_syscall(fsc.name); + if (sc) + fsc.nargs = sc->nargs; + else { #if DEBUG - fprintf(trussinfo->outfile, "unknown syscall %s -- setting args to %d\n", - fsc.name, nargs); + fprintf(trussinfo->outfile, "unknown syscall %s -- setting " + "args to %d\n", fsc.name, nargs); #endif - fsc.nargs = nargs; - } - - fsc.s_args = calloc(1, (1+fsc.nargs) * sizeof(char*)); - fsc.sc = sc; + fsc.nargs = nargs; + } - /* - * At this point, we set up the system call arguments. - * We ignore any OUT ones, however -- those are arguments that - * are set by the system call, and so are probably meaningless - * now. This doesn't currently support arguments that are - * passed in *and* out, however. - */ + fsc.s_args = calloc(1, (1 + fsc.nargs) * sizeof(char *)); + fsc.sc = sc; - if (fsc.name) { + /* + * At this point, we set up the system call arguments. + * We ignore any OUT ones, however -- those are arguments that + * are set by the system call, and so are probably meaningless + * now. This doesn't currently support arguments that are + * passed in *and* out, however. + */ + if (fsc.name) { #if DEBUG - fprintf(stderr, "syscall %s(", fsc.name); + fprintf(stderr, "syscall %s(", fsc.name); #endif - for (i = 0; i < fsc.nargs; i++) { + for (i = 0; i < fsc.nargs; i++) { #if DEBUG - fprintf(stderr, "0x%x%s", - sc - ? fsc.args[sc->args[i].offset] - : fsc.args[i], - i < (fsc.nargs - 1) ? "," : ""); + fprintf(stderr, "0x%x%s", sc ? + fsc.args[sc->args[i].offset] : fsc.args[i], + i < (fsc.nargs - 1) ? "," : ""); #endif - if (sc && !(sc->args[i].type & OUT)) { - fsc.s_args[i] = print_arg(&sc->args[i], fsc.args, 0, trussinfo); - } - } + if (sc && !(sc->args[i].type & OUT)) { + fsc.s_args[i] = print_arg(&sc->args[i], + fsc.args, 0, trussinfo); + } + } #if DEBUG - fprintf(stderr, ")\n"); + fprintf(stderr, ")\n"); #endif - } + } #if DEBUG - fprintf(trussinfo->outfile, "\n"); + fprintf(trussinfo->outfile, "\n"); #endif - if (fsc.name != NULL && - (!strcmp(fsc.name, "freebsd32_execve") || !strcmp(fsc.name, "exit"))) { - - /* XXX - * This could be done in a more general - * manner but it still wouldn't be very pretty. - */ - if (!strcmp(fsc.name, "freebsd32_execve")) { - if ((trussinfo->flags & EXECVEARGS) == 0) - if (fsc.s_args[1]) { - free(fsc.s_args[1]); - fsc.s_args[1] = NULL; - } - if ((trussinfo->flags & EXECVEENVS) == 0) - if (fsc.s_args[2]) { - free(fsc.s_args[2]); - fsc.s_args[2] = NULL; - } - } + if (fsc.name != NULL && (strcmp(fsc.name, "freebsd32_execve") == 0|| + strcmp(fsc.name, "exit") == 0)) { + /* + * XXX + * This could be done in a more general + * manner but it still wouldn't be very pretty. + */ + if (strcmp(fsc.name, "freebsd32_execve") == 0) { + if ((trussinfo->flags & EXECVEARGS) == 0) { + if (fsc.s_args[1]) { + free(fsc.s_args[1]); + fsc.s_args[1] = NULL; + } + } + if ((trussinfo->flags & EXECVEENVS) == 0) { + if (fsc.s_args[2]) { + free(fsc.s_args[2]); + fsc.s_args[2] = NULL; + } + } + } + } - } - - return; + return; } /* @@ -266,68 +264,69 @@ amd64_fbsd32_syscall_entry(struct trussi long amd64_fbsd32_syscall_exit(struct trussinfo *trussinfo, int syscall_num __unused) { - struct reg regs; - long retval; - int i; - int errorp; - struct syscall *sc; - - if (fsc.name == NULL) - return (-1); - cpid = trussinfo->curthread->tid; - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return (-1); - } - - retval = regs.r_rax; - errorp = !!(regs.r_rflags & PSL_C); - - /* - * This code, while simpler than the initial versions I used, could - * stand some significant cleaning. - */ - - sc = fsc.sc; - if (!sc) { - for (i = 0; i < fsc.nargs; i++) - asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); - } else { - /* - * Here, we only look for arguments that have OUT masked in -- - * otherwise, they were handled in the syscall_entry function. - */ - for (i = 0; i < sc->nargs; i++) { - char *temp; - if (sc->args[i].type & OUT) { + struct reg regs; + struct syscall *sc; + long retval; + int errorp, i; + + if (fsc.name == NULL) + return (-1); + + cpid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return (-1); + } + + retval = regs.r_rax; + errorp = !!(regs.r_rflags & PSL_C); + /* - * If an error occurred, then don't bother getting the data; - * it may not be valid. + * This code, while simpler than the initial versions I used, could + * stand some significant cleaning. */ - if (errorp) - asprintf(&temp, "0x%lx", fsc.args[sc->args[i].offset]); - else - temp = print_arg(&sc->args[i], fsc.args, retval, trussinfo); - fsc.s_args[i] = temp; - } - } - } - - if (fsc.name != NULL && - (!strcmp(fsc.name, "freebsd32_execve") || !strcmp(fsc.name, "exit"))) { - trussinfo->curthread->in_syscall = 1; - } - - /* - * It would probably be a good idea to merge the error handling, - * but that complicates things considerably. - */ - - print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, - retval, fsc.sc); - clear_fsc(); - return (retval); + sc = fsc.sc; + if (!sc) { + for (i = 0; i < fsc.nargs; i++) + asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); + } else { + /* + * Here, we only look for arguments that have OUT masked in -- + * otherwise, they were handled in the syscall_entry function. + */ + for (i = 0; i < sc->nargs; i++) { + char *temp; + if (sc->args[i].type & OUT) { + /* + * If an error occurred, then don't bother + * getting the data; it may not be valid. + */ + if (errorp) { + asprintf(&temp, "0x%lx", + fsc.args[sc->args[i].offset]); + } else { + temp = print_arg(&sc->args[i], + fsc.args, retval, trussinfo); + } + fsc.s_args[i] = temp; + } + } + } + + if (fsc.name != NULL && (strcmp(fsc.name, "freebsd32_execve") == 0 || + strcmp(fsc.name, "exit") == 0)) + trussinfo->curthread->in_syscall = 1; + + /* + * It would probably be a good idea to merge the error handling, + * but that complicates things considerably. + */ + + print_syscall_ret(trussinfo, fsc.name, fsc.nargs, fsc.s_args, errorp, + retval, fsc.sc); + clear_fsc(); + + return (retval); } Modified: head/usr.bin/truss/amd64-linux32.c ============================================================================== --- head/usr.bin/truss/amd64-linux32.c Sun Sep 2 07:33:52 2012 (r240004) +++ head/usr.bin/truss/amd64-linux32.c Sun Sep 2 11:03:18 2012 (r240005) @@ -86,15 +86,17 @@ static struct linux_syscall { /* Clear up and free parts of the fsc structure. */ static __inline void -clear_fsc(void) { - if (fsc.s_args) { - int i; - for (i = 0; i < fsc.nargs; i++) - if (fsc.s_args[i]) - free(fsc.s_args[i]); - free(fsc.s_args); - } - memset(&fsc, 0, sizeof(fsc)); +clear_fsc(void) +{ + int i; + + if (fsc.s_args) { + for (i = 0; i < fsc.nargs; i++) + if (fsc.s_args[i]) + free(fsc.s_args[i]); + free(fsc.s_args); + } + memset(&fsc, 0, sizeof(fsc)); } /* @@ -105,211 +107,214 @@ clear_fsc(void) { */ void -amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) { - struct reg regs; - int syscall_num; - int i; - struct syscall *sc; - - cpid = trussinfo->curthread->tid; - - clear_fsc(); - - if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) - { - fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); - return; - } - syscall_num = regs.r_rax; - - fsc.number = syscall_num; - fsc.name = - (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : linux32_syscallnames[syscall_num]; - if (!fsc.name) { - fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); - } - - if (fsc.name && (trussinfo->flags & FOLLOWFORKS) - && ((!strcmp(fsc.name, "linux_fork") - || !strcmp(fsc.name, "linux_vfork")))) - { - trussinfo->curthread->in_fork = 1; - } - - if (nargs == 0) - return; - - /* - * Linux passes syscall arguments in registers, not - * on the stack. Fortunately, we've got access to the - * register set. Note that we don't bother checking the - * number of arguments. And what does linux do for syscalls - * that have more than five arguments? - */ - - fsc.args[0] = regs.r_rbx; - fsc.args[1] = regs.r_rcx; - fsc.args[2] = regs.r_rdx; - fsc.args[3] = regs.r_rsi; - fsc.args[4] = regs.r_rdi; - - sc = get_syscall(fsc.name); - if (sc) { - fsc.nargs = sc->nargs; - } else { +amd64_linux32_syscall_entry(struct trussinfo *trussinfo, int nargs) +{ + struct reg regs; + struct syscall *sc; + int i, syscall_num; + + clear_fsc(); + + cpid = trussinfo->curthread->tid; + + if (ptrace(PT_GETREGS, cpid, (caddr_t)®s, 0) < 0) { + fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); + return; + } + + syscall_num = regs.r_rax; + + fsc.number = syscall_num; + fsc.name = (syscall_num < 0 || syscall_num >= nsyscalls) ? + NULL : linux32_syscallnames[syscall_num]; + if (!fsc.name) { + fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", + syscall_num); + } + + if (fsc.name && (trussinfo->flags & FOLLOWFORKS) && + (strcmp(fsc.name, "linux_fork") == 0|| + strcmp(fsc.name, "linux_vfork") == 0)) + trussinfo->curthread->in_fork = 1; + + if (nargs == 0) + return; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 11:44:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB891106566C; Sun, 2 Sep 2012 11:44:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A612B8FC08; Sun, 2 Sep 2012 11:44:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82BiU0e095157; Sun, 2 Sep 2012 11:44:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82BiUm1095154; Sun, 2 Sep 2012 11:44:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209021144.q82BiUm1095154@svn.freebsd.org> From: Dimitry Andric Date: Sun, 2 Sep 2012 11:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240006 - stable/9/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 11:44:30 -0000 Author: dim Date: Sun Sep 2 11:44:30 2012 New Revision: 240006 URL: http://svn.freebsd.org/changeset/base/240006 Log: MFC r226216 (by das): Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests for particular compiler features might be evaluated differently by mkdep than they would be by cc. MFC r226244 (by das): Also pass the -ansi flag through to mkdep (requested by bde), and fix a cut-and-paste-o (noticed by rdivacky). MFC r239613: Make sure bsd.dep.mk does not filter out -stdlib=xxx from CXXFLAGS, since this determines parts of the C++ include path. Modified: stable/9/share/mk/bsd.dep.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.dep.mk ============================================================================== --- stable/9/share/mk/bsd.dep.mk Sun Sep 2 11:03:18 2012 (r240005) +++ stable/9/share/mk/bsd.dep.mk Sun Sep 2 11:44:30 2012 (r240006) @@ -125,8 +125,10 @@ depend: beforedepend ${DEPENDFILE} after # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. -MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} -MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} +MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \ + ${CFLAGS:M-ansi} +MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \ + ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 12:37:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD31106566B; Sun, 2 Sep 2012 12:37:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0F488FC0C; Sun, 2 Sep 2012 12:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82CbURI002556; Sun, 2 Sep 2012 12:37:30 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82CbUJB002554; Sun, 2 Sep 2012 12:37:30 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209021237.q82CbUJB002554@svn.freebsd.org> From: Michael Tuexen Date: Sun, 2 Sep 2012 12:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240007 - 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, 02 Sep 2012 12:37:31 -0000 Author: tuexen Date: Sun Sep 2 12:37:30 2012 New Revision: 240007 URL: http://svn.freebsd.org/changeset/base/240007 Log: Fix a typo which results in RTT to be off by a factor of 10, if the RTT is larger than 1 second. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Sep 2 11:44:30 2012 (r240006) +++ head/sys/netinet/sctputil.c Sun Sep 2 12:37:30 2012 (r240007) @@ -2384,7 +2384,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb } timevalsub(&now, old); /* store the current RTT in us */ - net->rtt = (uint64_t) 10000000 *(uint64_t) now.tv_sec + + net->rtt = (uint64_t) 1000000 *(uint64_t) now.tv_sec + (uint64_t) now.tv_usec; /* computer rtt in ms */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:35:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA6C106564A; Sun, 2 Sep 2012 14:35:19 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 587E08FC08; Sun, 2 Sep 2012 14:35:18 +0000 (UTC) Received: by obbun3 with SMTP id un3so10440566obb.13 for ; Sun, 02 Sep 2012 07:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=VaNhOhGTvkq4A5dnWWZyN+h9ktJhlf/uJHcDrxtGF/Y=; b=NRa+LbwFBxJnz13BvA68oTLcvlfuA9oMl6nDpgaE/sr2hotfnWoay8Wpb0x0QcTE9F UMgoEi29iaD5XnxbYrX0M3a/4Ib5qvrO044NI1vJmWRWMgCh4UI/Qa4MunIdFxbDz8S8 h+sPO5Z5dvd05LAM+QezAQysMjH7fdyWi0hD9n9qw+iGXzJwMPMSzy24Jn/ztyerkyk2 JpVuRyvjY15WShZmnafpbLGNY48SHIZmFA7cp2w8aWakfEE/gC5rf9vXfAj6A93fmYl7 4XoXn3xdBTPxY+EoOl9Ds5T3BR00E9u10rf1gQss3Nbx+MUihbXwUS7+cK0P3GfrfQX3 ZOGA== MIME-Version: 1.0 Received: by 10.60.7.230 with SMTP id m6mr4699758oea.41.1346596517287; Sun, 02 Sep 2012 07:35:17 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.1.78 with HTTP; Sun, 2 Sep 2012 07:35:17 -0700 (PDT) In-Reply-To: <201206180734.q5I7YcRv062474@svn.freebsd.org> References: <201206180734.q5I7YcRv062474@svn.freebsd.org> Date: Sun, 2 Sep 2012 16:35:17 +0200 X-Google-Sender-Auth: hMvluQpp3hmmaYdMCpuO_YPd0PQ Message-ID: From: Ed Schouten To: Peter Holm , kib@FreeBSD.org Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237219 - 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, 02 Sep 2012 14:35:20 -0000 Hi Peter, Sorry for replying to this email so late; I moved to Germany in April and I'm still waiting for Deutsche Telekomiker to hook up my internet connection. Fortunately I do have a smartphone with tethering now. All hail German bureaucracy. 2012/6/18 Peter Holm : > In tty_makedev() the following construction: > > dev = make_dev_cred(); > dev->si_drv1 = tp; > > leaves a small window where the newly created device may be opened > and si_drv1 is NULL. > > As this is a vary rare situation, using a lock to close the window > seems overkill. Instead just wait for the assignment of si_drv1. I also thought about this in the past and I guess a lot of drivers in our tree are prone to this issue. I think there's little more we can do here than how you've changed the TTY code, but in my opinion a 'devfs-ng' should solve this by having a two-step creation procedure, similar to, say, fdrop(9). Thanks for fixing this! -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:41:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 644741065677; Sun, 2 Sep 2012 14:41:30 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1E88FC19; Sun, 2 Sep 2012 14:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82EfUx2018579; Sun, 2 Sep 2012 14:41:30 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82EfUe3018575; Sun, 2 Sep 2012 14:41:30 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021441.q82EfUe3018575@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 14:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240008 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:41:30 -0000 Author: mjacob Date: Sun Sep 2 14:41:29 2012 New Revision: 240008 URL: http://svn.freebsd.org/changeset/base/240008 Log: Very belated MFC of 227548 Was chasing down a failure to load f/w on a 2400. It turns out that the card is actually broken, or needs a BIOS upgrade for 64 bit loads, but this uncovered a couple of misplaced opcode definitions and some missing continual mbox command cases, so might as well update them here. Modified: stable/9/sys/dev/isp/isp.c stable/9/sys/dev/isp/isp_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 12:37:30 2012 (r240007) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 14:41:29 2012 (r240008) @@ -748,11 +748,13 @@ isp_reset(ispsoftc_t *isp, int do_load_d if (dodnld && IS_24XX(isp)) { const uint32_t *ptr = isp->isp_mdvec->dv_ispfw; + int wordload; /* * Keep loading until we run out of f/w. */ code_org = ptr[2]; /* 1st load address is our start addr */ + wordload = 0; for (;;) { uint32_t la, wi, wl; @@ -777,6 +779,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d wl--; } MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); + again: ISP_MEMZERO(&mbs, sizeof (mbs)); if (la < 0x10000 && nw < 0x10000) { mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; @@ -786,6 +789,23 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[4] = nw; mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM 2100 %u words at load address 0x%x", nw, la); + } else if (wordload) { + union { + const uint32_t *cp; + uint32_t *np; + } ucd; + ucd.cp = (const uint32_t *)cp; + mbs.param[0] = MBOX_WRITE_RAM_WORD_EXTENDED; + mbs.param[1] = la; + mbs.param[2] = (*ucd.np); + mbs.param[3] = (*ucd.np) >> 16; + mbs.param[8] = la >> 16; + isp->isp_mbxwrk0 = nw - 1; + isp->isp_mbxworkp = ucd.np+1; + isp->isp_mbxwrk1 = (la + 1); + isp->isp_mbxwrk8 = (la + 1) >> 16; + isp_prt(isp, ISP_LOGDEBUG0, "WRITE RAM WORD EXTENDED %u words at load address 0x%x", nw, la); } else { mbs.param[0] = MBOX_LOAD_RISC_RAM; mbs.param[1] = la; @@ -796,10 +816,16 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); mbs.param[8] = la >> 16; + isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); } mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + if (mbs.param[0] == MBOX_HOST_INTERFACE_ERROR) { + isp_prt(isp, ISP_LOGERR, "switching to word load"); + wordload = 1; + goto again; + } isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); ISP_RESET0(isp); return; @@ -855,6 +881,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[4] = nw; mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + isp_prt(isp, ISP_LOGDEBUG1, "LOAD RISC RAM 2100 %u words at load address 0x%x\n", nw, la); } else { mbs.param[0] = MBOX_LOAD_RISC_RAM; mbs.param[1] = la; @@ -864,6 +891,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); mbs.param[8] = la >> 16; + isp_prt(isp, ISP_LOGDEBUG1, "LOAD RISC RAM %u words at load address 0x%x\n", nw, la); } mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); @@ -910,6 +938,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[1] = code_org; mbs.param[2] = ucd.np[0]; mbs.logval = MBLOGNONE; + isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x\n", ucd.np[3], code_org); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); @@ -6594,23 +6623,39 @@ isp_mbox_continue(ispsoftc_t *isp) mbs.param[1] = isp->isp_mbxwrk1++; break; case MBOX_WRITE_RAM_WORD_EXTENDED: + if (IS_24XX(isp)) { + uint32_t *lptr = (uint32_t *)ptr; + mbs.param[2] = lptr[0]; + mbs.param[3] = lptr[0] >> 16; + lptr++; + ptr = (uint16_t *)lptr; + } else { + mbs.param[2] = *ptr++; + } offset = isp->isp_mbxwrk1; offset |= isp->isp_mbxwrk8 << 16; - - mbs.param[2] = *ptr++; mbs.param[1] = offset; mbs.param[8] = offset >> 16; - isp->isp_mbxwrk1 = ++offset; + offset++; + isp->isp_mbxwrk1 = offset; isp->isp_mbxwrk8 = offset >> 16; break; case MBOX_READ_RAM_WORD_EXTENDED: + if (IS_24XX(isp)) { + uint32_t *lptr = (uint32_t *)ptr; + uint32_t val = isp->isp_mboxtmp[2]; + val |= (isp->isp_mboxtmp[3]) << 16; + *lptr++ = val; + ptr = (uint16_t *)lptr; + } else { + *ptr++ = isp->isp_mboxtmp[2]; + } offset = isp->isp_mbxwrk1; offset |= isp->isp_mbxwrk8 << 16; - - *ptr++ = isp->isp_mboxtmp[2]; mbs.param[1] = offset; mbs.param[8] = offset >> 16; - isp->isp_mbxwrk1 = ++offset; + offset++; + isp->isp_mbxwrk1 = offset; isp->isp_mbxwrk8 = offset >> 16; break; } @@ -6835,7 +6880,7 @@ static const uint32_t mbpfc[] = { ISPOPMAP(0x00, 0x00), /* 0x0c: */ ISPOPMAP(0x10f, 0x01), /* 0x0d: MBOX_WRITE_RAM_WORD_EXTENDED */ ISPOPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */ - ISPOPMAP(0x10f, 0x05), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */ + ISPOPMAP(0x103, 0x0d), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */ ISPOPMAP(0x1f, 0x11), /* 0x10: MBOX_INIT_REQ_QUEUE */ ISPOPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */ ISPOPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */ @@ -6967,13 +7012,13 @@ static const char *fc_mbcmd_names[] = { "MAILBOX REG TEST", "VERIFY CHECKSUM", "ABOUT FIRMWARE", - "LOAD RAM", + "LOAD RAM (2100)", "DUMP RAM", - "WRITE RAM WORD EXTENDED", + "LOAD RISC RAM", NULL, - "READ RAM WORD EXTENDED", + "WRITE RAM WORD EXTENDED", "CHECK FIRMWARE", - NULL, + "READ RAM WORD EXTENDED", "INIT REQUEST QUEUE", "INIT RESULT QUEUE", "EXECUTE IOCB", Modified: stable/9/sys/dev/isp/isp_pci.c ============================================================================== --- stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 12:37:30 2012 (r240007) +++ stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 14:41:29 2012 (r240008) @@ -1461,6 +1461,7 @@ imc(void *arg, bus_dma_segment_t *segs, imushp->error = EINVAL; return; } + isp_prt(imushp->isp, ISP_LOGDEBUG0, "request/result area @ 0x%jx/0x%jx", (uintmax_t) segs->ds_addr, (uintmax_t) segs->ds_len); imushp->isp->isp_rquest = imushp->vbase; imushp->isp->isp_rquest_dma = segs->ds_addr; segs->ds_addr += ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(imushp->isp)); @@ -1490,6 +1491,7 @@ imc1(void *arg, bus_dma_segment_t *segs, imushp->error = EINVAL; return; } + isp_prt(imushp->isp, ISP_LOGDEBUG0, "scdma @ 0x%jx/0x%jx", (uintmax_t) segs->ds_addr, (uintmax_t) segs->ds_len); FCPARAM(imushp->isp, imushp->chan)->isp_scdma = segs->ds_addr; FCPARAM(imushp->isp, imushp->chan)->isp_scratch = imushp->vbase; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:44:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C03C106566C; Sun, 2 Sep 2012 14:44:10 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 543848FC12; Sun, 2 Sep 2012 14:44:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82EiA6Y018967; Sun, 2 Sep 2012 14:44:10 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82EiAuC018963; Sun, 2 Sep 2012 14:44:10 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021444.q82EiAuC018963@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 14:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240009 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:44:10 -0000 Author: mjacob Date: Sun Sep 2 14:44:09 2012 New Revision: 240009 URL: http://svn.freebsd.org/changeset/base/240009 Log: MFC of 237210 Prepare for FC-Tape support. Modified: stable/9/sys/dev/isp/isp.c stable/9/sys/dev/isp/isp_freebsd.h stable/9/sys/dev/isp/isp_pci.c stable/9/sys/dev/isp/ispmbox.h stable/9/sys/dev/isp/ispreg.h stable/9/sys/dev/isp/ispvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 14:41:29 2012 (r240008) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 14:44:09 2012 (r240009) @@ -159,6 +159,8 @@ void isp_reset(ispsoftc_t *isp, int do_load_defaults) { mbreg_t mbs; + char *buf; + uint64_t fwt; uint32_t code_org, val; int loops, i, dodnld = 1; const char *btype = "????"; @@ -685,9 +687,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * Do some sanity checking by running a NOP command. * If it succeeds, the ROM firmware is now running. */ - ISP_MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_NO_OP; - mbs.logval = MBLOGALL; + MBSINIT(&mbs, MBOX_NO_OP, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "NOP command failed (%x)", mbs.param[0]); @@ -700,29 +700,32 @@ isp_reset(ispsoftc_t *isp, int do_load_d */ if (IS_SCSI(isp) || IS_24XX(isp)) { - ISP_MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_MAILBOX_REG_TEST; - mbs.param[1] = 0xdead; - mbs.param[2] = 0xbeef; - mbs.param[3] = 0xffff; - mbs.param[4] = 0x1111; - mbs.param[5] = 0xa5a5; - mbs.param[6] = 0x0000; - mbs.param[7] = 0x0000; - mbs.logval = MBLOGALL; + static const uint16_t patterns[MAX_MAILBOX] = { + 0x0000, 0xdead, 0xbeef, 0xffff, + 0xa5a5, 0x5a5a, 0x7f7f, 0x7ff7, + 0x3421, 0xabcd, 0xdcba, 0xfeef, + 0xbead, 0xdebe, 0x2222, 0x3333, + 0x5555, 0x6666, 0x7777, 0xaaaa, + 0xffff, 0xdddd, 0x9999, 0x1fbc, + 0x6666, 0x6677, 0x1122, 0x33ff, + 0x0000, 0x0001, 0x1000, 0x1010, + }; + MBSINIT(&mbs, MBOX_MAILBOX_REG_TEST, MBLOGALL, 0); + for (i = 1; i < ISP_NMBOX(isp); i++) { + mbs.param[i] = patterns[i]; + } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { ISP_RESET0(isp); return; } - if (mbs.param[1] != 0xdead || mbs.param[2] != 0xbeef || - mbs.param[3] != 0xffff || mbs.param[4] != 0x1111 || - mbs.param[5] != 0xa5a5) { - ISP_RESET0(isp); - isp_prt(isp, ISP_LOGERR, "Register Test Failed (0x%x 0x%x 0x%x 0x%x 0x%x)", mbs.param[1], mbs.param[2], mbs.param[3], mbs.param[4], mbs.param[5]); - return; + for (i = 1; i < ISP_NMBOX(isp); i++) { + if (mbs.param[i] != patterns[i]) { + ISP_RESET0(isp); + isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]); + return; + } } - } /* @@ -780,7 +783,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d } MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); again: - ISP_MEMZERO(&mbs, sizeof (mbs)); + MBSINIT(&mbs, 0, MBLOGALL, 0); if (la < 0x10000 && nw < 0x10000) { mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; mbs.param[1] = la; @@ -818,7 +821,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[8] = la >> 16; isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); } - mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { if (mbs.param[0] == MBOX_HOST_INTERFACE_ERROR) { @@ -872,7 +874,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d wl--; } MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); - ISP_MEMZERO(&mbs, sizeof (mbs)); + MBSINIT(&mbs, 0, MBLOGALL, 0); if (la < 0x10000) { mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; mbs.param[1] = la; @@ -893,7 +895,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d mbs.param[8] = la >> 16; isp_prt(isp, ISP_LOGDEBUG1, "LOAD RISC RAM %u words at load address 0x%x\n", nw, la); } - mbs.logval = MBLOGALL; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); @@ -933,11 +934,9 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_mbxworkp = &ucd.np[1]; isp->isp_mbxwrk0 = ucd.np[3] - 1; isp->isp_mbxwrk1 = code_org + 1; - ISP_MEMZERO(&mbs, sizeof (mbs)); - mbs.param[0] = MBOX_WRITE_RAM_WORD; + MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); mbs.param[1] = code_org; mbs.param[2] = ucd.np[0]; - mbs.logval = MBLOGNONE; isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x\n", ucd.np[3], code_org); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -954,7 +953,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * If we loaded firmware, verify its checksum */ if (isp->isp_loaded_fw) { - ISP_MEMZERO(&mbs, sizeof (mbs)); + MBSINIT(&mbs, MBOX_VERIFY_CHECKSUM, MBLOGNONE, 0); mbs.param[0] = MBOX_VERIFY_CHECKSUM; if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; @@ -978,7 +977,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d */ - MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 1000000); + MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 5000000); if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; mbs.param[2] = code_org; @@ -1071,9 +1070,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_fwrev[2] = mbs.param[3]; } - isp_prt(isp, ISP_LOGCONFIG, "Board Type %s, Chip Revision 0x%x, %s F/W Revision %d.%d.%d", - btype, isp->isp_revision, dodnld? "loaded" : "resident", isp->isp_fwrev[0], isp->isp_fwrev[1], isp->isp_fwrev[2]); - if (IS_FC(isp)) { /* * We do not believe firmware attributes for 2100 code less @@ -1090,9 +1086,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d #endif } else { isp->isp_fwattr = mbs.param[6]; - isp_prt(isp, ISP_LOGDEBUG0, "Firmware Attributes = 0x%x", mbs.param[6]); } - } else { + if (IS_24XX(isp) && (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED)) { + isp->isp_fwattr ^= ISP2400_FW_ATTR_EXTNDED; + isp->isp_fwattr |= (((uint64_t) mbs.param[15]) << 16) | (((uint64_t) mbs.param[16]) << 32) | (((uint64_t) mbs.param[17]) << 48); + } + } else if (IS_SCSI(isp)) { #ifndef ISP_TARGET_MODE isp->isp_fwattr = ISP_FW_ATTR_TMODE; #else @@ -1100,6 +1099,95 @@ isp_reset(ispsoftc_t *isp, int do_load_d #endif } + isp_prt(isp, ISP_LOGCONFIG, "Board Type %s, Chip Revision 0x%x, %s F/W Revision %d.%d.%d", + btype, isp->isp_revision, dodnld? "loaded" : "resident", isp->isp_fwrev[0], isp->isp_fwrev[1], isp->isp_fwrev[2]); + + fwt = isp->isp_fwattr; + if (IS_24XX(isp)) { + buf = FCPARAM(isp, 0)->isp_scratch; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN, "Attributes:"); + if (fwt & ISP2400_FW_ATTR_CLASS2) { + fwt ^=ISP2400_FW_ATTR_CLASS2; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s Class2", buf); + } + if (fwt & ISP2400_FW_ATTR_IP) { + fwt ^=ISP2400_FW_ATTR_IP; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s IP", buf); + } + if (fwt & ISP2400_FW_ATTR_MULTIID) { + fwt ^=ISP2400_FW_ATTR_MULTIID; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s MultiID", buf); + } + if (fwt & ISP2400_FW_ATTR_SB2) { + fwt ^=ISP2400_FW_ATTR_SB2; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s SB2", buf); + } + if (fwt & ISP2400_FW_ATTR_T10CRC) { + fwt ^=ISP2400_FW_ATTR_T10CRC; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s T10CRC", buf); + } + if (fwt & ISP2400_FW_ATTR_VI) { + fwt ^=ISP2400_FW_ATTR_VI; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VI", buf); + } + if (fwt & ISP2400_FW_ATTR_VP0) { + fwt ^= ISP2400_FW_ATTR_VP0; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VP0_Decoupling", buf); + } + if (fwt & ISP2400_FW_ATTR_EXPFW) { + fwt ^= ISP2400_FW_ATTR_EXPFW; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (Experimental)", buf); + } + fwt &= ~ISP2400_FW_ATTR_EXTNDED; + if (fwt) { + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + } + isp_prt(isp, ISP_LOGCONFIG, "%s", buf); + } else if (IS_FC(isp)) { + buf = FCPARAM(isp, 0)->isp_scratch; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN, "Attributes:"); + if (fwt & ISP_FW_ATTR_TMODE) { + fwt ^=ISP_FW_ATTR_TMODE; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s TargetMode", buf); + } + if (fwt & ISP_FW_ATTR_SCCLUN) { + fwt ^=ISP_FW_ATTR_SCCLUN; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s SCC-Lun", buf); + } + if (fwt & ISP_FW_ATTR_FABRIC) { + fwt ^=ISP_FW_ATTR_FABRIC; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s Fabric", buf); + } + if (fwt & ISP_FW_ATTR_CLASS2) { + fwt ^=ISP_FW_ATTR_CLASS2; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s Class2", buf); + } + if (fwt & ISP_FW_ATTR_FCTAPE) { + fwt ^=ISP_FW_ATTR_FCTAPE; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s FC-Tape", buf); + } + if (fwt & ISP_FW_ATTR_IP) { + fwt ^=ISP_FW_ATTR_IP; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s IP", buf); + } + if (fwt & ISP_FW_ATTR_VI) { + fwt ^=ISP_FW_ATTR_VI; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VI", buf); + } + if (fwt & ISP_FW_ATTR_VI_SOLARIS) { + fwt ^=ISP_FW_ATTR_VI_SOLARIS; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VI_SOLARIS", buf); + } + if (fwt & ISP_FW_ATTR_2KLOGINS) { + fwt ^=ISP_FW_ATTR_2KLOGINS; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 2K-Login", buf); + } + if (fwt != 0) { + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + } + isp_prt(isp, ISP_LOGCONFIG, "%s", buf); + } + if (!IS_24XX(isp)) { MBSINIT(&mbs, MBOX_GET_FIRMWARE_STATUS, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); @@ -1768,6 +1856,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) isp_icb_2400_t local, *icbp = &local; mbreg_t mbs; int chan; + int ownloopid = 0; /* * Check to see whether all channels have *some* kind of role @@ -1831,7 +1920,6 @@ isp_fibre_init_2400(ispsoftc_t *isp) * Get current resource count */ MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); - mbs.obits = 0x4cf; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return; @@ -1840,27 +1928,18 @@ isp_fibre_init_2400(ispsoftc_t *isp) } + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; icbp->icb_hardaddr = fcp->isp_loopid; if (icbp->icb_hardaddr >= LOCAL_LOOP_LIM) { icbp->icb_hardaddr = 0; + ownloopid = 0; } - /* - * Force this on. - */ - icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; + if (ownloopid) + icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; icbp->icb_fwoptions2 = fcp->isp_xfwoptions; switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { -#if 0 - case ISP_CFG_NPORT: - /* - * XXX: This causes the f/w to crash. - */ - icbp->icb_fwoptions2 &= ~ICB2400_OPT2_TOPO_MASK; - icbp->icb_fwoptions2 |= ICB2400_OPT2_PTP_2_LOOP; - break; -#endif case ISP_CFG_NPORT_ONLY: icbp->icb_fwoptions2 &= ~ICB2400_OPT2_TOPO_MASK; icbp->icb_fwoptions2 |= ICB2400_OPT2_PTP_ONLY; @@ -1870,14 +1949,12 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions2 |= ICB2400_OPT2_LOOP_ONLY; break; default: + /* ISP_CFG_PTP_2_LOOP not available in 24XX/25XX */ icbp->icb_fwoptions2 &= ~ICB2400_OPT2_TOPO_MASK; icbp->icb_fwoptions2 |= ICB2400_OPT2_LOOP_2_PTP; break; } - /* force this on for now */ - icbp->icb_fwoptions2 |= ICB2400_OPT2_ZIO; - switch (icbp->icb_fwoptions2 & ICB2400_OPT2_TIMER_MASK) { case ICB2400_OPT2_ZIO: case ICB2400_OPT2_ZIO1: @@ -1891,12 +1968,10 @@ isp_fibre_init_2400(ispsoftc_t *isp) break; } - /* - * We don't support FCTAPE, so clear it. - */ - icbp->icb_fwoptions2 &= ~ICB2400_OPT2_FCTAPE; - icbp->icb_fwoptions3 = fcp->isp_zfwoptions; + if ((icbp->icb_fwoptions3 & ICB2400_OPT3_RSPSZ_MASK) == 0) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RSPSZ_24; + } icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_AUTO; if (isp->isp_confopts & ISP_CFG_ONEGB) { icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_ONEGB; @@ -1904,11 +1979,12 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_TWOGB; } else if (isp->isp_confopts & ISP_CFG_FOURGB) { icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_FOURGB; + } else if (IS_25XX(isp) && (isp->isp_confopts & ISP_CFG_EIGHTGB)) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_EIGHTGB; } else { icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_AUTO; } - - if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) { + if (ownloopid == 0) { icbp->icb_fwoptions3 |= ICB2400_OPT3_SOFTID; } icbp->icb_logintime = ICB_LOGIN_TOV; @@ -2569,11 +2645,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha * Get our Loop ID and Port ID. */ MBSINIT(&mbs, MBOX_GET_LOOP_ID, MBLOGALL, 0); - if (ISP_CAP_MULTI_ID(isp)) { - mbs.param[9] = chan; - mbs.ibits = (1 << 9); - mbs.obits = (1 << 7); - } + mbs.param[9] = chan; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return (-1); @@ -2676,12 +2748,14 @@ isp_fclink_test(ispsoftc_t *isp, int cha lp->new_portid = lp->portid; lp->new_roles = lp->roles; if (IS_24XX(isp)) { - fcp->inorder = (mbs.param[7] & ISP24XX_INORDER) != 0; - if (ISP_FW_NEWER_THAN(isp, 4, 0, 27)) { - fcp->npiv_fabric = (mbs.param[7] & ISP24XX_NPIV_SAN) != 0; - if (fcp->npiv_fabric) { - isp_prt(isp, ISP_LOGCONFIG, "fabric supports NP-IV"); - } + if (check_for_fabric) { + /* + * The mbs is still hanging out from the MBOX_GET_LOOP_ID above. + */ + fcp->isp_fabric_params = mbs.param[7]; + isp_prt(isp, ISP_LOGCONFIG, "fabric params 0x%x", mbs.param[7]); + } else { + fcp->isp_fabric_params = 0; } if (chan) { fcp->isp_sns_hdl = NPH_SNS_HDLBASE + chan; @@ -4427,6 +4501,7 @@ isp_start(XS_T *xs) t7->req_lun[0] |= 0x40; } t7->req_lun[1] = XS_LUN(xs); + FCP_NEXT_CRN(isp, xs, t7->req_crn, XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); tptr = &t7->req_time; cdbp = t7->req_cdb; cdblen = ISP_MIN(cdblen, sizeof (t7->req_cdb)); @@ -4907,7 +4982,7 @@ again: if (isp->isp_mboxbsy) { int obits = isp->isp_obits; isp->isp_mboxtmp[0] = mbox; - for (i = 1; i < MAX_MAILBOX(isp); i++) { + for (i = 1; i < ISP_NMBOX(isp); i++) { if ((obits & (1 << i)) == 0) { continue; } @@ -6667,105 +6742,106 @@ isp_mbox_continue(ispsoftc_t *isp) return (0); } -#define HIWRD(x) ((x) >> 16) -#define LOWRD(x) ((x) & 0xffff) -#define ISPOPMAP(a, b) (((a) << 16) | (b)) -static const uint32_t mbpscsi[] = { - ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ - ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ - ISPOPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */ - ISPOPMAP(0x1f, 0x01), /* 0x03: MBOX_DUMP_RAM */ - ISPOPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ - ISPOPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ - ISPOPMAP(0x3f, 0x3f), /* 0x06: MBOX_MAILBOX_REG_TEST */ - ISPOPMAP(0x07, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */ - ISPOPMAP(0x01, 0x0f), /* 0x08: MBOX_ABOUT_FIRMWARE */ - ISPOPMAP(0x00, 0x00), /* 0x09: */ - ISPOPMAP(0x00, 0x00), /* 0x0a: */ - ISPOPMAP(0x00, 0x00), /* 0x0b: */ - ISPOPMAP(0x00, 0x00), /* 0x0c: */ - ISPOPMAP(0x00, 0x00), /* 0x0d: */ - ISPOPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */ - ISPOPMAP(0x00, 0x00), /* 0x0f: */ - ISPOPMAP(0x1f, 0x1f), /* 0x10: MBOX_INIT_REQ_QUEUE */ - ISPOPMAP(0x3f, 0x3f), /* 0x11: MBOX_INIT_RES_QUEUE */ - ISPOPMAP(0x0f, 0x0f), /* 0x12: MBOX_EXECUTE_IOCB */ - ISPOPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ - ISPOPMAP(0x01, 0x3f), /* 0x14: MBOX_STOP_FIRMWARE */ - ISPOPMAP(0x0f, 0x0f), /* 0x15: MBOX_ABORT */ - ISPOPMAP(0x03, 0x03), /* 0x16: MBOX_ABORT_DEVICE */ - ISPOPMAP(0x07, 0x07), /* 0x17: MBOX_ABORT_TARGET */ - ISPOPMAP(0x07, 0x07), /* 0x18: MBOX_BUS_RESET */ - ISPOPMAP(0x03, 0x07), /* 0x19: MBOX_STOP_QUEUE */ - ISPOPMAP(0x03, 0x07), /* 0x1a: MBOX_START_QUEUE */ - ISPOPMAP(0x03, 0x07), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ - ISPOPMAP(0x03, 0x07), /* 0x1c: MBOX_ABORT_QUEUE */ - ISPOPMAP(0x03, 0x4f), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ - ISPOPMAP(0x00, 0x00), /* 0x1e: */ - ISPOPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ - ISPOPMAP(0x01, 0x07), /* 0x20: MBOX_GET_INIT_SCSI_ID */ - ISPOPMAP(0x01, 0x07), /* 0x21: MBOX_GET_SELECT_TIMEOUT */ - ISPOPMAP(0x01, 0xc7), /* 0x22: MBOX_GET_RETRY_COUNT */ - ISPOPMAP(0x01, 0x07), /* 0x23: MBOX_GET_TAG_AGE_LIMIT */ - ISPOPMAP(0x01, 0x03), /* 0x24: MBOX_GET_CLOCK_RATE */ - ISPOPMAP(0x01, 0x07), /* 0x25: MBOX_GET_ACT_NEG_STATE */ - ISPOPMAP(0x01, 0x07), /* 0x26: MBOX_GET_ASYNC_DATA_SETUP_TIME */ - ISPOPMAP(0x01, 0x07), /* 0x27: MBOX_GET_PCI_PARAMS */ - ISPOPMAP(0x03, 0x4f), /* 0x28: MBOX_GET_TARGET_PARAMS */ - ISPOPMAP(0x03, 0x0f), /* 0x29: MBOX_GET_DEV_QUEUE_PARAMS */ - ISPOPMAP(0x01, 0x07), /* 0x2a: MBOX_GET_RESET_DELAY_PARAMS */ - ISPOPMAP(0x00, 0x00), /* 0x2b: */ - ISPOPMAP(0x00, 0x00), /* 0x2c: */ - ISPOPMAP(0x00, 0x00), /* 0x2d: */ - ISPOPMAP(0x00, 0x00), /* 0x2e: */ - ISPOPMAP(0x00, 0x00), /* 0x2f: */ - ISPOPMAP(0x03, 0x03), /* 0x30: MBOX_SET_INIT_SCSI_ID */ - ISPOPMAP(0x07, 0x07), /* 0x31: MBOX_SET_SELECT_TIMEOUT */ - ISPOPMAP(0xc7, 0xc7), /* 0x32: MBOX_SET_RETRY_COUNT */ - ISPOPMAP(0x07, 0x07), /* 0x33: MBOX_SET_TAG_AGE_LIMIT */ - ISPOPMAP(0x03, 0x03), /* 0x34: MBOX_SET_CLOCK_RATE */ - ISPOPMAP(0x07, 0x07), /* 0x35: MBOX_SET_ACT_NEG_STATE */ - ISPOPMAP(0x07, 0x07), /* 0x36: MBOX_SET_ASYNC_DATA_SETUP_TIME */ - ISPOPMAP(0x07, 0x07), /* 0x37: MBOX_SET_PCI_CONTROL_PARAMS */ - ISPOPMAP(0x4f, 0x4f), /* 0x38: MBOX_SET_TARGET_PARAMS */ - ISPOPMAP(0x0f, 0x0f), /* 0x39: MBOX_SET_DEV_QUEUE_PARAMS */ - ISPOPMAP(0x07, 0x07), /* 0x3a: MBOX_SET_RESET_DELAY_PARAMS */ - ISPOPMAP(0x00, 0x00), /* 0x3b: */ - ISPOPMAP(0x00, 0x00), /* 0x3c: */ - ISPOPMAP(0x00, 0x00), /* 0x3d: */ - ISPOPMAP(0x00, 0x00), /* 0x3e: */ - ISPOPMAP(0x00, 0x00), /* 0x3f: */ - ISPOPMAP(0x01, 0x03), /* 0x40: MBOX_RETURN_BIOS_BLOCK_ADDR */ - ISPOPMAP(0x3f, 0x01), /* 0x41: MBOX_WRITE_FOUR_RAM_WORDS */ - ISPOPMAP(0x03, 0x07), /* 0x42: MBOX_EXEC_BIOS_IOCB */ - ISPOPMAP(0x00, 0x00), /* 0x43: */ - ISPOPMAP(0x00, 0x00), /* 0x44: */ - ISPOPMAP(0x03, 0x03), /* 0x45: SET SYSTEM PARAMETER */ - ISPOPMAP(0x01, 0x03), /* 0x46: GET SYSTEM PARAMETER */ - ISPOPMAP(0x00, 0x00), /* 0x47: */ - ISPOPMAP(0x01, 0xcf), /* 0x48: GET SCAM CONFIGURATION */ - ISPOPMAP(0xcf, 0xcf), /* 0x49: SET SCAM CONFIGURATION */ - ISPOPMAP(0x03, 0x03), /* 0x4a: MBOX_SET_FIRMWARE_FEATURES */ - ISPOPMAP(0x01, 0x03), /* 0x4b: MBOX_GET_FIRMWARE_FEATURES */ - ISPOPMAP(0x00, 0x00), /* 0x4c: */ - ISPOPMAP(0x00, 0x00), /* 0x4d: */ - ISPOPMAP(0x00, 0x00), /* 0x4e: */ - ISPOPMAP(0x00, 0x00), /* 0x4f: */ - ISPOPMAP(0xdf, 0xdf), /* 0x50: LOAD RAM A64 */ - ISPOPMAP(0xdf, 0xdf), /* 0x51: DUMP RAM A64 */ - ISPOPMAP(0xdf, 0xff), /* 0x52: INITIALIZE REQUEST QUEUE A64 */ - ISPOPMAP(0xef, 0xff), /* 0x53: INITIALIZE RESPONSE QUEUE A64 */ - ISPOPMAP(0xcf, 0x01), /* 0x54: EXECUCUTE COMMAND IOCB A64 */ - ISPOPMAP(0x07, 0x01), /* 0x55: ENABLE TARGET MODE */ - ISPOPMAP(0x03, 0x0f), /* 0x56: GET TARGET STATUS */ - ISPOPMAP(0x00, 0x00), /* 0x57: */ - ISPOPMAP(0x00, 0x00), /* 0x58: */ - ISPOPMAP(0x00, 0x00), /* 0x59: */ - ISPOPMAP(0x03, 0x03), /* 0x5a: SET DATA OVERRUN RECOVERY MODE */ - ISPOPMAP(0x01, 0x03), /* 0x5b: GET DATA OVERRUN RECOVERY MODE */ - ISPOPMAP(0x0f, 0x0f), /* 0x5c: SET HOST DATA */ - ISPOPMAP(0x01, 0x01) /* 0x5d: GET NOST DATA */ +#define ISP_SCSI_IBITS(op) (mbpscsi[((op)<<1)]) +#define ISP_SCSI_OBITS(op) (mbpscsi[((op)<<1) + 1]) +#define ISP_SCSI_OPMAP(in, out) in, out +static const uint8_t mbpscsi[] = { + ISP_SCSI_OPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ + ISP_SCSI_OPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ + ISP_SCSI_OPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */ + ISP_SCSI_OPMAP(0x1f, 0x01), /* 0x03: MBOX_DUMP_RAM */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ + ISP_SCSI_OPMAP(0x3f, 0x3f), /* 0x06: MBOX_MAILBOX_REG_TEST */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */ + ISP_SCSI_OPMAP(0x01, 0x0f), /* 0x08: MBOX_ABOUT_FIRMWARE */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x09: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x0a: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x0b: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x0c: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x0d: */ + ISP_SCSI_OPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x0f: */ + ISP_SCSI_OPMAP(0x1f, 0x1f), /* 0x10: MBOX_INIT_REQ_QUEUE */ + ISP_SCSI_OPMAP(0x3f, 0x3f), /* 0x11: MBOX_INIT_RES_QUEUE */ + ISP_SCSI_OPMAP(0x0f, 0x0f), /* 0x12: MBOX_EXECUTE_IOCB */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ + ISP_SCSI_OPMAP(0x01, 0x3f), /* 0x14: MBOX_STOP_FIRMWARE */ + ISP_SCSI_OPMAP(0x0f, 0x0f), /* 0x15: MBOX_ABORT */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x16: MBOX_ABORT_DEVICE */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x17: MBOX_ABORT_TARGET */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x18: MBOX_BUS_RESET */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x19: MBOX_STOP_QUEUE */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x1a: MBOX_START_QUEUE */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x1c: MBOX_ABORT_QUEUE */ + ISP_SCSI_OPMAP(0x03, 0x4f), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x1e: */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x20: MBOX_GET_INIT_SCSI_ID */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x21: MBOX_GET_SELECT_TIMEOUT */ + ISP_SCSI_OPMAP(0x01, 0xc7), /* 0x22: MBOX_GET_RETRY_COUNT */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x23: MBOX_GET_TAG_AGE_LIMIT */ + ISP_SCSI_OPMAP(0x01, 0x03), /* 0x24: MBOX_GET_CLOCK_RATE */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x25: MBOX_GET_ACT_NEG_STATE */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x26: MBOX_GET_ASYNC_DATA_SETUP_TIME */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x27: MBOX_GET_PCI_PARAMS */ + ISP_SCSI_OPMAP(0x03, 0x4f), /* 0x28: MBOX_GET_TARGET_PARAMS */ + ISP_SCSI_OPMAP(0x03, 0x0f), /* 0x29: MBOX_GET_DEV_QUEUE_PARAMS */ + ISP_SCSI_OPMAP(0x01, 0x07), /* 0x2a: MBOX_GET_RESET_DELAY_PARAMS */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x2b: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x2c: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x2d: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x2e: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x2f: */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x30: MBOX_SET_INIT_SCSI_ID */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x31: MBOX_SET_SELECT_TIMEOUT */ + ISP_SCSI_OPMAP(0xc7, 0xc7), /* 0x32: MBOX_SET_RETRY_COUNT */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x33: MBOX_SET_TAG_AGE_LIMIT */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x34: MBOX_SET_CLOCK_RATE */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x35: MBOX_SET_ACT_NEG_STATE */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x36: MBOX_SET_ASYNC_DATA_SETUP_TIME */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x37: MBOX_SET_PCI_CONTROL_PARAMS */ + ISP_SCSI_OPMAP(0x4f, 0x4f), /* 0x38: MBOX_SET_TARGET_PARAMS */ + ISP_SCSI_OPMAP(0x0f, 0x0f), /* 0x39: MBOX_SET_DEV_QUEUE_PARAMS */ + ISP_SCSI_OPMAP(0x07, 0x07), /* 0x3a: MBOX_SET_RESET_DELAY_PARAMS */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x3b: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x3c: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x3d: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x3e: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x3f: */ + ISP_SCSI_OPMAP(0x01, 0x03), /* 0x40: MBOX_RETURN_BIOS_BLOCK_ADDR */ + ISP_SCSI_OPMAP(0x3f, 0x01), /* 0x41: MBOX_WRITE_FOUR_RAM_WORDS */ + ISP_SCSI_OPMAP(0x03, 0x07), /* 0x42: MBOX_EXEC_BIOS_IOCB */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x43: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x44: */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x45: SET SYSTEM PARAMETER */ + ISP_SCSI_OPMAP(0x01, 0x03), /* 0x46: GET SYSTEM PARAMETER */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x47: */ + ISP_SCSI_OPMAP(0x01, 0xcf), /* 0x48: GET SCAM CONFIGURATION */ + ISP_SCSI_OPMAP(0xcf, 0xcf), /* 0x49: SET SCAM CONFIGURATION */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x4a: MBOX_SET_FIRMWARE_FEATURES */ + ISP_SCSI_OPMAP(0x01, 0x03), /* 0x4b: MBOX_GET_FIRMWARE_FEATURES */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x4c: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x4d: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x4e: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x4f: */ + ISP_SCSI_OPMAP(0xdf, 0xdf), /* 0x50: LOAD RAM A64 */ + ISP_SCSI_OPMAP(0xdf, 0xdf), /* 0x51: DUMP RAM A64 */ + ISP_SCSI_OPMAP(0xdf, 0xff), /* 0x52: INITIALIZE REQUEST QUEUE A64 */ + ISP_SCSI_OPMAP(0xef, 0xff), /* 0x53: INITIALIZE RESPONSE QUEUE A64 */ + ISP_SCSI_OPMAP(0xcf, 0x01), /* 0x54: EXECUCUTE COMMAND IOCB A64 */ + ISP_SCSI_OPMAP(0x07, 0x01), /* 0x55: ENABLE TARGET MODE */ + ISP_SCSI_OPMAP(0x03, 0x0f), /* 0x56: GET TARGET STATUS */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x57: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x58: */ + ISP_SCSI_OPMAP(0x00, 0x00), /* 0x59: */ + ISP_SCSI_OPMAP(0x03, 0x03), /* 0x5a: SET DATA OVERRUN RECOVERY MODE */ + ISP_SCSI_OPMAP(0x01, 0x03), /* 0x5b: GET DATA OVERRUN RECOVERY MODE */ + ISP_SCSI_OPMAP(0x0f, 0x0f), /* 0x5c: SET HOST DATA */ + ISP_SCSI_OPMAP(0x01, 0x01) /* 0x5d: GET NOST DATA */ }; +#define MAX_SCSI_OPCODE 0x5d static const char *scsi_mbcmd_names[] = { "NO-OP", @@ -6864,135 +6940,142 @@ static const char *scsi_mbcmd_names[] = "GET NOST DATA", }; +#define ISP_FC_IBITS(op) ((mbpfc[((op)<<3) + 0] << 24) | (mbpfc[((op)<<3) + 1] << 16) | (mbpfc[((op)<<3) + 2] << 8) | (mbpfc[((op)<<3) + 3])) +#define ISP_FC_OBITS(op) ((mbpfc[((op)<<3) + 4] << 24) | (mbpfc[((op)<<3) + 5] << 16) | (mbpfc[((op)<<3) + 6] << 8) | (mbpfc[((op)<<3) + 7])) + +#define ISP_FC_OPMAP(in0, out0) 0, 0, 0, in0, 0, 0, 0, out0 +#define ISP_FC_OPMAP_HALF(in1, in0, out1, out0) 0, 0, in1, in0, 0, 0, out1, out0 +#define ISP_FC_OPMAP_FULL(in3, in2, in1, in0, out3, out2, out1, out0) in3, in2, in1, in0, out3, out2, out1, out0 static const uint32_t mbpfc[] = { - ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ - ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ - ISPOPMAP(0x0f, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */ - ISPOPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */ - ISPOPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ - ISPOPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ - ISPOPMAP(0xff, 0xff), /* 0x06: MBOX_MAILBOX_REG_TEST */ - ISPOPMAP(0x07, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */ - ISPOPMAP(0x01, 0x4f), /* 0x08: MBOX_ABOUT_FIRMWARE */ - ISPOPMAP(0xdf, 0x01), /* 0x09: MBOX_LOAD_RISC_RAM_2100 */ - ISPOPMAP(0xdf, 0x01), /* 0x0a: DUMP RAM */ - ISPOPMAP(0x1ff, 0x01), /* 0x0b: MBOX_LOAD_RISC_RAM */ - ISPOPMAP(0x00, 0x00), /* 0x0c: */ - ISPOPMAP(0x10f, 0x01), /* 0x0d: MBOX_WRITE_RAM_WORD_EXTENDED */ - ISPOPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */ - ISPOPMAP(0x103, 0x0d), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */ - ISPOPMAP(0x1f, 0x11), /* 0x10: MBOX_INIT_REQ_QUEUE */ - ISPOPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */ - ISPOPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */ - ISPOPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ - ISPOPMAP(0x01, 0xff), /* 0x14: MBOX_STOP_FIRMWARE */ - ISPOPMAP(0x4f, 0x01), /* 0x15: MBOX_ABORT */ - ISPOPMAP(0x07, 0x01), /* 0x16: MBOX_ABORT_DEVICE */ - ISPOPMAP(0x07, 0x01), /* 0x17: MBOX_ABORT_TARGET */ - ISPOPMAP(0x03, 0x03), /* 0x18: MBOX_BUS_RESET */ - ISPOPMAP(0x07, 0x05), /* 0x19: MBOX_STOP_QUEUE */ - ISPOPMAP(0x07, 0x05), /* 0x1a: MBOX_START_QUEUE */ - ISPOPMAP(0x07, 0x05), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ - ISPOPMAP(0x07, 0x05), /* 0x1c: MBOX_ABORT_QUEUE */ - ISPOPMAP(0x07, 0x03), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ - ISPOPMAP(0x00, 0x00), /* 0x1e: */ - ISPOPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ - ISPOPMAP(0x01, 0x4f), /* 0x20: MBOX_GET_LOOP_ID */ - ISPOPMAP(0x00, 0x00), /* 0x21: */ - ISPOPMAP(0x01, 0x07), /* 0x22: MBOX_GET_RETRY_COUNT */ - ISPOPMAP(0x00, 0x00), /* 0x23: */ - ISPOPMAP(0x00, 0x00), /* 0x24: */ - ISPOPMAP(0x00, 0x00), /* 0x25: */ - ISPOPMAP(0x00, 0x00), /* 0x26: */ - ISPOPMAP(0x00, 0x00), /* 0x27: */ - ISPOPMAP(0x01, 0x03), /* 0x28: MBOX_GET_FIRMWARE_OPTIONS */ - ISPOPMAP(0x03, 0x07), /* 0x29: MBOX_GET_PORT_QUEUE_PARAMS */ - ISPOPMAP(0x00, 0x00), /* 0x2a: */ - ISPOPMAP(0x00, 0x00), /* 0x2b: */ - ISPOPMAP(0x00, 0x00), /* 0x2c: */ - ISPOPMAP(0x00, 0x00), /* 0x2d: */ - ISPOPMAP(0x00, 0x00), /* 0x2e: */ - ISPOPMAP(0x00, 0x00), /* 0x2f: */ - ISPOPMAP(0x00, 0x00), /* 0x30: */ - ISPOPMAP(0x00, 0x00), /* 0x31: */ - ISPOPMAP(0x07, 0x07), /* 0x32: MBOX_SET_RETRY_COUNT */ - ISPOPMAP(0x00, 0x00), /* 0x33: */ - ISPOPMAP(0x00, 0x00), /* 0x34: */ - ISPOPMAP(0x00, 0x00), /* 0x35: */ - ISPOPMAP(0x00, 0x00), /* 0x36: */ - ISPOPMAP(0x00, 0x00), /* 0x37: */ - ISPOPMAP(0x0f, 0x01), /* 0x38: MBOX_SET_FIRMWARE_OPTIONS */ - ISPOPMAP(0x0f, 0x07), /* 0x39: MBOX_SET_PORT_QUEUE_PARAMS */ - ISPOPMAP(0x00, 0x00), /* 0x3a: */ - ISPOPMAP(0x00, 0x00), /* 0x3b: */ - ISPOPMAP(0x00, 0x00), /* 0x3c: */ - ISPOPMAP(0x00, 0x00), /* 0x3d: */ - ISPOPMAP(0x00, 0x00), /* 0x3e: */ - ISPOPMAP(0x00, 0x00), /* 0x3f: */ - ISPOPMAP(0x03, 0x01), /* 0x40: MBOX_LOOP_PORT_BYPASS */ - ISPOPMAP(0x03, 0x01), /* 0x41: MBOX_LOOP_PORT_ENABLE */ - ISPOPMAP(0x03, 0x07), /* 0x42: MBOX_GET_RESOURCE_COUNT */ - ISPOPMAP(0x01, 0x01), /* 0x43: MBOX_REQUEST_OFFLINE_MODE */ - ISPOPMAP(0x00, 0x00), /* 0x44: */ - ISPOPMAP(0x00, 0x00), /* 0x45: */ - ISPOPMAP(0x00, 0x00), /* 0x46: */ - ISPOPMAP(0xcf, 0x03), /* 0x47: GET PORT_DATABASE ENHANCED */ - ISPOPMAP(0xcd, 0x01), /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */ - ISPOPMAP(0xcd, 0x01), /* 0x49: MBOX_GET_VP_DATABASE */ - ISPOPMAP(0x2cd, 0x01), /* 0x4a: MBOX_GET_VP_DATABASE_ENTRY */ - ISPOPMAP(0x00, 0x00), /* 0x4b: */ - ISPOPMAP(0x00, 0x00), /* 0x4c: */ - ISPOPMAP(0x00, 0x00), /* 0x4d: */ - ISPOPMAP(0x00, 0x00), /* 0x4e: */ - ISPOPMAP(0x00, 0x00), /* 0x4f: */ - ISPOPMAP(0x00, 0x00), /* 0x50: */ - ISPOPMAP(0x00, 0x00), /* 0x51: */ - ISPOPMAP(0x00, 0x00), /* 0x52: */ - ISPOPMAP(0x00, 0x00), /* 0x53: */ - ISPOPMAP(0xcf, 0x01), /* 0x54: EXECUTE IOCB A64 */ - ISPOPMAP(0x00, 0x00), /* 0x55: */ - ISPOPMAP(0x00, 0x00), /* 0x56: */ - ISPOPMAP(0x00, 0x00), /* 0x57: */ - ISPOPMAP(0x00, 0x00), /* 0x58: */ - ISPOPMAP(0x00, 0x00), /* 0x59: */ - ISPOPMAP(0x00, 0x00), /* 0x5a: */ - ISPOPMAP(0x03, 0x01), /* 0x5b: MBOX_DRIVER_HEARTBEAT */ - ISPOPMAP(0xcf, 0x01), /* 0x5c: MBOX_FW_HEARTBEAT */ - ISPOPMAP(0x07, 0x03), /* 0x5d: MBOX_GET_SET_DATA_RATE */ - ISPOPMAP(0x00, 0x00), /* 0x5e: */ - ISPOPMAP(0x00, 0x00), /* 0x5f: */ - ISPOPMAP(0xcd, 0x01), /* 0x60: MBOX_INIT_FIRMWARE */ - ISPOPMAP(0x00, 0x00), /* 0x61: */ - ISPOPMAP(0x01, 0x01), /* 0x62: MBOX_INIT_LIP */ - ISPOPMAP(0xcd, 0x03), /* 0x63: MBOX_GET_FC_AL_POSITION_MAP */ - ISPOPMAP(0xcf, 0x01), /* 0x64: MBOX_GET_PORT_DB */ - ISPOPMAP(0x07, 0x01), /* 0x65: MBOX_CLEAR_ACA */ - ISPOPMAP(0x07, 0x01), /* 0x66: MBOX_TARGET_RESET */ - ISPOPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ - ISPOPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ - ISPOPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ - ISPOPMAP(0x03, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ - ISPOPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ - ISPOPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ - ISPOPMAP(0x00, 0x00), /* 0x6d: */ - ISPOPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ - ISPOPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ - ISPOPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ - ISPOPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ - ISPOPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ - ISPOPMAP(0x00, 0x00), /* 0x73: */ - ISPOPMAP(0x07, 0x01), /* 0x74: LOGIN LOOP PORT */ - ISPOPMAP(0xcf, 0x03), /* 0x75: GET PORT/NODE NAME LIST */ - ISPOPMAP(0x4f, 0x01), /* 0x76: SET VENDOR ID */ - ISPOPMAP(0xcd, 0x01), /* 0x77: INITIALIZE IP MAILBOX */ - ISPOPMAP(0x00, 0x00), /* 0x78: */ - ISPOPMAP(0x00, 0x00), /* 0x79: */ - ISPOPMAP(0x00, 0x00), /* 0x7a: */ - ISPOPMAP(0x00, 0x00), /* 0x7b: */ - ISPOPMAP(0x4f, 0x03), /* 0x7c: Get ID List */ - ISPOPMAP(0xcf, 0x01), /* 0x7d: SEND LFA */ - ISPOPMAP(0x0f, 0x01) /* 0x7e: LUN RESET */ + ISP_FC_OPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ + ISP_FC_OPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ + ISP_FC_OPMAP(0x0f, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */ + ISP_FC_OPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */ + ISP_FC_OPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ + ISP_FC_OPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ + ISP_FC_OPMAP_FULL(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), /* 0x06: MBOX_MAILBOX_REG_TEST */ + ISP_FC_OPMAP(0x07, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */ + ISP_FC_OPMAP_FULL(0x0, 0x0, 0x0, 0x01, 0x0, 0x3, 0x80, 0x4f), /* 0x08: MBOX_ABOUT_FIRMWARE */ + ISP_FC_OPMAP(0xdf, 0x01), /* 0x09: MBOX_LOAD_RISC_RAM_2100 */ + ISP_FC_OPMAP(0xdf, 0x01), /* 0x0a: DUMP RAM */ + ISP_FC_OPMAP_HALF(0x1, 0xff, 0x0, 0x01), /* 0x0b: MBOX_LOAD_RISC_RAM */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x0c: */ + ISP_FC_OPMAP_HALF(0x1, 0x0f, 0x0, 0x01), /* 0x0d: MBOX_WRITE_RAM_WORD_EXTENDED */ + ISP_FC_OPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */ + ISP_FC_OPMAP_HALF(0x1, 0x03, 0x0, 0x0d), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */ + ISP_FC_OPMAP(0x1f, 0x11), /* 0x10: MBOX_INIT_REQ_QUEUE */ + ISP_FC_OPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */ + ISP_FC_OPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */ + ISP_FC_OPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ + ISP_FC_OPMAP(0x01, 0xff), /* 0x14: MBOX_STOP_FIRMWARE */ + ISP_FC_OPMAP(0x4f, 0x01), /* 0x15: MBOX_ABORT */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x16: MBOX_ABORT_DEVICE */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x17: MBOX_ABORT_TARGET */ + ISP_FC_OPMAP(0x03, 0x03), /* 0x18: MBOX_BUS_RESET */ + ISP_FC_OPMAP(0x07, 0x05), /* 0x19: MBOX_STOP_QUEUE */ + ISP_FC_OPMAP(0x07, 0x05), /* 0x1a: MBOX_START_QUEUE */ + ISP_FC_OPMAP(0x07, 0x05), /* 0x1b: MBOX_SINGLE_STEP_QUEUE */ + ISP_FC_OPMAP(0x07, 0x05), /* 0x1c: MBOX_ABORT_QUEUE */ + ISP_FC_OPMAP(0x07, 0x03), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x1e: */ + ISP_FC_OPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ + ISP_FC_OPMAP_HALF(0x2, 0x01, 0x0, 0xcf), /* 0x20: MBOX_GET_LOOP_ID */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x21: */ + ISP_FC_OPMAP(0x01, 0x07), /* 0x22: MBOX_GET_RETRY_COUNT */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x23: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x24: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x25: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x26: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x27: */ + ISP_FC_OPMAP(0x01, 0x03), /* 0x28: MBOX_GET_FIRMWARE_OPTIONS */ + ISP_FC_OPMAP(0x03, 0x07), /* 0x29: MBOX_GET_PORT_QUEUE_PARAMS */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2a: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2b: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2c: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2d: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2e: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x2f: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x30: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x31: */ + ISP_FC_OPMAP(0x07, 0x07), /* 0x32: MBOX_SET_RETRY_COUNT */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x33: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x34: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x35: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x36: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x37: */ + ISP_FC_OPMAP(0x0f, 0x01), /* 0x38: MBOX_SET_FIRMWARE_OPTIONS */ + ISP_FC_OPMAP(0x0f, 0x07), /* 0x39: MBOX_SET_PORT_QUEUE_PARAMS */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3a: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3b: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3c: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3d: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3e: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x3f: */ + ISP_FC_OPMAP(0x03, 0x01), /* 0x40: MBOX_LOOP_PORT_BYPASS */ + ISP_FC_OPMAP(0x03, 0x01), /* 0x41: MBOX_LOOP_PORT_ENABLE */ + ISP_FC_OPMAP_HALF(0x3, 0xcf, 0x0, 0x07), /* 0x42: MBOX_GET_RESOURCE_COUNT */ + ISP_FC_OPMAP(0x01, 0x01), /* 0x43: MBOX_REQUEST_OFFLINE_MODE */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x44: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x45: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x46: */ + ISP_FC_OPMAP(0xcf, 0x03), /* 0x47: GET PORT_DATABASE ENHANCED */ + ISP_FC_OPMAP(0xcd, 0x01), /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */ + ISP_FC_OPMAP(0xcd, 0x01), /* 0x49: MBOX_GET_VP_DATABASE */ + ISP_FC_OPMAP_HALF(0x2, 0xcd, 0x0, 0x01), /* 0x4a: MBOX_GET_VP_DATABASE_ENTRY */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x4b: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x4c: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x4d: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x4e: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x4f: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x50: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x51: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x52: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x53: */ + ISP_FC_OPMAP(0xcf, 0x01), /* 0x54: EXECUTE IOCB A64 */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x55: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x56: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x57: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x58: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x59: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x5a: */ + ISP_FC_OPMAP(0x03, 0x01), /* 0x5b: MBOX_DRIVER_HEARTBEAT */ + ISP_FC_OPMAP(0xcf, 0x01), /* 0x5c: MBOX_FW_HEARTBEAT */ + ISP_FC_OPMAP(0x07, 0x03), /* 0x5d: MBOX_GET_SET_DATA_RATE */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x5e: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x5f: */ + ISP_FC_OPMAP(0xcd, 0x01), /* 0x60: MBOX_INIT_FIRMWARE */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x61: */ + ISP_FC_OPMAP(0x01, 0x01), /* 0x62: MBOX_INIT_LIP */ + ISP_FC_OPMAP(0xcd, 0x03), /* 0x63: MBOX_GET_FC_AL_POSITION_MAP */ + ISP_FC_OPMAP(0xcf, 0x01), /* 0x64: MBOX_GET_PORT_DB */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x65: MBOX_CLEAR_ACA */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x66: MBOX_TARGET_RESET */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ + ISP_FC_OPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ + ISP_FC_OPMAP(0x03, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ + ISP_FC_OPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ + ISP_FC_OPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ + ISP_FC_OPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ + ISP_FC_OPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ + ISP_FC_OPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ + ISP_FC_OPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ + ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ + ISP_FC_OPMAP(0x07, 0x01), /* 0x74: LOGIN LOOP PORT */ + ISP_FC_OPMAP(0xcf, 0x03), /* 0x75: GET PORT/NODE NAME LIST */ + ISP_FC_OPMAP(0x4f, 0x01), /* 0x76: SET VENDOR ID */ + ISP_FC_OPMAP(0xcd, 0x01), /* 0x77: INITIALIZE IP MAILBOX */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x78: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x79: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x7a: */ + ISP_FC_OPMAP(0x00, 0x00), /* 0x7b: */ + ISP_FC_OPMAP(0x4f, 0x03), /* 0x7c: Get ID List */ + ISP_FC_OPMAP(0xcf, 0x01), /* 0x7d: SEND LFA */ + ISP_FC_OPMAP(0x0f, 0x01) /* 0x7e: LUN RESET */ }; +#define MAX_FC_OPCODE 0x7e /* * Footnotes * @@ -7136,19 +7219,18 @@ static void isp_mboxcmd_qnw(ispsoftc_t *isp, mbreg_t *mbp, int nodelay) { unsigned int ibits, obits, box, opcode; - const uint32_t *mcp; + opcode = mbp->param[0]; if (IS_FC(isp)) { - mcp = mbpfc; + ibits = ISP_FC_IBITS(opcode); + obits = ISP_FC_OBITS(opcode); } else { - mcp = mbpscsi; + ibits = ISP_SCSI_IBITS(opcode); + obits = ISP_SCSI_OBITS(opcode); } - opcode = mbp->param[0]; - ibits = HIWRD(mcp[opcode]) & NMBOX_BMASK(isp); - obits = LOWRD(mcp[opcode]) & NMBOX_BMASK(isp); ibits |= mbp->ibits; obits |= mbp->obits; - for (box = 0; box < MAX_MAILBOX(isp); box++) { + for (box = 0; box < ISP_NMBOX(isp); box++) { if (ibits & (1 << box)) { ISP_WRITE(isp, MBOX_OFF(box), mbp->param[box]); } @@ -7181,26 +7263,27 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb { const char *cname, *xname; char tname[16], mname[16]; - unsigned int lim, ibits, obits, box, opcode; - const uint32_t *mcp; + unsigned int ibits, obits, box, opcode; + opcode = mbp->param[0]; if (IS_FC(isp)) { - mcp = mbpfc; - lim = (sizeof (mbpfc) / sizeof (mbpfc[0])); + if (opcode > MAX_FC_OPCODE) { + mbp->param[0] = MBOX_INVALID_COMMAND; + isp_prt(isp, ISP_LOGERR, "Unknown Command 0x%x", opcode); + return; + } + ibits = ISP_FC_IBITS(opcode); + obits = ISP_FC_OBITS(opcode); } else { - mcp = mbpscsi; - lim = (sizeof (mbpscsi) / sizeof (mbpscsi[0])); - } - - if ((opcode = mbp->param[0]) >= lim) { - mbp->param[0] = MBOX_INVALID_COMMAND; - isp_prt(isp, ISP_LOGERR, "Unknown Command 0x%x", opcode); - return; + if (opcode > MAX_SCSI_OPCODE) { + mbp->param[0] = MBOX_INVALID_COMMAND; + isp_prt(isp, ISP_LOGERR, "Unknown Command 0x%x", opcode); + return; + } + ibits = ISP_SCSI_IBITS(opcode); + obits = ISP_SCSI_OBITS(opcode); } - ibits = HIWRD(mcp[opcode]) & NMBOX_BMASK(isp); - obits = LOWRD(mcp[opcode]) & NMBOX_BMASK(isp); - /* * Pick up any additional bits that the caller might have set. */ @@ -7221,7 +7304,7 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb goto out; } - for (box = 0; box < MAX_MAILBOX(isp); box++) { + for (box = 0; box < ISP_NMBOX(isp); box++) { if (ibits & (1 << box)) { isp_prt(isp, ISP_LOGDEBUG3, "IN mbox %d = 0x%04x", box, mbp->param[box]); @@ -7264,7 +7347,7 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb /* * Copy back output registers. */ - for (box = 0; box < MAX_MAILBOX(isp); box++) { + for (box = 0; box < ISP_NMBOX(isp); box++) { if (obits & (1 << box)) { mbp->param[box] = isp->isp_mboxtmp[box]; isp_prt(isp, ISP_LOGDEBUG3, "OUT mbox %d = 0x%04x", box, @@ -7964,8 +8047,7 @@ isp_parse_nvram_1020(ispsoftc_t *isp, ui (ISP_NVRAM_FIFO_THRESHOLD_128(nvram_data) << 2); if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) - sdp->isp_initiator_id = - ISP_NVRAM_INITIATOR_ID(nvram_data); + sdp->isp_initiator_id = ISP_NVRAM_INITIATOR_ID(nvram_data); sdp->isp_bus_reset_delay = ISP_NVRAM_BUS_RESET_DELAY(nvram_data); @@ -8076,8 +8158,7 @@ isp_parse_nvram_1080(ispsoftc_t *isp, in ISP1080_NVRAM_FIFO_THRESHOLD(nvram_data); if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) - sdp->isp_initiator_id = - ISP1080_NVRAM_INITIATOR_ID(nvram_data, bus); + sdp->isp_initiator_id = ISP1080_NVRAM_INITIATOR_ID(nvram_data, bus); sdp->isp_bus_reset_delay = ISP1080_NVRAM_BUS_RESET_DELAY(nvram_data, bus); @@ -8152,8 +8233,7 @@ isp_parse_nvram_12160(ispsoftc_t *isp, i ISP12160_NVRAM_FIFO_THRESHOLD(nvram_data); if ((isp->isp_confopts & ISP_CFG_OWNLOOPID) == 0) - sdp->isp_initiator_id = - ISP12160_NVRAM_INITIATOR_ID(nvram_data, bus); + sdp->isp_initiator_id = ISP12160_NVRAM_INITIATOR_ID(nvram_data, bus); sdp->isp_bus_reset_delay = ISP12160_NVRAM_BUS_RESET_DELAY(nvram_data, bus); Modified: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:41:29 2012 (r240008) +++ stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:44:09 2012 (r240009) @@ -145,6 +145,7 @@ struct isp_pcmd { bus_dmamap_t dmap; /* dma map for this command */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:45:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 162C1106566B; Sun, 2 Sep 2012 14:45:37 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 001508FC15; Sun, 2 Sep 2012 14:45:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82EjaTY019262; Sun, 2 Sep 2012 14:45:36 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82EjaDP019255; Sun, 2 Sep 2012 14:45:36 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021445.q82EjaDP019255@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 14:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240010 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:45:37 -0000 Author: mjacob Date: Sun Sep 2 14:45:36 2012 New Revision: 240010 URL: http://svn.freebsd.org/changeset/base/240010 Log: MFC of 237537 Clean up multi-id mode so it's driven by the f/w loaded,... Modified: stable/9/sys/dev/isp/isp.c stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h stable/9/sys/dev/isp/isp_pci.c stable/9/sys/dev/isp/ispmbox.h stable/9/sys/dev/isp/ispvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 14:45:36 2012 (r240010) @@ -1088,7 +1088,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_fwattr = mbs.param[6]; } if (IS_24XX(isp) && (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED)) { - isp->isp_fwattr ^= ISP2400_FW_ATTR_EXTNDED; isp->isp_fwattr |= (((uint64_t) mbs.param[15]) << 16) | (((uint64_t) mbs.param[16]) << 32) | (((uint64_t) mbs.param[17]) << 48); } } else if (IS_SCSI(isp)) { @@ -1140,7 +1139,8 @@ isp_reset(ispsoftc_t *isp, int do_load_d } fwt &= ~ISP2400_FW_ATTR_EXTNDED; if (fwt) { - ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%08x%08x)", buf, + (uint32_t) (fwt >> 32), (uint32_t) fwt); } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); } else if (IS_FC(isp)) { @@ -1183,12 +1183,23 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 2K-Login", buf); } if (fwt != 0) { - ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%08x%08x)", buf, + (uint32_t) (fwt >> 32), (uint32_t) fwt); } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); } - if (!IS_24XX(isp)) { + if (IS_24XX(isp)) { + MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + ISP_RESET0(isp); + return; + } + if (isp->isp_maxcmds >= mbs.param[3]) { + isp->isp_maxcmds = mbs.param[3]; + } + } else { MBSINIT(&mbs, MBOX_GET_FIRMWARE_STATUS, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -1206,11 +1217,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d * Only make this check for non-SCSI cards (I'm not sure firmware attributes * work for them). */ - if (IS_FC(isp) && ISP_CAP_MULTI_ID(isp) == 0 && isp->isp_nchan > 1) { - isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan); - isp->isp_nchan = 1; + if (IS_FC(isp) && isp->isp_nchan > 1) { + if (!IS_24XX(isp) || (fwt & ISP2400_FW_ATTR_MULTIID) == 0) { + isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan); + isp->isp_nchan = 1; + } } - for (i = 0; i < isp->isp_nchan; i++) { isp_fw_state(isp, i); } @@ -1697,21 +1709,39 @@ isp_fibre_init(ispsoftc_t *isp) */ if (IS_2200(isp) || IS_23XX(isp)) { icbp->icb_fwoptions |= ICBOPT_EXTENDED; + + icbp->icb_xfwoptions = fcp->isp_xfwoptions; + /* * Prefer or force Point-To-Point instead Loop? */ switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { case ISP_CFG_NPORT: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_PTP_2_LOOP; break; case ISP_CFG_NPORT_ONLY: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_PTP_ONLY; break; case ISP_CFG_LPORT_ONLY: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_LOOP_ONLY; break; default: - icbp->icb_xfwoptions |= ICBXOPT_LOOP_2_PTP; + /* + * Let NVRAM settings define it if they are sane + */ + switch (icbp->icb_xfwoptions & ICBXOPT_TOPO_MASK) { + case ICBXOPT_PTP_2_LOOP: + case ICBXOPT_PTP_ONLY: + case ICBXOPT_LOOP_ONLY: + case ICBXOPT_LOOP_2_PTP: + break; + default: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; + icbp->icb_xfwoptions |= ICBXOPT_LOOP_2_PTP; + } break; } if (IS_2200(isp)) { @@ -1737,15 +1767,24 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_xfwoptions |= ICBXOPT_ZIO; icbp->icb_idelaytimer = 10; } + icbp->icb_zfwoptions = fcp->isp_zfwoptions; if (isp->isp_confopts & ISP_CFG_ONEGB) { + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; icbp->icb_zfwoptions |= ICBZOPT_RATE_ONEGB; } else if (isp->isp_confopts & ISP_CFG_TWOGB) { + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; icbp->icb_zfwoptions |= ICBZOPT_RATE_TWOGB; } else { - icbp->icb_zfwoptions |= ICBZOPT_RATE_AUTO; - } - if (fcp->isp_zfwoptions & ICBZOPT_50_OHM) { - icbp->icb_zfwoptions |= ICBZOPT_50_OHM; + switch (icbp->icb_zfwoptions & ICBZOPT_RATE_MASK) { + case ICBZOPT_RATE_ONEGB: + case ICBZOPT_RATE_TWOGB: + case ICBZOPT_RATE_AUTO: + break; + default: + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; + icbp->icb_zfwoptions |= ICBZOPT_RATE_AUTO; + break; + } } } } @@ -1915,16 +1954,13 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_execthrottle = ICB_DFLT_THROTTLE; } + /* + * Set target exchange count. Take half if we are supporting both roles. + */ if (icbp->icb_fwoptions1 & ICB2400_OPT1_TGT_ENABLE) { - /* - * Get current resource count - */ - MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - return; - } - icbp->icb_xchgcnt = mbs.param[3]; + icbp->icb_xchgcnt = isp->isp_maxcmds; + if ((icbp->icb_fwoptions1 & ICB2400_OPT1_INI_DISABLE) == 0) + icbp->icb_xchgcnt >>= 1; } @@ -2511,15 +2547,12 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i MBSINIT(&mbs, MBOX_GET_PORT_NAME, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 500000); if (ISP_CAP_2KLOGIN(isp)) { mbs.param[1] = loopid; - mbs.ibits = (1 << 10); if (nodename) { mbs.param[10] = 1; } - if (ISP_CAP_MULTI_ID(isp)) { - mbs.ibits |= (1 << 9); - mbs.param[9] = chan; - } + mbs.param[9] = chan; } else { + mbs.ibits = 3; mbs.param[1] = loopid << 8; if (nodename) { mbs.param[1] |= 1; @@ -7013,7 +7046,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x00, 0x00), /* 0x3f: */ ISP_FC_OPMAP(0x03, 0x01), /* 0x40: MBOX_LOOP_PORT_BYPASS */ ISP_FC_OPMAP(0x03, 0x01), /* 0x41: MBOX_LOOP_PORT_ENABLE */ - ISP_FC_OPMAP_HALF(0x3, 0xcf, 0x0, 0x07), /* 0x42: MBOX_GET_RESOURCE_COUNT */ + ISP_FC_OPMAP_HALF(0x0, 0x01, 0x3, 0xcf), /* 0x42: MBOX_GET_RESOURCE_COUNT */ ISP_FC_OPMAP(0x01, 0x01), /* 0x43: MBOX_REQUEST_OFFLINE_MODE */ ISP_FC_OPMAP(0x00, 0x00), /* 0x44: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x45: */ @@ -7053,7 +7086,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ ISP_FC_OPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ - ISP_FC_OPMAP(0x03, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ + ISP_FC_OPMAP_HALF(0x6, 0x03, 0x0, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ ISP_FC_OPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:45:36 2012 (r240010) @@ -2202,6 +2202,7 @@ isp_handle_platform_atio7(ispsoftc_t *is tstate_t *tptr; struct ccb_accept_tio *atiop; atio_private_data_t *atp = NULL; + atio_private_data_t *oatp; inot_private_data_t *ntp; did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; @@ -2296,6 +2297,7 @@ isp_handle_platform_atio7(ispsoftc_t *is * it and go to noresrc. */ if (tptr->restart_queue) { + isp_prt(isp, ISP_LOGTDEBUG0, "%s: restart queue refilling", __func__); if (restart_queue) { ntp = tptr->restart_queue; tptr->restart_queue = restart_queue; @@ -2332,15 +2334,15 @@ isp_handle_platform_atio7(ispsoftc_t *is isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] out of atps", aep->at_rxid); goto noresrc; } - if (isp_get_atpd(isp, tptr, aep->at_rxid)) { - isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] tag wraparound in isp_handle_platforms_atio7 (N-Port Handle 0x%04x S_ID 0x%04x OX_ID 0x%04x)\n", - aep->at_rxid, nphdl, sid, aep->at_hdr.ox_id); + oatp = isp_get_atpd(isp, tptr, aep->at_rxid); + if (oatp) { + isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] tag wraparound in isp_handle_platforms_atio7 (N-Port Handle 0x%04x S_ID 0x%04x OX_ID 0x%04x) oatp state %d\n", + aep->at_rxid, nphdl, sid, aep->at_hdr.ox_id, oatp->state); /* * It's not a "no resource" condition- but we can treat it like one */ goto noresrc; } - atp->tag = aep->at_rxid; atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); @@ -2386,6 +2388,7 @@ isp_handle_platform_atio7(ispsoftc_t *is atp->nphdl = nphdl; atp->portid = sid; atp->oxid = aep->at_hdr.ox_id; + atp->rxid = aep->at_hdr.rx_id; atp->cdb0 = atiop->cdb_io.cdb_bytes[0]; atp->tattr = aep->at_cmnd.fcp_cmnd_task_attribute & FCP_CMND_TASK_ATTR_MASK; atp->state = ATPD_STATE_CAM; Modified: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:45:36 2012 (r240010) @@ -61,7 +61,7 @@ #include "opt_isp.h" #define ISP_PLATFORM_VERSION_MAJOR 7 -#define ISP_PLATFORM_VERSION_MINOR 0 +#define ISP_PLATFORM_VERSION_MINOR 10 /* * Efficiency- get rid of SBus code && tests unless we need them. @@ -85,13 +85,14 @@ typedef struct { uint32_t orig_datalen; uint32_t bytes_xfered; uint32_t last_xframt; - uint32_t tag; + uint32_t tag; /* typically f/w RX_ID */ uint32_t lun; uint32_t nphdl; uint32_t sid; uint32_t portid; + uint16_t rxid; /* wire rxid */ + uint16_t oxid; /* wire oxid */ uint32_t - oxid : 16, cdb0 : 8, : 1, dead : 1, Modified: stable/9/sys/dev/isp/isp_pci.c ============================================================================== --- stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 14:45:36 2012 (r240010) @@ -374,6 +374,7 @@ static devclass_t isp_devclass; DRIVER_MODULE(isp, pci, isp_pci_driver, isp_devclass, 0, 0); MODULE_DEPEND(isp, cam, 1, 1, 1); MODULE_DEPEND(isp, firmware, 1, 1, 1); +static int isp_nvports = 0; static int isp_pci_probe(device_t dev) @@ -451,7 +452,7 @@ isp_pci_probe(device_t dev) } static void -isp_get_generic_options(device_t dev, ispsoftc_t *isp, int *nvp) +isp_get_generic_options(device_t dev, ispsoftc_t *isp) { int tval; @@ -483,12 +484,10 @@ isp_get_generic_options(device_t dev, is if (bootverbose) { isp->isp_dblev |= ISP_LOGCONFIG|ISP_LOGINFO; } - tval = 0; + tval = -1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "vports", &tval); if (tval > 0 && tval < 127) { - *nvp = tval; - } else { - *nvp = 0; + isp_nvports = tval; } tval = 1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "autoconfig", &tval); @@ -527,7 +526,7 @@ static void isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) { const char *sptr; - int tval; + int tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "iid", &tval)) { if (IS_FC(isp)) { @@ -648,7 +647,6 @@ static int isp_pci_attach(device_t dev) { int i, m1, m2, locksetup = 0; - int isp_nvports = 0; uint32_t data, cmd, linesz, did; struct isp_pcisoftc *pcs; ispsoftc_t *isp; @@ -670,7 +668,8 @@ isp_pci_attach(device_t dev) /* * Get Generic Options */ - isp_get_generic_options(dev, isp, &isp_nvports); + isp_nvports = 0; + isp_get_generic_options(dev, isp); /* * Check to see if options have us disabled @@ -876,21 +875,16 @@ isp_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ - cmd |= PCIM_CMD_SEREN | PCIM_CMD_PERRESPEN | - PCIM_CMD_BUSMASTEREN | PCIM_CMD_INVEN; - + cmd |= PCIM_CMD_SEREN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_INVEN; if (IS_2300(isp)) { /* per QLogic errata */ cmd &= ~PCIM_CMD_INVEN; } - if (IS_2322(isp) || pci_get_devid(dev) == PCI_QLOGIC_ISP6312) { cmd &= ~PCIM_CMD_INTX_DISABLE; } - if (IS_24XX(isp)) { cmd &= ~PCIM_CMD_INTX_DISABLE; } - pci_write_config(dev, PCIR_COMMAND, cmd, 2); /* Modified: stable/9/sys/dev/isp/ispmbox.h ============================================================================== --- stable/9/sys/dev/isp/ispmbox.h Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/ispmbox.h Sun Sep 2 14:45:36 2012 (r240010) @@ -851,21 +851,36 @@ typedef struct { #define ISP2400_FW_ATTR_EXPFW 0x2000 #define ISP2400_FW_ATTR_EXTNDED 0x8000 -#define ISP_CAP_FCTAPE(isp) \ - (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_FCTAPE)) +/* + * These are either manifestly true or are dependent on f/w attributes + */ #define ISP_CAP_TMODE(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_TMODE)) #define ISP_CAP_SCCFW(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_SCCLUN)) #define ISP_CAP_2KLOGIN(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_2KLOGINS)) + +/* + * This is only true for 24XX cards with this f/w attribute + */ #define ISP_CAP_MULTI_ID(isp) \ (IS_24XX(isp)? (isp->isp_fwattr & ISP2400_FW_ATTR_MULTIID) : 0) - #define ISP_GET_VPIDX(isp, tag) \ (ISP_CAP_MULTI_ID(isp) ? tag : 0) /* + * This is true manifestly or is dependent on a f/w attribute + * but may or may not actually be *enabled*. In any case, it + * is enabled on a per-channel basis. + */ +#define ISP_CAP_FCTAPE(isp) \ + (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_FCTAPE)) + +#define ISP_FCTAPE_ENABLED(isp, chan) \ + (IS_24XX(isp)? (FCPARAM(isp, chan)->isp_xfwoptions & ICB2400_OPT2_FCTAPE) != 0 : (FCPARAM(isp, chan)->isp_xfwoptions & ICBXOPT_FCTAPE) != 0) + +/* * Reduced Interrupt Operation Response Queue Entries */ Modified: stable/9/sys/dev/isp/ispvar.h ============================================================================== --- stable/9/sys/dev/isp/ispvar.h Sun Sep 2 14:44:09 2012 (r240009) +++ stable/9/sys/dev/isp/ispvar.h Sun Sep 2 14:45:36 2012 (r240010) @@ -678,7 +678,7 @@ struct ispsoftc { #define ISP_RUNSTATE 4 /* - * ISP Configuration Options + * ISP Runtime Configuration Options */ #define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ #define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:46:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B20F1106567A; Sun, 2 Sep 2012 14:46:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3428FC08; Sun, 2 Sep 2012 14:46:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82EkJ7I019418; Sun, 2 Sep 2012 14:46:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82EkJIP019410; Sun, 2 Sep 2012 14:46:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209021446.q82EkJIP019410@svn.freebsd.org> From: Dimitry Andric Date: Sun, 2 Sep 2012 14:46: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: r240011 - in head/sys: conf gnu/fs/xfs gnu/fs/xfs/FreeBSD modules/xfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 14:46:19 -0000 Author: dim Date: Sun Sep 2 14:46:18 2012 New Revision: 240011 URL: http://svn.freebsd.org/changeset/base/240011 Log: Partially revert r239959, after actually fixing most of the clang warnings in sys/gnu/fs/xfs. The only warnings that still need to be suppressed are those about array bound overruns of flexible array members in xfs_dir2_{block,sf}.c, which are too expensive (in terms of cascading code changes) to fix. MFC after: 1 week X-MFC-With: r239959 Modified: head/sys/conf/files head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c head/sys/gnu/fs/xfs/xfs_alloc.c head/sys/gnu/fs/xfs/xfs_vfsops.c head/sys/modules/xfs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/conf/files Sun Sep 2 14:46:18 2012 (r240011) @@ -3608,7 +3608,7 @@ xdr/xdr_reference.c optional krpc | nfs xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd # gnu/fs/xfs/xfs_alloc.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ warning "kernel contains GPL contaminated xfs filesystem" gnu/fs/xfs/xfs_alloc_btree.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" @@ -3627,7 +3627,7 @@ gnu/fs/xfs/xfs_da_btree.c optional xfs \ gnu/fs/xfs/xfs_dir.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_block.c optional xfs \ compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_data.c optional xfs \ @@ -3685,7 +3685,7 @@ gnu/fs/xfs/xfs_trans_item.c optional xfs gnu/fs/xfs/xfs_utils.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_vfsops.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_vnodeops.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_rw.c optional xfs \ @@ -3715,9 +3715,9 @@ gnu/fs/xfs/FreeBSD/xfs_globals.c optiona gnu/fs/xfs/FreeBSD/xfs_dmistubs.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_super.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_stats.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_vfs.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_vnode.c optional xfs \ @@ -3727,7 +3727,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1249,7 +1249,6 @@ xfs_ioc_xattr( XFS_AT_NEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1287,7 +1286,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } @@ -1296,7 +1294,6 @@ xfs_ioc_xattr( XFS_AT_ANEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1347,7 +1344,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Sun Sep 2 14:46:18 2012 (r240011) @@ -65,7 +65,7 @@ xfs_read_xfsstats( }; for (i=j=len = 0; i < sizeof(xstats)/sizeof(struct xstats_entry); i++) { - len += sprintf(buffer + len, xstats[i].desc); + len += sprintf(buffer + len, "%s", xstats[i].desc); /* inner loop does each group */ while (j < xstats[i].endpoint) { len += sprintf(buffer + len, " %u", Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Sun Sep 2 14:46:18 2012 (r240011) @@ -251,7 +251,7 @@ xfs_blkdev_issue_flush( int init_xfs_fs( void ) { - static char message[] = + static const char message[] = XFS_VERSION_STRING " with " XFS_BUILD_OPTIONS " enabled\n"; printf(message); Modified: head/sys/gnu/fs/xfs/xfs_alloc.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_alloc.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/xfs_alloc.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1479,8 +1479,10 @@ xfs_alloc_ag_vextent_small( /* * Can't allocate from the freelist for some reason. */ - else + else { + fbno = NULLAGBLOCK; flen = 0; + } /* * Can't do the allocation, give up. */ Modified: head/sys/gnu/fs/xfs/xfs_vfsops.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_vfsops.c Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/gnu/fs/xfs/xfs_vfsops.c Sun Sep 2 14:46:18 2012 (r240011) @@ -1954,7 +1954,7 @@ xfs_showargs( for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { if (mp->m_flags & xfs_infop->flag) - sbuf_printf(m, xfs_infop->str); + sbuf_printf(m, "%s", xfs_infop->str); } if (mp->m_flags & XFS_MOUNT_IHASHSIZE) Modified: head/sys/modules/xfs/Makefile ============================================================================== --- head/sys/modules/xfs/Makefile Sun Sep 2 14:45:36 2012 (r240010) +++ head/sys/modules/xfs/Makefile Sun Sep 2 14:46:18 2012 (r240011) @@ -84,12 +84,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/F -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \ -I${.CURDIR}/../../gnu/fs/xfs -CWARNFLAGS.xfs_alloc.c= ${NO_WSOMETIMES_UNINITIALIZED} -CWARNFLAGS.xfs_dir2.c= ${NO_WARRAY_BOUNDS} CWARNFLAGS.xfs_dir2_block.c= ${NO_WARRAY_BOUNDS} CWARNFLAGS.xfs_dir2_sf.c= ${NO_WARRAY_BOUNDS} -CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN} -CWARNFLAGS.xfs_stats.c= ${NO_WFORMAT_SECURITY} -CWARNFLAGS.xfs_super.c= ${NO_WFORMAT_SECURITY} -CWARNFLAGS.xfs_vfsops.c= ${NO_WFORMAT_SECURITY} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:46:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4D7F1065789; Sun, 2 Sep 2012 14:46:30 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFAD28FC0C; Sun, 2 Sep 2012 14:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82EkUsG019477; Sun, 2 Sep 2012 14:46:30 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82EkULL019475; Sun, 2 Sep 2012 14:46:30 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021446.q82EkULL019475@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 14:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240012 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:46:31 -0000 Author: mjacob Date: Sun Sep 2 14:46:30 2012 New Revision: 240012 URL: http://svn.freebsd.org/changeset/base/240012 Log: MFC of 237544 Unbreak register tests for parallel SCSI. Modified: stable/9/sys/dev/isp/isp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 14:46:18 2012 (r240011) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 14:46:30 2012 (r240012) @@ -710,8 +710,11 @@ isp_reset(ispsoftc_t *isp, int do_load_d 0x6666, 0x6677, 0x1122, 0x33ff, 0x0000, 0x0001, 0x1000, 0x1010, }; + int nmbox = ISP_NMBOX(isp); + if (IS_SCSI(isp)) + nmbox = 6; MBSINIT(&mbs, MBOX_MAILBOX_REG_TEST, MBLOGALL, 0); - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { mbs.param[i] = patterns[i]; } isp_mboxcmd(isp, &mbs); @@ -719,7 +722,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_RESET0(isp); return; } - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { if (mbs.param[i] != patterns[i]) { ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 14:56:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 336BA106566B; Sun, 2 Sep 2012 14:56:05 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0466A8FC08; Sun, 2 Sep 2012 14:56:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82Eu4jT020969; Sun, 2 Sep 2012 14:56:04 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82Eu4SD020966; Sun, 2 Sep 2012 14:56:04 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021456.q82Eu4SD020966@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 14:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240013 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 14:56:05 -0000 Author: mjacob Date: Sun Sep 2 14:56:04 2012 New Revision: 240013 URL: http://svn.freebsd.org/changeset/base/240013 Log: A belated MFC of 227126 Implement the sysctl's for fibre channel that are listed in the man page. Modified: stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:46:30 2012 (r240012) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:56:04 2012 (r240013) @@ -175,6 +175,14 @@ isp_attach_chan(ispsoftc_t *isp, struct isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); } #endif + if (chan == 0) { + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(isp->isp_osinfo.dev); + struct sysctl_oid *tree = device_get_sysctl_tree(isp->isp_osinfo.dev); + SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwnn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwnn, "World Wide Node Name"); + SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwpn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwpn, "World Wide Port Name"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_limit", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->loop_down_limit, 0, "Loop Down Limit"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "gone_device_time", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->gone_device_time, 0, "Gone Device Time"); + } } return (0); } Modified: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:46:30 2012 (r240012) +++ stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:56:04 2012 (r240013) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:00:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C41FF106566B; Sun, 2 Sep 2012 15:00:35 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE2488FC12; Sun, 2 Sep 2012 15:00:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F0Z8P021538; Sun, 2 Sep 2012 15:00:35 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F0Z0W021535; Sun, 2 Sep 2012 15:00:35 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021500.q82F0Z0W021535@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240014 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:00:35 -0000 Author: mjacob Date: Sun Sep 2 15:00:35 2012 New Revision: 240014 URL: http://svn.freebsd.org/changeset/base/240014 Log: MFC of 228914 Fix target mode compilation issues that arose after a change in the sense data structures. Modified: stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:56:04 2012 (r240013) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:00:35 2012 (r240014) @@ -3248,10 +3248,10 @@ isptargstart(struct cam_periph *periph, xpt_print(atio->ccb_h.path, "[0x%x] Non-Zero Lun %d: cdb0=0x%x\n", atio->tag_id, return_lun, cdb[0]); if (cdb[0] != INQUIRY && cdb[0] != REPORT_LUNS && cdb[0] != REQUEST_SENSE) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST; - atio->sense_data.add_sense_code = 0x25; - atio->sense_data.add_sense_code_qual = 0x0; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST; + SDFIXED(atio->sense_data)->add_sense_code = 0x25; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0; + atio->sense_len = SSD_MIN_SIZE; } return_lun = CAM_LUN_WILDCARD; } @@ -3275,10 +3275,10 @@ isptargstart(struct cam_periph *periph, case READ_16: if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; } else { #ifdef ISP_FORCE_TIMEOUT { @@ -3314,10 +3314,10 @@ isptargstart(struct cam_periph *periph, case WRITE_16: if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; } else { #ifdef ISP_FORCE_TIMEOUT { @@ -3351,10 +3351,10 @@ isptargstart(struct cam_periph *periph, flags |= CAM_DIR_IN; if (cdb[1] || cdb[2] || cdb[3]) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x20; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20; + atio->sense_len = SSD_MIN_SIZE; break; } data_len = sizeof (iqd); @@ -3375,10 +3375,10 @@ isptargstart(struct cam_periph *periph, if (ca) { ca = 0; status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x28; - atio->sense_data.add_sense_code_qual = 0x0; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x28; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0; + atio->sense_len = SSD_MIN_SIZE; } break; case SYNCHRONIZE_CACHE: @@ -3393,10 +3393,10 @@ isptargstart(struct cam_periph *periph, flags |= CAM_DIR_IN; if (cdb[2] || cdb[3] || cdb[4] || cdb[5]) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; break; } if (cdb[8] & 0x1) { /* PMI */ @@ -3447,10 +3447,10 @@ isptargstart(struct cam_periph *periph, default: flags |= CAM_DIR_NONE; status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x20; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20; + atio->sense_len = SSD_MIN_SIZE; break; } Modified: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:56:04 2012 (r240013) +++ stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 15:00:35 2012 (r240014) @@ -76,6 +76,13 @@ #define ISP_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE #ifdef ISP_TARGET_MODE +/* Not quite right, but there was no bump for this change */ +#if __FreeBSD_version < 225469 +#define SDFIXED(x) (&x) +#else +#define SDFIXED(x) ((struct scsi_sense_data_fixed *)(&x)) +#endif + #define ISP_TARGET_FUNCTIONS 1 #define ATPDPSIZE 4096 From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:03:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18F2D106566B; Sun, 2 Sep 2012 15:03:41 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0149E8FC08; Sun, 2 Sep 2012 15:03:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F3eDB021989; Sun, 2 Sep 2012 15:03:40 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F3emK021986; Sun, 2 Sep 2012 15:03:40 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021503.q82F3emK021986@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240015 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:03:41 -0000 Author: mjacob Date: Sun Sep 2 15:03:40 2012 New Revision: 240015 URL: http://svn.freebsd.org/changeset/base/240015 Log: MFC of 238859 Mega change for FC-Tape. Modified: stable/9/sys/dev/isp/isp.c stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h stable/9/sys/dev/isp/isp_library.c stable/9/sys/dev/isp/isp_library.h stable/9/sys/dev/isp/isp_pci.c stable/9/sys/dev/isp/isp_stds.h stable/9/sys/dev/isp/isp_target.c stable/9/sys/dev/isp/isp_target.h stable/9/sys/dev/isp/ispmbox.h stable/9/sys/dev/isp/ispvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 15:00:35 2012 (r240014) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 15:03:40 2012 (r240015) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); */ #define MBOX_DELAY_COUNT 1000000 / 100 #define ISP_MARK_PORTDB(a, b, c) \ - isp_prt(isp, ISP_LOGSANCFG, \ + isp_prt(isp, ISP_LOG_SANCFG, \ "Chan %d ISP_MARK_PORTDB@LINE %d", b, __LINE__); \ isp_mark_portdb(a, b, c) @@ -670,8 +670,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_DELAY(100); if (--loops < 0) { ISP_RESET0(isp); - isp_prt(isp, ISP_LOGERR, - "MBOX_BUSY never cleared on reset"); + isp_prt(isp, ISP_LOGERR, "MBOX_BUSY never cleared on reset"); return; } } @@ -1715,6 +1714,25 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_xfwoptions = fcp->isp_xfwoptions; + if (ISP_CAP_FCTAPE(isp)) { + if (isp->isp_confopts & ISP_CFG_NOFCTAPE) + icbp->icb_xfwoptions &= ~ICBXOPT_FCTAPE; + + if (isp->isp_confopts & ISP_CFG_FCTAPE) + icbp->icb_xfwoptions |= ICBXOPT_FCTAPE; + + if (icbp->icb_xfwoptions & ICBXOPT_FCTAPE) { + icbp->icb_fwoptions &= ~ICBOPT_FULL_LOGIN; /* per documents */ + icbp->icb_xfwoptions |= ICBXOPT_FCTAPE_CCQ|ICBXOPT_FCTAPE_CONFIRM; + FCPARAM(isp, 0)->fctape_enabled = 1; + } else { + FCPARAM(isp, 0)->fctape_enabled = 0; + } + } else { + icbp->icb_xfwoptions &= ~ICBXOPT_FCTAPE; + FCPARAM(isp, 0)->fctape_enabled = 0; + } + /* * Prefer or force Point-To-Point instead Loop? */ @@ -1804,6 +1822,9 @@ isp_fibre_init(ispsoftc_t *isp) if (ISP_FW_NEWER_THAN(isp, 3, 16, 0)) { mbs.param[1] |= IFCOPT1_EQFQASYNC|IFCOPT1_CTIO_RETRY; if (fcp->role & ISP_ROLE_TARGET) { + if (ISP_FW_NEWER_THAN(isp, 3, 25, 0)) { + mbs.param[1] |= IFCOPT1_ENAPURE; + } mbs.param[3] = IFCOPT3_NOPRLI; } } @@ -1813,8 +1834,15 @@ isp_fibre_init(ispsoftc_t *isp) } } icbp->icb_logintime = ICB_LOGIN_TOV; - icbp->icb_lunetimeout = ICB_LUN_ENABLE_TOV; +#ifdef ISP_TARGET_MODE + if (ISP_FW_NEWER_THAN(isp, 3, 25, 0) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) { + icbp->icb_lunenables = 0xffff; + icbp->icb_ccnt = DFLT_CMND_CNT; + icbp->icb_icnt = DFLT_INOT_CNT; + icbp->icb_lunetimeout = ICB_LUN_ENABLE_TOV; + } +#endif if (fcp->isp_wwnn && fcp->isp_wwpn && (fcp->isp_wwnn >> 60) != 2) { icbp->icb_fwoptions |= ICBOPT_BOTH_WWNS; MAKE_NODE_NAME_FROM_WWN(icbp->icb_nodename, fcp->isp_wwnn); @@ -1910,7 +1938,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) } } if (chan == isp->isp_nchan) { - isp_prt(isp, ISP_LOGDEBUG0, "all %d channels with role 'none'", chan); + isp_prt(isp, ISP_LOG_WARN1, "all %d channels with role 'none'", chan); isp->isp_state = ISP_INITSTATE; return; } @@ -1978,6 +2006,19 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; icbp->icb_fwoptions2 = fcp->isp_xfwoptions; + if (isp->isp_confopts & ISP_CFG_NOFCTAPE) { + icbp->icb_fwoptions2 &= ~ICB2400_OPT2_FCTAPE; + } + if (isp->isp_confopts & ISP_CFG_FCTAPE) { + icbp->icb_fwoptions2 |= ICB2400_OPT2_FCTAPE; + } + + if (icbp->icb_fwoptions2 & ICB2400_OPT2_FCTAPE) { + FCPARAM(isp, chan)->fctape_enabled = 1; + } else { + FCPARAM(isp, chan)->fctape_enabled = 0; + } + switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { case ISP_CFG_NPORT_ONLY: icbp->icb_fwoptions2 &= ~ICB2400_OPT2_TOPO_MASK; @@ -2336,13 +2377,13 @@ isp_plogx(ispsoftc_t *isp, int chan, uin msg = buf; break; case PLOGX_IOCBERR_PORTUSED: - lev = ISP_LOGSANCFG|ISP_LOGDEBUG0; + lev = ISP_LOG_SANCFG|ISP_LOG_WARN1; ISP_SNPRINTF(buf, sizeof (buf), "already logged in with N-Port handle 0x%x", parm1); msg = buf; rval = MBOX_PORT_ID_USED | (parm1 << 16); break; case PLOGX_IOCBERR_HNDLUSED: - lev = ISP_LOGSANCFG|ISP_LOGDEBUG0; + lev = ISP_LOG_SANCFG|ISP_LOG_WARN1; ISP_SNPRINTF(buf, sizeof (buf), "handle already used for PortID 0x%06x", parm1); msg = buf; rval = MBOX_LOOP_ID_USED; @@ -2388,35 +2429,26 @@ isp_port_login(ispsoftc_t *isp, uint16_t switch (mbs.param[0]) { case MBOX_PORT_ID_USED: - isp_prt(isp, ISP_LOGDEBUG0, - "isp_port_login: portid 0x%06x already logged in as %u", - portid, mbs.param[1]); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: portid 0x%06x already logged in as %u", portid, mbs.param[1]); return (MBOX_PORT_ID_USED | (mbs.param[1] << 16)); case MBOX_LOOP_ID_USED: - isp_prt(isp, ISP_LOGDEBUG0, - "isp_port_login: handle 0x%04x in use for port id 0x%02xXXXX", - handle, mbs.param[1] & 0xff); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: handle 0x%04x in use for port id 0x%02xXXXX", handle, mbs.param[1] & 0xff); return (MBOX_LOOP_ID_USED); case MBOX_COMMAND_COMPLETE: return (0); case MBOX_COMMAND_ERROR: - isp_prt(isp, ISP_LOGINFO, - "isp_port_login: error 0x%x in PLOGI to port 0x%06x", - mbs.param[1], portid); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: error 0x%x in PLOGI to port 0x%06x", mbs.param[1], portid); return (MBOX_COMMAND_ERROR); case MBOX_ALL_IDS_USED: - isp_prt(isp, ISP_LOGINFO, - "isp_port_login: all IDs used for fabric login"); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: all IDs used for fabric login"); return (MBOX_ALL_IDS_USED); default: - isp_prt(isp, ISP_LOGINFO, - "isp_port_login: error 0x%x on port login of 0x%06x@0x%0x", - mbs.param[0], portid, handle); + isp_prt(isp, ISP_LOG_SANCFG, "isp_port_login: error 0x%x on port login of 0x%06x@0x%0x", mbs.param[0], portid, handle); return (mbs.param[0]); } } @@ -2483,16 +2515,12 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui if (IS_24XX(isp)) { isp_get_pdb_24xx(isp, fcp->isp_scratch, &un.bill); pdb->handle = un.bill.pdb_handle; - pdb->s3_role = un.bill.pdb_prli_svc3; + pdb->prli_word3 = un.bill.pdb_prli_svc3; pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Port 0x%06x flags 0x%x curstate %x", - chan, pdb->portid, un.bill.pdb_flags, - un.bill.pdb_curstate); - if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || - un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Port 0x%06x flags 0x%x curstate %x", chan, pdb->portid, un.bill.pdb_flags, un.bill.pdb_curstate); + if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { mbs.param[0] = MBOX_NOT_LOGGED_IN; if (dolock) { FC_SCRATCH_RELEASE(isp, chan); @@ -2502,7 +2530,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui } else { isp_get_pdb_21xx(isp, fcp->isp_scratch, &un.fred); pdb->handle = un.fred.pdb_loopid; - pdb->s3_role = un.fred.pdb_prli_svc3; + pdb->prli_word3 = un.fred.pdb_prli_svc3; pdb->portid = BITS2WORD(un.fred.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.fred.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.fred.pdb_nodename, 8); @@ -2528,7 +2556,7 @@ isp_dump_chip_portdb(ispsoftc_t *isp, in if (isp_getpdb(isp, chan, loopid, &pdb, dolock)) { continue; } - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGINFO, "Chan %d Loopid 0x%04x " + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d Loopid 0x%04x " "PortID 0x%06x WWPN 0x%02x%02x%02x%02x%02x%02x%02x%02x", chan, loopid, pdb.portid, pdb.portname[0], pdb.portname[1], pdb.portname[2], pdb.portname[3], pdb.portname[4], @@ -2606,7 +2634,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d FC Link Test Entry", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Link Test Entry", chan); ISP_MARK_PORTDB(isp, chan, 1); /* @@ -2622,7 +2650,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha GET_NANOTIME(&hra); isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { - isp_prt(isp, ISP_LOGCONFIG|ISP_LOGSANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); + isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); lwfs = fcp->isp_fwstate; } if (fcp->isp_fwstate == FW_READY) { @@ -2673,7 +2701,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha * If we haven't gone to 'ready' state, return. */ if (fcp->isp_fwstate != FW_READY) { - isp_prt(isp, ISP_LOGSANCFG, "%s: chan %d not at FW_READY state", __func__, chan); + isp_prt(isp, ISP_LOG_SANCFG, "%s: chan %d not at FW_READY state", __func__, chan); return (-1); } @@ -2738,7 +2766,9 @@ isp_fclink_test(ispsoftc_t *isp, int cha } } if (alpa_map[i] && fcp->isp_loopid != i) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d deriving loopid %d from AL_PA map (AL_PA 0x%x) and ignoring returned value %d (AL_PA 0x%x)", chan, i, alpa_map[i], fcp->isp_loopid, alpa); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d deriving loopid %d from AL_PA map (AL_PA 0x%x) and ignoring returned value %d (AL_PA 0x%x)", + chan, i, alpa_map[i], fcp->isp_loopid, alpa); fcp->isp_loopid = i; } } @@ -2778,18 +2808,17 @@ isp_fclink_test(ispsoftc_t *isp, int cha lp->state = FC_PORTDB_STATE_PENDING_VALID; MAKE_WWN_FROM_NODE_NAME(lp->node_wwn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(lp->port_wwn, pdb.portname); - lp->roles = (pdb.s3_role & SVC3_ROLE_MASK) >> SVC3_ROLE_SHIFT; + lp->prli_word3 = pdb.prli_word3; lp->portid = pdb.portid; lp->handle = pdb.handle; lp->new_portid = lp->portid; - lp->new_roles = lp->roles; + lp->new_prli_word3 = lp->prli_word3; if (IS_24XX(isp)) { if (check_for_fabric) { /* * The mbs is still hanging out from the MBOX_GET_LOOP_ID above. */ fcp->isp_fabric_params = mbs.param[7]; - isp_prt(isp, ISP_LOGCONFIG, "fabric params 0x%x", mbs.param[7]); } else { fcp->isp_fabric_params = 0; } @@ -2809,7 +2838,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha r = isp_register_fc4_type(isp, chan); } if (r) { - isp_prt(isp, ISP_LOGWARN|ISP_LOGSANCFG, "%s: register fc4 type failed", __func__); + isp_prt(isp, ISP_LOGWARN|ISP_LOG_SANCFG, "%s: register fc4 type failed", __func__); return (-1); } } else { @@ -2843,8 +2872,8 @@ not_on_fabric: /* * Announce ourselves, too. */ - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGCONFIG, topology, chan, (uint32_t) (fcp->isp_wwpn >> 32), (uint32_t) fcp->isp_wwpn, fcp->isp_portid, fcp->isp_loopid, isp_fc_toponame(fcp)); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d FC Link Test Complete", chan); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, topology, chan, (uint32_t) (fcp->isp_wwpn >> 32), (uint32_t) fcp->isp_wwpn, fcp->isp_portid, fcp->isp_loopid, isp_fc_toponame(fcp)); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Link Test Complete", chan); return (0); } @@ -2912,8 +2941,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) } } - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Synchronizing PDBs", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Synchronizing PDBs", chan); fcp->isp_loopstate = LOOP_SYNCING_PDB; @@ -2950,7 +2978,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) } else { lp->autologin = 0; } - lp->new_roles = 0; + lp->new_prli_word3 = 0; lp->new_portid = 0; /* * Note that we might come out of this with our state @@ -2963,13 +2991,12 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) * target id in isp_dev_map (if any). */ lp->portid = lp->new_portid; - lp->roles = lp->new_roles; + lp->prli_word3 = lp->new_prli_word3; lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_ARRIVED, chan, lp); - lp->new_roles = 0; + lp->new_prli_word3 = 0; lp->new_portid = 0; - lp->reserved = 0; - lp->new_reserved = 0; + lp->announced = 0; break; case FC_PORTDB_STATE_CHANGED: /* @@ -2977,14 +3004,13 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) */ lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_CHANGED, chan, lp); - lp->new_roles = 0; + lp->new_prli_word3 = 0; lp->new_portid = 0; - lp->reserved = 0; - lp->new_reserved = 0; + lp->announced = 0; break; case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; - lp->roles = lp->new_roles; + lp->prli_word3 = lp->new_prli_word3; if (lp->dev_map_idx) { int t = lp->dev_map_idx - 1; fcp->isp_dev_map[t] = dbidx + 1; @@ -2992,11 +3018,10 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp); if (dbidx != FL_ID) { - lp->new_roles = 0; + lp->new_prli_word3 = 0; lp->new_portid = 0; } - lp->reserved = 0; - lp->new_reserved = 0; + lp->announced = 0; break; case FC_PORTDB_STATE_ZOMBIE: break; @@ -3054,8 +3079,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) break; case TOPO_FL_PORT: if (IS_24XX(isp) && isp->isp_nchan > 1) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Skipping Local Loop Scan", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Skipping Local Loop Scan", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } @@ -3065,16 +3089,14 @@ isp_scan_loop(ispsoftc_t *isp, int chan) lim = 2; break; default: - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d no loop topology to scan", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d no loop topology to scan", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } fcp->isp_loopstate = LOOP_SCANNING_LOOP; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop 0..%d", chan, lim-1); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop 0..%d", chan, lim-1); /* @@ -3100,8 +3122,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) if (IS_2100(isp) || IS_2200(isp)) { uint64_t node_wwn = isp_get_wwn(isp, chan, handle, 1); if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE (bad)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); return (-1); } if (node_wwn == INI_NONE) { @@ -3119,8 +3140,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) chan, handle, r); if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE (bad)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); return (-1); } continue; @@ -3128,8 +3148,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE (bad)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); return (-1); } @@ -3143,8 +3162,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOGWARN, "Chan %d cannot synchronize port database", chan); ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE (bad)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); return (-1); } @@ -3153,7 +3171,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) */ MAKE_WWN_FROM_NODE_NAME(tmp.node_wwn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(tmp.port_wwn, pdb.portname); - tmp.roles = (pdb.s3_role & SVC3_ROLE_MASK) >> SVC3_ROLE_SHIFT; + tmp.prli_word3 = pdb.prli_word3; tmp.portid = pdb.portid; tmp.handle = pdb.handle; @@ -3192,8 +3210,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) for (i = 0; i < MAX_FC_TARG; i++) { lp = &fcp->portdb[i]; - if (lp->state == FC_PORTDB_STATE_NIL || - lp->target_mode) { + if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) { continue; } if (lp->node_wwn != tmp.node_wwn) { @@ -3214,8 +3231,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) chan, i, lp->state); isp_dump_portdb(isp, chan); ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE (bad)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); return (-1); } @@ -3229,15 +3245,11 @@ isp_scan_loop(ispsoftc_t *isp, int chan) * Check to make see if really still the same * device. If it is, we mark it pending valid. */ - if (lp->portid == tmp.portid && - lp->handle == tmp.handle && - lp->roles == tmp.roles) { + if (lp->portid == tmp.portid && lp->handle == tmp.handle && lp->prli_word3 == tmp.prli_word3) { lp->new_portid = tmp.portid; - lp->new_roles = tmp.roles; + lp->new_prli_word3 = tmp.prli_word3; lp->state = FC_PORTDB_STATE_PENDING_VALID; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Loop Port 0x%06x@0x%04x Pending " - "Valid", chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x Pending Valid", chan, tmp.portid, tmp.handle); break; } @@ -3251,12 +3263,10 @@ isp_scan_loop(ispsoftc_t *isp, int chan) * Claim that this has changed and let somebody else * decide what to do. */ - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Loop Port 0x%06x@0x%04x changed", - chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x changed", chan, tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; - lp->new_roles = tmp.roles; + lp->new_prli_word3 = tmp.prli_word3; break; } @@ -3290,17 +3300,14 @@ isp_scan_loop(ispsoftc_t *isp, int chan) lp->autologin = 1; lp->state = FC_PORTDB_STATE_NEW; lp->new_portid = tmp.portid; - lp->new_roles = tmp.roles; + lp->new_prli_word3 = tmp.prli_word3; lp->handle = tmp.handle; lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Loop Port 0x%06x@0x%04x is New Entry", - chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x is New Entry", chan, tmp.portid, tmp.handle); } fcp->isp_loopstate = LOOP_LSCAN_DONE; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC scan loop DONE", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE", chan); return (0); } @@ -3343,8 +3350,7 @@ isp_gid_ft_sns(ispsoftc_t *isp, int chan sns_gid_ft_req_t *rq = &un._x; mbreg_t mbs; - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d scanning fabric (GID_FT) via SNS", chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d scanning fabric (GID_FT) via SNS", chan); ISP_MEMZERO(rq, SNS_GID_FT_REQ_SIZE); rq->snscb_rblen = GIDLEN >> 1; @@ -3393,8 +3399,7 @@ isp_gid_ft_ct_passthru(ispsoftc_t *isp, uint32_t *rp; uint8_t *scp = fcp->isp_scratch; - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d scanning fabric (GID_FT) via CT", chan); + isp_prt(isp, ISP_LOGDEBUG0, "Chan %d scanning fabric (GID_FT) via CT", chan); if (!IS_24XX(isp)) { return (1); @@ -3488,10 +3493,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC Scan Fabric", chan); - if (fcp->isp_fwstate != FW_READY || - fcp->isp_loopstate < LOOP_LSCAN_DONE) { + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric", chan); + if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_LSCAN_DONE) { return (-1); } if (fcp->isp_loopstate > LOOP_SCANNING_FABRIC) { @@ -3499,8 +3502,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha } if (fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_F_PORT) { fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC Scan Fabric Done (no fabric)", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric Done (no fabric)", chan); return (0); } @@ -3568,9 +3570,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha } if (rs1->snscb_cthdr.ct_cmd_resp != LS_ACC) { int level; - if (rs1->snscb_cthdr.ct_reason == 9 && - rs1->snscb_cthdr.ct_explanation == 7) { - level = ISP_LOGSANCFG|ISP_LOGDEBUG0; + if (rs1->snscb_cthdr.ct_reason == 9 && rs1->snscb_cthdr.ct_explanation == 7) { + level = ISP_LOG_SANCFG; } else { level = ISP_LOGWARN; } @@ -3614,7 +3615,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha "fabric too big for scratch area: increase ISP_FC_SCRLEN"); } portlim = portidx + 1; - isp_prt(isp, ISP_LOGSANCFG, + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d got %d ports back from name server", chan, portlim); for (portidx = 0; portidx < portlim; portidx++) { @@ -3639,9 +3640,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha rs1->snscb_ports[npidx].portid[0] = 0; rs1->snscb_ports[npidx].portid[1] = 0; rs1->snscb_ports[npidx].portid[2] = 0; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d removing duplicate PortID 0x%06x" - " entry from list", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d removing duplicate PortID 0x%06x entry from list", chan, portid); } } @@ -3671,7 +3670,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha ((rs1->snscb_ports[portidx].portid[2])); if (portid == 0) { - isp_prt(isp, ISP_LOGSANCFG, + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d skipping null PortID at idx %d", chan, portidx); continue; @@ -3687,19 +3686,19 @@ isp_scan_fabric(ispsoftc_t *isp, int cha */ if (ISP_CAP_MULTI_ID(isp)) { if ((portid >> 8) == (fcp->isp_portid >> 8)) { - isp_prt(isp, ISP_LOGSANCFG, + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d skip PortID 0x%06x", chan, portid); continue; } } else if (portid == fcp->isp_portid) { - isp_prt(isp, ISP_LOGSANCFG, + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d skip ourselves on @ PortID 0x%06x", chan, portid); continue; } - isp_prt(isp, ISP_LOGSANCFG, + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Checking Fabric Port 0x%06x", chan, portid); /* @@ -3711,8 +3710,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; - if (lp->state != FC_PORTDB_STATE_PROBATIONAL || - lp->target_mode) { + if (lp->state != FC_PORTDB_STATE_PROBATIONAL || lp->target_mode) { continue; } if (lp->portid == portid) { @@ -3754,9 +3752,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (r != 0) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Fabric Port 0x%06x is dead", - chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x is dead", chan, portid); continue; } @@ -3773,7 +3769,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha pdb.portid != portid || wwpn != lp->port_wwn || wwnn != lp->node_wwn) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOG_SANCFG, fconf, chan, dbidx, pdb.handle, pdb.portid, (uint32_t) (wwnn >> 32), (uint32_t) wwnn, (uint32_t) (wwpn >> 32), (uint32_t) wwpn, @@ -3824,7 +3820,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha handle_changed++; } - nr = (pdb.s3_role & SVC3_ROLE_MASK) >> SVC3_ROLE_SHIFT; + nr = pdb.prli_word3; /* * Check to see whether the portid and roles have @@ -3839,17 +3835,12 @@ isp_scan_fabric(ispsoftc_t *isp, int cha */ lp->new_portid = portid; - lp->new_roles = nr; - if (pdb.portid != lp->portid || nr != lp->roles || - handle_changed) { - isp_prt(isp, ISP_LOGSANCFG, - "Chan %d Fabric Port 0x%06x changed", - chan, portid); + lp->new_prli_word3 = nr; + if (pdb.portid != lp->portid || nr != lp->prli_word3 || handle_changed) { + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x changed", chan, portid); lp->state = FC_PORTDB_STATE_CHANGED; } else { - isp_prt(isp, ISP_LOGSANCFG, - "Chan %d Fabric Port 0x%06x " - "Now Pending Valid", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x Now Pending Valid", chan, portid); lp->state = FC_PORTDB_STATE_PENDING_VALID; } continue; @@ -3935,7 +3926,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha handle = pdb.handle; MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); - nr = (pdb.s3_role & SVC3_ROLE_MASK) >> SVC3_ROLE_SHIFT; + nr = pdb.prli_word3; /* * And go through the database *one* more time to make sure @@ -3949,8 +3940,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (fcp->portdb[dbidx].target_mode) { continue; } - if (fcp->portdb[dbidx].node_wwn == wwnn && - fcp->portdb[dbidx].port_wwn == wwpn) { + if (fcp->portdb[dbidx].node_wwn == wwnn && fcp->portdb[dbidx].port_wwn == wwpn) { break; } } @@ -3961,11 +3951,9 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp->node_wwn = wwnn; lp->port_wwn = wwpn; lp->new_portid = portid; - lp->new_roles = nr; + lp->new_prli_word3 = nr; lp->state = FC_PORTDB_STATE_NEW; - isp_prt(isp, ISP_LOGSANCFG, - "Chan %d Fabric Port 0x%06x is a New Entry", - chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x is a New Entry", chan, portid); continue; } @@ -3991,16 +3979,12 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp = &fcp->portdb[dbidx]; lp->handle = handle; lp->new_portid = portid; - lp->new_roles = nr; - if (lp->portid != portid || lp->roles != nr) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Zombie Fabric Port 0x%06x Now Changed", - chan, portid); + lp->new_prli_word3 = nr; + if (lp->portid != portid || lp->prli_word3 != nr) { + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie Fabric Port 0x%06x Now Changed", chan, portid); lp->state = FC_PORTDB_STATE_CHANGED; } else { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Zombie Fabric Port 0x%06x " - "Now Pending Valid", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie Fabric Port 0x%06x Now Pending Valid", chan, portid); lp->state = FC_PORTDB_STATE_PENDING_VALID; } } @@ -4011,8 +3995,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha return (-1); } fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d FC Scan Fabric Done", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric Done", chan); return (0); } @@ -4261,17 +4244,13 @@ isp_register_fc4_type_24xx(ispsoftc_t *i FC_SCRATCH_RELEASE(isp, chan); if (ct->ct_cmd_resp == LS_RJT) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Register FC4 Type rejected", chan); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "Chan %d Register FC4 Type rejected", chan); return (-1); } else if (ct->ct_cmd_resp == LS_ACC) { - isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, - "Chan %d Register FC4 Type accepted", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Register FC4 Type accepted", chan); return (0); } else { - isp_prt(isp, ISP_LOGWARN, - "Chan %d Register FC4 Type: 0x%x", - chan, ct->ct_cmd_resp); + isp_prt(isp, ISP_LOGWARN, "Chan %d Register FC4 Type: 0x%x", chan, ct->ct_cmd_resp); return (-1); } } @@ -4369,6 +4348,7 @@ isp_start(XS_T *xs) fcparam *fcp = FCPARAM(isp, XS_CHANNEL(xs)); if ((fcp->role & ISP_ROLE_INITIATOR) == 0) { + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d I am not an initiator", XS_CHANNEL(xs), target, XS_LUN(xs)); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } @@ -4381,6 +4361,7 @@ isp_start(XS_T *xs) } if (XS_TGT(xs) >= MAX_FC_TARG) { + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d target too big", XS_CHANNEL(xs), target, XS_LUN(xs)); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } @@ -4392,9 +4373,11 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } if (fcp->portdb[hdlidx].state == FC_PORTDB_STATE_ZOMBIE) { + isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d target zombie", XS_CHANNEL(xs), target, XS_LUN(xs)); return (CMD_RQLATER); } if (fcp->portdb[hdlidx].state != FC_PORTDB_STATE_VALID) { + isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), fcp->portdb[hdlidx].state); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } @@ -4403,6 +4386,7 @@ isp_start(XS_T *xs) } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { + isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d I am not an initiator", XS_CHANNEL(xs), target, XS_LUN(xs)); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } @@ -4415,7 +4399,7 @@ isp_start(XS_T *xs) qep = isp_getrqentry(isp); if (qep == NULL) { - isp_prt(isp, ISP_LOGDEBUG0, "Request Queue Overflow"); + isp_prt(isp, ISP_LOG_WARN1, "Request Queue Overflow"); XS_SETERR(xs, HBA_BOTCH); return (CMD_EAGAIN); } @@ -4449,6 +4433,14 @@ isp_start(XS_T *xs) } reqp->req_header.rqs_entry_count = 1; + + /* + * Select and install Header Code. + * Note that it might be overridden before going out + * if we're on a 64 bit platform. The lower level + * code (isp_send_cmd) will select the appropriate + * 64 bit variant if it needs to. + */ if (IS_24XX(isp)) { reqp->req_header.rqs_entry_type = RQSTYPE_T7RQS; } else if (IS_FC(isp)) { @@ -4461,6 +4453,9 @@ isp_start(XS_T *xs) } } + /* + * Set task attributes + */ if (IS_24XX(isp)) { int ttype; if (XS_TAG_P(xs)) { @@ -4513,20 +4508,30 @@ isp_start(XS_T *xs) tptr = &reqp->req_time; /* - * NB: we do not support long CDBs + * NB: we do not support long CDBs (yet) */ cdblen = XS_CDBLEN(xs); if (IS_SCSI(isp)) { + if (cdblen > sizeof (reqp->req_cdb)) { + isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); + XS_SETERR(xs, HBA_BOTCH); + return (CMD_COMPLETE); + } reqp->req_target = target | (XS_CHANNEL(xs) << 7); reqp->req_lun_trn = XS_LUN(xs); - cdblen = ISP_MIN(cdblen, sizeof (reqp->req_cdb)); cdbp = reqp->req_cdb; reqp->req_cdblen = cdblen; } else if (IS_24XX(isp)) { ispreqt7_t *t7 = (ispreqt7_t *)local; fcportdb_t *lp; + if (cdblen > sizeof (t7->req_cdb)) { + isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); + XS_SETERR(xs, HBA_BOTCH); + return (CMD_COMPLETE); + } + lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; t7->req_nphdl = target; t7->req_tidlo = lp->portid; @@ -4537,28 +4542,47 @@ isp_start(XS_T *xs) t7->req_lun[0] |= 0x40; } t7->req_lun[1] = XS_LUN(xs); - FCP_NEXT_CRN(isp, xs, t7->req_crn, XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { + if (FCP_NEXT_CRN(isp, &t7->req_crn, xs)) { + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); + XS_SETERR(xs, HBA_BOTCH); + return (CMD_EAGAIN); + } + } tptr = &t7->req_time; cdbp = t7->req_cdb; - cdblen = ISP_MIN(cdblen, sizeof (t7->req_cdb)); - } else if (ISP_CAP_2KLOGIN(isp)) { - ispreqt2e_t *t2e = (ispreqt2e_t *)local; - t2e->req_target = target; - t2e->req_scclun = XS_LUN(xs); - cdbp = t2e->req_cdb; - cdblen = ISP_MIN(cdblen, sizeof (t2e->req_cdb)); - } else if (ISP_CAP_SCCFW(isp)) { - ispreqt2_t *t2 = (ispreqt2_t *)local; - t2->req_target = target; - t2->req_scclun = XS_LUN(xs); - cdbp = t2->req_cdb; - cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb)); } else { ispreqt2_t *t2 = (ispreqt2_t *)local; - t2->req_target = target; - t2->req_lun_trn = XS_LUN(xs); - cdbp = t2->req_cdb; - cdblen = ISP_MIN(cdblen, sizeof (t2->req_cdb)); + fcportdb_t *lp; + + if (cdblen > sizeof t2->req_cdb) { + isp_prt(isp, ISP_LOGERR, "Command Length %u too long for this chip", cdblen); + XS_SETERR(xs, HBA_BOTCH); + return (CMD_COMPLETE); + } + lp = &FCPARAM(isp, XS_CHANNEL(xs))->portdb[hdlidx]; + if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { + if (FCP_NEXT_CRN(isp, &t2->req_crn, xs)) { + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); + XS_SETERR(xs, HBA_BOTCH); + return (CMD_EAGAIN); + } + } + if (ISP_CAP_2KLOGIN(isp)) { + ispreqt2e_t *t2e = (ispreqt2e_t *)local; + t2e->req_target = target; + t2e->req_scclun = XS_LUN(xs); + cdbp = t2e->req_cdb; + } else if (ISP_CAP_SCCFW(isp)) { + ispreqt2_t *t2 = (ispreqt2_t *)local; + t2->req_target = target; + t2->req_scclun = XS_LUN(xs); + cdbp = t2->req_cdb; + } else { + t2->req_target = target; + t2->req_lun_trn = XS_LUN(xs); + cdbp = t2->req_cdb; + } } ISP_MEMCPY(cdbp, XS_CDBP(xs), cdblen); @@ -4571,7 +4595,7 @@ isp_start(XS_T *xs) } if (isp_allocate_xs(isp, xs, &handle)) { - isp_prt(isp, ISP_LOGDEBUG0, "out of xflist pointers"); + isp_prt(isp, ISP_LOG_WARN1, "out of xflist pointers"); XS_SETERR(xs, HBA_BOTCH); return (CMD_EAGAIN); } @@ -4618,7 +4642,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct * Issue a bus reset. */ if (IS_24XX(isp)) { - isp_prt(isp, ISP_LOGWARN, "RESET BUS NOT IMPLEMENTED"); + isp_prt(isp, ISP_LOGERR, "BUS RESET NOT IMPLEMENTED"); break; } else if (IS_FC(isp)) { mbs.param[1] = 10; @@ -4639,8 +4663,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { break; } - isp_prt(isp, ISP_LOGINFO, - "driver initiated bus reset of bus %d", chan); + isp_prt(isp, ISP_LOGINFO, "driver initiated bus reset of bus %d", chan); return (0); case ISPCTL_RESET_DEV: @@ -4658,17 +4681,12 @@ isp_control(ispsoftc_t *isp, ispctl_t ct hdlidx = fcp->isp_dev_map[tgt] - 1; if (hdlidx < 0 || hdlidx >= MAX_FC_TARG) { - isp_prt(isp, ISP_LOGWARN, - "Chan %d bad handle %d trying to reset" - "target %d", chan, hdlidx, tgt); + isp_prt(isp, ISP_LOGWARN, "Chan %d bad handle %d trying to reset target %d", chan, hdlidx, tgt); break; } lp = &fcp->portdb[hdlidx]; if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGWARN, - "Chan %d handle %d for abort of target %d " - "no longer valid", chan, - hdlidx, tgt); + isp_prt(isp, ISP_LOGWARN, "Chan %d handle %d for abort of target %d no longer valid", chan, hdlidx, tgt); break; } @@ -4703,18 +4721,14 @@ isp_control(ispsoftc_t *isp, ispctl_t ct FC_SCRATCH_RELEASE(isp, chan); break; } - MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, - QENTRY_LEN, chan); + MEMORYBARRIER(isp, SYNC_SFORCPU, QENTRY_LEN, QENTRY_LEN, chan); sp = (isp24xx_statusreq_t *) local; - isp_get_24xx_response(isp, - &((isp24xx_statusreq_t *)fcp->isp_scratch)[1], sp); + isp_get_24xx_response(isp, &((isp24xx_statusreq_t *)fcp->isp_scratch)[1], sp); FC_SCRATCH_RELEASE(isp, chan); if (sp->req_completion_status == 0) { return (0); } - isp_prt(isp, ISP_LOGWARN, - "Chan %d reset of target %d returned 0x%x", - chan, tgt, sp->req_completion_status); + isp_prt(isp, ISP_LOGWARN, "Chan %d reset of target %d returned 0x%x", chan, tgt, sp->req_completion_status); break; } else if (IS_FC(isp)) { if (ISP_CAP_2KLOGIN(isp)) { @@ -4732,8 +4746,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { break; } - isp_prt(isp, ISP_LOGINFO, - "Target %d on Bus %d Reset Succeeded", tgt, chan); + isp_prt(isp, ISP_LOGINFO, "Target %d on Bus %d Reset Succeeded", tgt, chan); ISP_SET_SENDMARKER(isp, chan, 1); return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:04:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29785106566C; Sun, 2 Sep 2012 15:04:40 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10F7E8FC25; Sun, 2 Sep 2012 15:04:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F4esp022169; Sun, 2 Sep 2012 15:04:40 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F4dSe022166; Sun, 2 Sep 2012 15:04:39 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021504.q82F4dSe022166@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240016 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:04:40 -0000 Author: mjacob Date: Sun Sep 2 15:04:39 2012 New Revision: 240016 URL: http://svn.freebsd.org/changeset/base/240016 Log: MFC of 239143 More rototilling with target mode in an attemp to get multiple... Modified: stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:03:40 2012 (r240015) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:04:39 2012 (r240016) @@ -74,6 +74,7 @@ static void isp_action(struct cam_sim *, static void isp_target_thread_pi(void *); static void isp_target_thread_fc(void *); #endif +static int isp_timer_count; static void isp_timer(void *); static struct cdevsw isp_cdevsw = { @@ -225,7 +226,8 @@ isp_attach(ispsoftc_t *isp) } callout_init_mtx(&isp->isp_osinfo.tmo, &isp->isp_osinfo.lock, 0); - callout_reset(&isp->isp_osinfo.tmo, hz, isp_timer, isp); + isp_timer_count = hz >> 2; + callout_reset(&isp->isp_osinfo.tmo, isp_timer_count, isp_timer, isp); isp->isp_osinfo.timer_active = 1; isp->isp_osinfo.cdev = make_dev(&isp_cdevsw, du, UID_ROOT, GID_OPERATOR, 0600, "%s", nu); @@ -777,6 +779,7 @@ static ISP_INLINE void isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) { if (ISP_PCMD(ccb)) { + memset(ISP_PCMD(ccb), 0, sizeof (struct isp_pcmd)); ((struct isp_pcmd *)ISP_PCMD(ccb))->next = isp->isp_osinfo.pcmd_free; isp->isp_osinfo.pcmd_free = ISP_PCMD(ccb); ISP_PCMD(ccb) = NULL; @@ -813,7 +816,7 @@ static timeout_t isp_refire_putback_atio static timeout_t isp_refire_notify_ack; static void isp_complete_ctio(union ccb *); static void isp_target_putback_atio(union ccb *); -enum Start_Ctio_How { FROM_CAM, FROM_SRR, FROM_CTIO_DONE }; +enum Start_Ctio_How { FROM_CAM, FROM_TIMER, FROM_SRR, FROM_CTIO_DONE }; static void isp_target_start_ctio(ispsoftc_t *, union ccb *, enum Start_Ctio_How); static void isp_handle_platform_atio(ispsoftc_t *, at_entry_t *); static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); @@ -975,7 +978,9 @@ static void isp_tmcmd_restart(ispsoftc_t *isp) { inot_private_data_t *ntp; + inot_private_data_t *restart_queue; tstate_t *tptr; + union ccb *ccb; struct tslist *lhp; int bus, i; @@ -983,8 +988,8 @@ isp_tmcmd_restart(ispsoftc_t *isp) for (i = 0; i < LUN_HASH_SIZE; i++) { ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); SLIST_FOREACH(tptr, lhp, next) { - inot_private_data_t *restart_queue = tptr->restart_queue; - tptr->restart_queue = NULL; + if ((restart_queue = tptr->restart_queue) != NULL) + tptr->restart_queue = NULL; while (restart_queue) { ntp = restart_queue; restart_queue = ntp->rd.nt.nt_hba; @@ -1006,6 +1011,14 @@ isp_tmcmd_restart(ispsoftc_t *isp) break; } } + /* + * We only need to do this once per tptr + */ + if (!TAILQ_EMPTY(&tptr->waitq)) { + ccb = (union ccb *)TAILQ_LAST(&tptr->waitq, isp_ccbq); + TAILQ_REMOVE(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + isp_target_start_ctio(isp, ccb, FROM_TIMER); + } } } } @@ -1052,8 +1065,8 @@ isp_dump_atpd(ispsoftc_t *isp, tstate_t if (atp->tag == 0) { continue; } - xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u last_xfr %u lun %u nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", - atp->tag, atp->orig_datalen, atp->bytes_xfered, atp->last_xframt, atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); + xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %u nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", + atp->tag, atp->orig_datalen, atp->bytes_xfered, atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); } } @@ -1118,6 +1131,7 @@ create_lun_state(ispsoftc_t *isp, int bu } SLIST_INIT(&tptr->atios); SLIST_INIT(&tptr->inots); + TAILQ_INIT(&tptr->waitq); for (i = 0; i < ATPDPSIZE-1; i++) { tptr->atpool[i].next = &tptr->atpool[i+1]; tptr->ntpool[i].next = &tptr->ntpool[i+1]; @@ -1534,533 +1548,544 @@ isp_ledone(ispsoftc_t *isp, lun_entry_t static void isp_target_start_ctio(ispsoftc_t *isp, union ccb *ccb, enum Start_Ctio_How how) { - - void *qe; - int fctape, sendstatus, resid, repval = ISP_LOGTDEBUG0; + int fctape, sendstatus, resid; tstate_t *tptr; fcparam *fcp; atio_private_data_t *atp; - struct ccb_scsiio *cso = &ccb->csio; - uint32_t dmaresult, handle, xfrlen, sense_length; + struct ccb_scsiio *cso; + uint32_t dmaresult, handle, xfrlen, sense_length, tmp; uint8_t local[QENTRY_LEN]; - /* - * Do some sanity checks. - */ - xfrlen = cso->dxfer_len; - if (xfrlen == 0) { - if ((ccb->ccb_h.flags & CAM_SEND_STATUS) == 0) { - ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "a data transfer length of zero but no status to send is wrong\n"); - ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); - return; - } - } - tptr = get_lun_statep(isp, XS_CHANNEL(ccb), XS_LUN(ccb)); if (tptr == NULL) { tptr = get_lun_statep(isp, XS_CHANNEL(ccb), CAM_LUN_WILDCARD); if (tptr == NULL) { - ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "%s: [0x%x] cannot find tstate pointer in %s\n", __func__, cso->tag_id); + isp_prt(isp, ISP_LOGERR, "%s: [0x%x] cannot find tstate pointer", __func__, ccb->csio.tag_id); ccb->ccb_h.status = CAM_DEV_NOT_THERE; xpt_done(ccb); return; } } + isp_prt(isp, ISP_LOGTDEBUG0, "%s: ENTRY[0x%x] how %u xfrlen %u sendstatus %d sense_len %u", __func__, ccb->csio.tag_id, how, ccb->csio.dxfer_len, + (ccb->ccb_h.flags & CAM_SEND_STATUS) != 0, ((ccb->ccb_h.flags & CAM_SEND_SENSE)? ccb->csio.sense_len : 0)); - atp = isp_get_atpd(isp, tptr, cso->tag_id); - if (atp == NULL) { - ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "%s: [0x%x] cannot find private data adjunct\n", __func__, cso->tag_id); - isp_dump_atpd(isp, tptr); - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - xpt_done(ccb); - return; - } - - /* - * Is this command a dead duck? - */ - if (atp->dead) { - ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "%s: [0x%x] not sending a CTIO for a dead command\n", __func__, cso->tag_id); - ccb->ccb_h.status = CAM_REQ_ABORTED; - xpt_done(ccb); - return; + switch (how) { + case FROM_TIMER: + case FROM_CAM: + /* + * Insert at the tail of the list, if any, waiting CTIO CCBs + */ + TAILQ_INSERT_TAIL(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; + case FROM_SRR: + case FROM_CTIO_DONE: + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; } - /* - * Check to make sure we're still in target mode. - */ - fcp = FCPARAM(isp, XS_CHANNEL(ccb)); - if ((fcp->role & ISP_ROLE_TARGET) == 0) { - ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "%s: [0x%x] stopping sending a CTIO because we're no longer in target mode\n", __func__, cso->tag_id); - ccb->ccb_h.status = CAM_PROVIDE_FAIL; - xpt_done(ccb); - return; - } + while (TAILQ_FIRST(&tptr->waitq) != NULL) { + ccb = (union ccb *) TAILQ_FIRST(&tptr->waitq); + TAILQ_REMOVE(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); - /* - * We're only handling one outstanding CTIO at a time (which - * could be split into two to split data and status) - */ - if (atp->ctcnt) { - ISP_PATH_PRT(isp, ISP_LOGINFO, ccb->ccb_h.path, "sending only one CTIO at a time\n"); - goto restart_delay; - } + cso = &ccb->csio; + xfrlen = cso->dxfer_len; + if (xfrlen == 0) { + if ((ccb->ccb_h.flags & CAM_SEND_STATUS) == 0) { + ISP_PATH_PRT(isp, ISP_LOGERR, ccb->ccb_h.path, "a data transfer length of zero but no status to send is wrong\n"); + ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(ccb); + continue; + } + } + atp = isp_get_atpd(isp, tptr, cso->tag_id); + if (atp == NULL) { + isp_prt(isp, ISP_LOGERR, "%s: [0x%x] cannot find private data adjunct in %s", __func__, cso->tag_id, __func__); + isp_dump_atpd(isp, tptr); + ccb->ccb_h.status = CAM_REQ_CMP_ERR; + xpt_done(ccb); + continue; + } - /* - * Get some resources - */ - if (isp_get_pcmd(isp, ccb)) { - ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "out of PCMDs\n"); - goto restart_delay; - } - qe = isp_getrqentry(isp); - if (qe == NULL) { - ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, rqo, __func__); - goto restart_delay; - } - memset(local, 0, QENTRY_LEN); + /* + * Is this command a dead duck? + */ + if (atp->dead) { + isp_prt(isp, ISP_LOGERR, "%s: [0x%x] not sending a CTIO for a dead command", __func__, cso->tag_id); + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + continue; + } - /* - * Does the initiator expect FC-Tape style responses? - * Can we provide them? - */ - if ((atp->word3 & PRLI_WD3_RETRY) && fcp->fctape_enabled) { - fctape = 1; - } else { - fctape = 0; - } + /* + * Check to make sure we're still in target mode. + */ + fcp = FCPARAM(isp, XS_CHANNEL(ccb)); + if ((fcp->role & ISP_ROLE_TARGET) == 0) { + isp_prt(isp, ISP_LOGERR, "%s: [0x%x] stopping sending a CTIO because we're no longer in target mode", __func__, cso->tag_id); + ccb->ccb_h.status = CAM_PROVIDE_FAIL; + xpt_done(ccb); + continue; + } - /* - * If we already did the data xfer portion of a CTIO that sends data - * and status, don't do it again and do the status portion now. - */ - if (atp->sendst) { - xfrlen = 0; /* we already did the data transfer */ - atp->sendst = 0; - } - if (ccb->ccb_h.flags & CAM_SEND_STATUS) { - sendstatus = 1; - } else { - sendstatus = 0; - } + /* + * We're only handling ATPD_CCB_OUTSTANDING outstanding CCB at a time (one of which + * could be split into two CTIOs to split data and status). + */ + if (atp->ctcnt >= ATPD_CCB_OUTSTANDING) { + isp_prt(isp, ISP_LOGTINFO, "[0x%x] handling only %d CCBs at a time (flags for this ccb: 0x%x)", cso->tag_id, ATPD_CCB_OUTSTANDING, ccb->ccb_h.flags); + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; + } - if (ccb->ccb_h.flags & CAM_SEND_SENSE) { /* - * Sense length is not the entire sense data structure size. Periph - * drivers don't seem to be setting sense_len to reflect the actual - * size. We'll peek inside to get the right amount. + * Does the initiator expect FC-Tape style responses? */ - sense_length = cso->sense_len; + if ((atp->word3 & PRLI_WD3_RETRY) && fcp->fctape_enabled) { + fctape = 1; + } else { + fctape = 0; + } /* - * This 'cannot' happen + * If we already did the data xfer portion of a CTIO that sends data + * and status, don't do it again and do the status portion now. */ - if (sense_length > (XCMD_SIZE - MIN_FCP_RESPONSE_SIZE)) { - sense_length = XCMD_SIZE - MIN_FCP_RESPONSE_SIZE; + if (atp->sendst) { + isp_prt(isp, ISP_LOGTINFO, "[0x%x] now sending synthesized status orig_dl=%u xfered=%u bit=%u", + cso->tag_id, atp->orig_datalen, atp->bytes_xfered, atp->bytes_in_transit); + xfrlen = 0; /* we already did the data transfer */ + atp->sendst = 0; + } + if (ccb->ccb_h.flags & CAM_SEND_STATUS) { + sendstatus = 1; + } else { + sendstatus = 0; } - } else { - sense_length = 0; - } - if (how == FROM_SRR || atp->nsrr) - repval = ISP_LOGINFO; + if (ccb->ccb_h.flags & CAM_SEND_SENSE) { + KASSERT((sendstatus != 0), ("how can you have CAM_SEND_SENSE w/o CAM_SEND_STATUS?")); + /* + * Sense length is not the entire sense data structure size. Periph + * drivers don't seem to be setting sense_len to reflect the actual + * size. We'll peek inside to get the right amount. + */ + sense_length = cso->sense_len; - if (IS_24XX(isp)) { - ct7_entry_t *cto = (ct7_entry_t *) local; + /* + * This 'cannot' happen + */ + if (sense_length > (XCMD_SIZE - MIN_FCP_RESPONSE_SIZE)) { + sense_length = XCMD_SIZE - MIN_FCP_RESPONSE_SIZE; + } + } else { + sense_length = 0; + } - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO7; - cto->ct_header.rqs_entry_count = 1; - cto->ct_header.rqs_seqno = 1; - cto->ct_nphdl = atp->nphdl; - cto->ct_rxid = atp->tag; - cto->ct_iid_lo = atp->portid; - cto->ct_iid_hi = atp->portid >> 16; - cto->ct_oxid = atp->oxid; - cto->ct_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(ccb)); - cto->ct_timeout = 120; - cto->ct_flags = atp->tattr << CT7_TASK_ATTR_SHIFT; + memset(local, 0, QENTRY_LEN); /* - * Mode 1, status, no data. Only possible when we are sending status, have - * no data to transfer, and any sense length can fit in the ct7_entry. - * - * Mode 2, status, no data. We have to use this in the case sense data - * won't fit into a ct7_entry_t. - * + * Check for overflow */ - if (sendstatus && xfrlen == 0) { - cto->ct_flags |= CT7_SENDSTATUS | CT7_NO_DATA; - resid = atp->orig_datalen - atp->bytes_xfered; - if (sense_length <= MAXRESPLEN_24XX) { - if (resid < 0) { - cto->ct_resid = -resid; - } else if (resid > 0) { - cto->ct_resid = resid; - } - cto->ct_flags |= CT7_FLAG_MODE1; - cto->ct_scsi_status = cso->scsi_status; - if (resid < 0) { - cto->ct_scsi_status |= (FCP_RESID_OVERFLOW << 8); - } else if (resid > 0) { - cto->ct_scsi_status |= (FCP_RESID_UNDERFLOW << 8); - } - if (fctape) { - cto->ct_flags |= CT7_CONFIRM|CT7_EXPLCT_CONF; - } - if (sense_length) { - cto->ct_scsi_status |= (FCP_SNSLEN_VALID << 8); - cto->rsp.m1.ct_resplen = cto->ct_senselen = sense_length; - memcpy(cto->rsp.m1.ct_resp, &cso->sense_data, sense_length); - } - } else { - bus_addr_t addr; - char buf[XCMD_SIZE]; - fcp_rsp_iu_t *rp; + tmp = atp->bytes_xfered + atp->bytes_in_transit + xfrlen; + if (tmp > atp->orig_datalen) { + isp_prt(isp, ISP_LOGERR, "%s: [0x%x] data overflow by %u bytes", __func__, cso->tag_id, tmp - atp->orig_datalen); + ccb->ccb_h.status = CAM_DATA_RUN_ERR; + xpt_done(ccb); + continue; + } + + if (IS_24XX(isp)) { + ct7_entry_t *cto = (ct7_entry_t *) local; + + cto->ct_header.rqs_entry_type = RQSTYPE_CTIO7; + cto->ct_header.rqs_entry_count = 1; + cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; + ATPD_SET_SEQNO(cto, atp); + cto->ct_nphdl = atp->nphdl; + cto->ct_rxid = atp->tag; + cto->ct_iid_lo = atp->portid; + cto->ct_iid_hi = atp->portid >> 16; + cto->ct_oxid = atp->oxid; + cto->ct_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(ccb)); + cto->ct_timeout = 120; + cto->ct_flags = atp->tattr << CT7_TASK_ATTR_SHIFT; + + /* + * Mode 1, status, no data. Only possible when we are sending status, have + * no data to transfer, and any sense length can fit in the ct7_entry. + * + * Mode 2, status, no data. We have to use this in the case sense data + * won't fit into a ct7_entry_t. + * + */ + if (sendstatus && xfrlen == 0) { + cto->ct_flags |= CT7_SENDSTATUS | CT7_NO_DATA; + resid = atp->orig_datalen - atp->bytes_xfered - atp->bytes_in_transit; + if (sense_length <= MAXRESPLEN_24XX) { + if (resid < 0) { + cto->ct_resid = -resid; + } else if (resid > 0) { + cto->ct_resid = resid; + } + cto->ct_flags |= CT7_FLAG_MODE1; + cto->ct_scsi_status = cso->scsi_status; + if (resid < 0) { + cto->ct_scsi_status |= (FCP_RESID_OVERFLOW << 8); + } else if (resid > 0) { + cto->ct_scsi_status |= (FCP_RESID_UNDERFLOW << 8); + } + if (fctape) { + cto->ct_flags |= CT7_CONFIRM|CT7_EXPLCT_CONF; + } + if (sense_length) { + cto->ct_scsi_status |= (FCP_SNSLEN_VALID << 8); + cto->rsp.m1.ct_resplen = cto->ct_senselen = sense_length; + memcpy(cto->rsp.m1.ct_resp, &cso->sense_data, sense_length); + } + } else { + bus_addr_t addr; + char buf[XCMD_SIZE]; + fcp_rsp_iu_t *rp; - if (atp->ests == NULL) { - atp->ests = isp_get_ecmd(isp); if (atp->ests == NULL) { - goto restart_delay; + atp->ests = isp_get_ecmd(isp); + if (atp->ests == NULL) { + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; + } } - } - memset(buf, 0, sizeof (buf)); - rp = (fcp_rsp_iu_t *)buf; - if (fctape) { - cto->ct_flags |= CT7_CONFIRM|CT7_EXPLCT_CONF; - rp->fcp_rsp_bits |= FCP_CONF_REQ; - } - cto->ct_flags |= CT7_FLAG_MODE2; - rp->fcp_rsp_scsi_status = cso->scsi_status; - if (resid < 0) { - rp->fcp_rsp_resid = -resid; - rp->fcp_rsp_bits |= FCP_RESID_OVERFLOW; - } else if (resid > 0) { - rp->fcp_rsp_resid = resid; - rp->fcp_rsp_bits |= FCP_RESID_UNDERFLOW; + memset(buf, 0, sizeof (buf)); + rp = (fcp_rsp_iu_t *)buf; + if (fctape) { + cto->ct_flags |= CT7_CONFIRM|CT7_EXPLCT_CONF; + rp->fcp_rsp_bits |= FCP_CONF_REQ; + } + cto->ct_flags |= CT7_FLAG_MODE2; + rp->fcp_rsp_scsi_status = cso->scsi_status; + if (resid < 0) { + rp->fcp_rsp_resid = -resid; + rp->fcp_rsp_bits |= FCP_RESID_OVERFLOW; + } else if (resid > 0) { + rp->fcp_rsp_resid = resid; + rp->fcp_rsp_bits |= FCP_RESID_UNDERFLOW; + } + if (sense_length) { + rp->fcp_rsp_snslen = sense_length; + cto->ct_senselen = sense_length; + rp->fcp_rsp_bits |= FCP_SNSLEN_VALID; + isp_put_fcp_rsp_iu(isp, rp, atp->ests); + memcpy(((fcp_rsp_iu_t *)atp->ests)->fcp_rsp_extra, &cso->sense_data, sense_length); + } else { + isp_put_fcp_rsp_iu(isp, rp, atp->ests); + } + if (isp->isp_dblev & ISP_LOGTDEBUG1) { + isp_print_bytes(isp, "FCP Response Frame After Swizzling", MIN_FCP_RESPONSE_SIZE + sense_length, atp->ests); + } + addr = isp->isp_osinfo.ecmd_dma; + addr += ((((isp_ecmd_t *)atp->ests) - isp->isp_osinfo.ecmd_base) * XCMD_SIZE); + isp_prt(isp, ISP_LOGTDEBUG0, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, + (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); + cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; + cto->rsp.m2.ct_fcp_rsp_iudata.ds_base = DMA_LO32(addr); + cto->rsp.m2.ct_fcp_rsp_iudata.ds_basehi = DMA_HI32(addr); + cto->rsp.m2.ct_fcp_rsp_iudata.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; } if (sense_length) { - rp->fcp_rsp_snslen = sense_length; - cto->ct_senselen = sense_length; - rp->fcp_rsp_bits |= FCP_SNSLEN_VALID; - isp_put_fcp_rsp_iu(isp, rp, atp->ests); - memcpy(((fcp_rsp_iu_t *)atp->ests)->fcp_rsp_extra, &cso->sense_data, sense_length); + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO7[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x resid=%d slen %u sense: %x %x/%x/%x", __func__, + cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cto->ct_scsi_status, cto->ct_flags, cto->ct_resid, sense_length, + cso->sense_data.error_code, cso->sense_data.sense_buf[1], cso->sense_data.sense_buf[11], cso->sense_data.sense_buf[12]); } else { - isp_put_fcp_rsp_iu(isp, rp, atp->ests); - } - if (isp->isp_dblev & ISP_LOGTDEBUG1) { - isp_print_bytes(isp, "FCP Response Frame After Swizzling", MIN_FCP_RESPONSE_SIZE + sense_length, atp->ests); + isp_prt(isp, ISP_LOGDEBUG0, "%s: CTIO7[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x resid=%d", __func__, + cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cto->ct_scsi_status, cto->ct_flags, cto->ct_resid); } - addr = isp->isp_osinfo.ecmd_dma; - addr += ((((isp_ecmd_t *)atp->ests) - isp->isp_osinfo.ecmd_base) * XCMD_SIZE); - isp_prt(isp, repval, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, - (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); - cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; - cto->rsp.m2.ct_fcp_rsp_iudata.ds_base = DMA_LO32(addr); - cto->rsp.m2.ct_fcp_rsp_iudata.ds_basehi = DMA_HI32(addr); - cto->rsp.m2.ct_fcp_rsp_iudata.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; - } - if (sense_length) { - isp_prt(isp, repval, "%s: CTIO7[0x%x] CDB0=%x sstatus=0x%x flags=0x%x resid=%d slen %u sense: %x %x/%x/%x", __func__, - cto->ct_rxid, atp->cdb0, cto->ct_scsi_status, cto->ct_flags, cto->ct_resid, sense_length, cso->sense_data.error_code, - cso->sense_data.sense_buf[1], cso->sense_data.sense_buf[11], cso->sense_data.sense_buf[12]); - } else { - isp_prt(isp, repval, "%s: CTIO7[0x%x] CDB0=%x sstatus=0x%x flags=0x%x resid=%d", __func__, - cto->ct_rxid, atp->cdb0, cto->ct_scsi_status, cto->ct_flags, cto->ct_resid); - } - atp->state = ATPD_STATE_LAST_CTIO; - } - - /* - * Mode 0 data transfers, *possibly* with status. - */ - if (xfrlen != 0) { - cto->ct_flags |= CT7_FLAG_MODE0; - if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { - cto->ct_flags |= CT7_DATA_IN; - } else { - cto->ct_flags |= CT7_DATA_OUT; + atp->state = ATPD_STATE_LAST_CTIO; } /* - * Don't overrun the limits placed on us, but record it as - * if we had so that we can set an overflow bit later. + * Mode 0 data transfers, *possibly* with status. */ - atp->last_xframt = xfrlen; - if (atp->bytes_xfered >= atp->orig_datalen) { - resid = atp->orig_datalen - (atp->bytes_xfered + xfrlen); - } else if (atp->bytes_xfered + xfrlen > atp->orig_datalen) { - resid = atp->orig_datalen - (atp->bytes_xfered + xfrlen); - xfrlen = atp->orig_datalen - atp->bytes_xfered; - } else { - resid = atp->orig_datalen - xfrlen; - } - cto->rsp.m0.reloff = atp->bytes_xfered; - cto->rsp.m0.ct_xfrlen = xfrlen; + if (xfrlen != 0) { + cto->ct_flags |= CT7_FLAG_MODE0; + if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + cto->ct_flags |= CT7_DATA_IN; + } else { + cto->ct_flags |= CT7_DATA_OUT; + } + + cto->rsp.m0.reloff = atp->bytes_xfered + atp->bytes_in_transit; + cto->rsp.m0.ct_xfrlen = xfrlen; #ifdef DEBUG - if (ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame && xfrlen > ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame) { - isp_prt(isp, ISP_LOGWARN, "%s: truncating data frame with xfrlen %d to %d", __func__, xfrlen, xfrlen - (xfrlen >> 2)); - ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame = 0; - cto->rsp.m0.ct_xfrlen -= xfrlen >> 2; - } + if (ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame && xfrlen > ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame) { + isp_prt(isp, ISP_LOGWARN, "%s: truncating data frame with xfrlen %d to %d", __func__, xfrlen, xfrlen - (xfrlen >> 2)); + ISP_FC_PC(isp, XS_CHANNEL(ccb))->inject_lost_data_frame = 0; + cto->rsp.m0.ct_xfrlen -= xfrlen >> 2; + } #endif - if (sendstatus) { - if (cso->scsi_status == SCSI_STATUS_OK && resid == 0 && fctape == 0) { - cto->ct_flags |= CT7_SENDSTATUS; - atp->state = ATPD_STATE_LAST_CTIO; + if (sendstatus) { + resid = atp->orig_datalen - atp->bytes_xfered - xfrlen; + if (cso->scsi_status == SCSI_STATUS_OK && resid == 0 /* && fctape == 0 */) { + cto->ct_flags |= CT7_SENDSTATUS; + atp->state = ATPD_STATE_LAST_CTIO; + if (fctape) { + cto->ct_flags |= CT7_CONFIRM|CT7_EXPLCT_CONF; + } + } else { + atp->sendst = 1; /* send status later */ + cto->ct_header.rqs_seqno &= ~ATPD_SEQ_NOTIFY_CAM; + atp->state = ATPD_STATE_CTIO; + } } else { - atp->sendst = 1; /* send status later */ - cto->ct_header.rqs_seqno = 0; atp->state = ATPD_STATE_CTIO; } - } else { - atp->state = ATPD_STATE_CTIO; + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO7[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x xfrlen=%u off=%u", __func__, + cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cto->ct_scsi_status, cto->ct_flags, xfrlen, atp->bytes_xfered); } - isp_prt(isp, repval, "%s: CTIO7[0x%x] CDB0=%x sstatus=0x%x flags=0x%x xfrlen=%u off=%u", __func__, - cto->ct_rxid, atp->cdb0, cto->ct_scsi_status, cto->ct_flags, xfrlen, atp->bytes_xfered); - } - } else if (IS_FC(isp)) { - ct2_entry_t *cto = (ct2_entry_t *) local; + } else if (IS_FC(isp)) { + ct2_entry_t *cto = (ct2_entry_t *) local; - if (isp->isp_osinfo.sixtyfourbit) - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO3; - else - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO2; - cto->ct_header.rqs_entry_count = 1; - cto->ct_header.rqs_seqno = 1; - if (ISP_CAP_2KLOGIN(isp) == 0) { - ((ct2e_entry_t *)cto)->ct_iid = cso->init_id; - } else { - cto->ct_iid = cso->init_id; - if (ISP_CAP_SCCFW(isp) == 0) { - cto->ct_lun = ccb->ccb_h.target_lun; + if (isp->isp_osinfo.sixtyfourbit) + cto->ct_header.rqs_entry_type = RQSTYPE_CTIO3; + else + cto->ct_header.rqs_entry_type = RQSTYPE_CTIO2; + cto->ct_header.rqs_entry_count = 1; + cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; + ATPD_SET_SEQNO(cto, atp); + if (ISP_CAP_2KLOGIN(isp) == 0) { + ((ct2e_entry_t *)cto)->ct_iid = cso->init_id; + } else { + cto->ct_iid = cso->init_id; + if (ISP_CAP_SCCFW(isp) == 0) { + cto->ct_lun = ccb->ccb_h.target_lun; + } } - } - cto->ct_timeout = 10; - cto->ct_rxid = cso->tag_id; + cto->ct_timeout = 10; + cto->ct_rxid = cso->tag_id; - /* - * Mode 1, status, no data. Only possible when we are sending status, have - * no data to transfer, and the sense length can fit in the ct7_entry. - * - * Mode 2, status, no data. We have to use this in the case the the response - * length won't fit into a ct2_entry_t. - * - * We'll fill out this structure with information as if this were a - * Mode 1. The hardware layer will create the Mode 2 FCP RSP IU as - * needed based upon this. - */ - if (sendstatus && xfrlen == 0) { - cto->ct_flags |= CT2_SENDSTATUS | CT2_NO_DATA; - resid = atp->orig_datalen - atp->bytes_xfered; - if (sense_length <= MAXRESPLEN) { - if (resid < 0) { - cto->ct_resid = -resid; - } else if (resid > 0) { - cto->ct_resid = resid; - } - cto->ct_flags |= CT2_FLAG_MODE1; - cto->rsp.m1.ct_scsi_status = cso->scsi_status; - if (resid < 0) { - cto->rsp.m1.ct_scsi_status |= CT2_DATA_OVER; - } else if (resid > 0) { - cto->rsp.m1.ct_scsi_status |= CT2_DATA_UNDER; - } - if (fctape) { - cto->ct_flags |= CT2_CONFIRM; - } - if (sense_length) { - cto->rsp.m1.ct_scsi_status |= CT2_SNSLEN_VALID; - cto->rsp.m1.ct_resplen = cto->rsp.m1.ct_senselen = sense_length; - memcpy(cto->rsp.m1.ct_resp, &cso->sense_data, sense_length); - } - } else { - bus_addr_t addr; - char buf[XCMD_SIZE]; - fcp_rsp_iu_t *rp; + /* + * Mode 1, status, no data. Only possible when we are sending status, have + * no data to transfer, and the sense length can fit in the ct7_entry. + * + * Mode 2, status, no data. We have to use this in the case the the response + * length won't fit into a ct2_entry_t. + * + * We'll fill out this structure with information as if this were a + * Mode 1. The hardware layer will create the Mode 2 FCP RSP IU as + * needed based upon this. + */ + if (sendstatus && xfrlen == 0) { + cto->ct_flags |= CT2_SENDSTATUS | CT2_NO_DATA; + resid = atp->orig_datalen - atp->bytes_xfered - atp->bytes_in_transit; + if (sense_length <= MAXRESPLEN) { + if (resid < 0) { + cto->ct_resid = -resid; + } else if (resid > 0) { + cto->ct_resid = resid; + } + cto->ct_flags |= CT2_FLAG_MODE1; + cto->rsp.m1.ct_scsi_status = cso->scsi_status; + if (resid < 0) { + cto->rsp.m1.ct_scsi_status |= CT2_DATA_OVER; + } else if (resid > 0) { + cto->rsp.m1.ct_scsi_status |= CT2_DATA_UNDER; + } + if (fctape) { + cto->ct_flags |= CT2_CONFIRM; + } + if (sense_length) { + cto->rsp.m1.ct_scsi_status |= CT2_SNSLEN_VALID; + cto->rsp.m1.ct_resplen = cto->rsp.m1.ct_senselen = sense_length; + memcpy(cto->rsp.m1.ct_resp, &cso->sense_data, sense_length); + } + } else { + bus_addr_t addr; + char buf[XCMD_SIZE]; + fcp_rsp_iu_t *rp; - if (atp->ests == NULL) { - atp->ests = isp_get_ecmd(isp); if (atp->ests == NULL) { - goto restart_delay; + atp->ests = isp_get_ecmd(isp); + if (atp->ests == NULL) { + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; + } + } + memset(buf, 0, sizeof (buf)); + rp = (fcp_rsp_iu_t *)buf; + if (fctape) { + cto->ct_flags |= CT2_CONFIRM; + rp->fcp_rsp_bits |= FCP_CONF_REQ; + } + cto->ct_flags |= CT2_FLAG_MODE2; + rp->fcp_rsp_scsi_status = cso->scsi_status; + if (resid < 0) { + rp->fcp_rsp_resid = -resid; + rp->fcp_rsp_bits |= FCP_RESID_OVERFLOW; + } else if (resid > 0) { + rp->fcp_rsp_resid = resid; + rp->fcp_rsp_bits |= FCP_RESID_UNDERFLOW; + } + if (sense_length) { + rp->fcp_rsp_snslen = sense_length; + rp->fcp_rsp_bits |= FCP_SNSLEN_VALID; + isp_put_fcp_rsp_iu(isp, rp, atp->ests); + memcpy(((fcp_rsp_iu_t *)atp->ests)->fcp_rsp_extra, &cso->sense_data, sense_length); + } else { + isp_put_fcp_rsp_iu(isp, rp, atp->ests); + } + if (isp->isp_dblev & ISP_LOGTDEBUG1) { + isp_print_bytes(isp, "FCP Response Frame After Swizzling", MIN_FCP_RESPONSE_SIZE + sense_length, atp->ests); + } + addr = isp->isp_osinfo.ecmd_dma; + addr += ((((isp_ecmd_t *)atp->ests) - isp->isp_osinfo.ecmd_base) * XCMD_SIZE); + isp_prt(isp, ISP_LOGTDEBUG0, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, + (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); + cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; + if (isp->isp_osinfo.sixtyfourbit) { + cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_base = DMA_LO32(addr); + cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_basehi = DMA_HI32(addr); + cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; + } else { + cto->rsp.m2.u.ct_fcp_rsp_iudata_32.ds_base = DMA_LO32(addr); + cto->rsp.m2.u.ct_fcp_rsp_iudata_32.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; } - } - memset(buf, 0, sizeof (buf)); - rp = (fcp_rsp_iu_t *)buf; - if (fctape) { - cto->ct_flags |= CT2_CONFIRM; - rp->fcp_rsp_bits |= FCP_CONF_REQ; - } - cto->ct_flags |= CT2_FLAG_MODE2; - rp->fcp_rsp_scsi_status = cso->scsi_status; - if (resid < 0) { - rp->fcp_rsp_resid = -resid; - rp->fcp_rsp_bits |= FCP_RESID_OVERFLOW; - } else if (resid > 0) { - rp->fcp_rsp_resid = resid; - rp->fcp_rsp_bits |= FCP_RESID_UNDERFLOW; } if (sense_length) { - rp->fcp_rsp_snslen = sense_length; - rp->fcp_rsp_bits |= FCP_SNSLEN_VALID; - isp_put_fcp_rsp_iu(isp, rp, atp->ests); - memcpy(((fcp_rsp_iu_t *)atp->ests)->fcp_rsp_extra, &cso->sense_data, sense_length); + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x resid=%d sense: %x %x/%x/%x", __func__, + cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, + cso->sense_data.error_code, cso->sense_data.sense_buf[1], cso->sense_data.sense_buf[11], cso->sense_data.sense_buf[12]); } else { - isp_put_fcp_rsp_iu(isp, rp, atp->ests); - } - if (isp->isp_dblev & ISP_LOGTDEBUG1) { - isp_print_bytes(isp, "FCP Response Frame After Swizzling", MIN_FCP_RESPONSE_SIZE + sense_length, atp->ests); + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x resid=%d", __func__, cto->ct_rxid, + ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid); } - addr = isp->isp_osinfo.ecmd_dma; - addr += ((((isp_ecmd_t *)atp->ests) - isp->isp_osinfo.ecmd_base) * XCMD_SIZE); - isp_prt(isp, repval, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, - (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); - cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; - if (isp->isp_osinfo.sixtyfourbit) { - cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_base = DMA_LO32(addr); - cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_basehi = DMA_HI32(addr); - cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; + atp->state = ATPD_STATE_LAST_CTIO; + } + + if (xfrlen != 0) { + cto->ct_flags |= CT2_FLAG_MODE0; + if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + cto->ct_flags |= CT2_DATA_IN; } else { - cto->rsp.m2.u.ct_fcp_rsp_iudata_32.ds_base = DMA_LO32(addr); - cto->rsp.m2.u.ct_fcp_rsp_iudata_32.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; + cto->ct_flags |= CT2_DATA_OUT; } - } - if (sense_length) { - isp_prt(isp, repval, "%s: CTIO2[0x%x] CDB0=%x sstatus=0x%x flags=0x%x resid=%d sense: %x %x/%x/%x", __func__, - cto->ct_rxid, atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, cso->sense_data.error_code, - cso->sense_data.sense_buf[1], cso->sense_data.sense_buf[11], cso->sense_data.sense_buf[12]); - } else { - isp_prt(isp, repval, "%s: CTIO2[0x%x] CDB0=%x sstatus=0x%x flags=0x%x resid=%d", __func__, - cto->ct_rxid, atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid); - } - atp->state = ATPD_STATE_LAST_CTIO; - } - if (xfrlen != 0) { - int resid = 0; - cto->ct_flags |= CT2_FLAG_MODE0; - if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { - cto->ct_flags |= CT2_DATA_IN; - } else { - cto->ct_flags |= CT2_DATA_OUT; - } + cto->ct_reloff = atp->bytes_xfered + atp->bytes_in_transit; + cto->rsp.m0.ct_xfrlen = xfrlen; - /* - * Don't overrun the limits placed on us, but record it as - * if we had so that we can set an overflow bit later. - */ - atp->last_xframt = xfrlen; - if (atp->bytes_xfered + xfrlen > atp->orig_datalen) { - resid = 1; - xfrlen = atp->orig_datalen - atp->bytes_xfered; - } - cto->ct_reloff = atp->bytes_xfered; - cto->rsp.m0.ct_xfrlen = xfrlen; - - if (sendstatus) { - if (cso->scsi_status == SCSI_STATUS_OK && resid == 0 && fctape == 0) { - cto->ct_flags |= CT2_SENDSTATUS; - atp->state = ATPD_STATE_LAST_CTIO; + if (sendstatus) { + resid = atp->orig_datalen - atp->bytes_xfered - xfrlen; + if (cso->scsi_status == SCSI_STATUS_OK && resid == 0 /*&& fctape == 0*/) { + cto->ct_flags |= CT2_SENDSTATUS; + atp->state = ATPD_STATE_LAST_CTIO; + if (fctape) { + cto->ct_flags |= CT2_CONFIRM; + } + } else { + atp->sendst = 1; /* send status later */ + cto->ct_header.rqs_seqno &= ~ATPD_SEQ_NOTIFY_CAM; + atp->state = ATPD_STATE_CTIO; + } } else { - atp->sendst = 1; /* send status later */ - cto->ct_header.rqs_seqno = 0; atp->state = ATPD_STATE_CTIO; } + } + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[%x] seq %u nc %d CDB0=%x scsi status %x flags %x resid %d xfrlen %u offset %u", __func__, cto->ct_rxid, + ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, cso->dxfer_len, atp->bytes_xfered); + } else { + ct_entry_t *cto = (ct_entry_t *) local; + + cto->ct_header.rqs_entry_type = RQSTYPE_CTIO; + cto->ct_header.rqs_entry_count = 1; + cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; + ATPD_SET_SEQNO(cto, atp); + cto->ct_iid = cso->init_id; + cto->ct_iid |= XS_CHANNEL(ccb) << 7; + cto->ct_tgt = ccb->ccb_h.target_id; + cto->ct_lun = ccb->ccb_h.target_lun; + cto->ct_fwhandle = cso->tag_id; + if (atp->rxid) { + cto->ct_tag_val = atp->rxid; + cto->ct_flags |= CT_TQAE; + } + if (ccb->ccb_h.flags & CAM_DIS_DISCONNECT) { + cto->ct_flags |= CT_NODISC; + } + if (cso->dxfer_len == 0) { + cto->ct_flags |= CT_NO_DATA; + } else if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + cto->ct_flags |= CT_DATA_IN; } else { - atp->state = ATPD_STATE_CTIO; + cto->ct_flags |= CT_DATA_OUT; + } + if (ccb->ccb_h.flags & CAM_SEND_STATUS) { + cto->ct_flags |= CT_SENDSTATUS|CT_CCINCR; + cto->ct_scsi_status = cso->scsi_status; + cto->ct_resid = atp->orig_datalen - atp->bytes_xfered - atp->bytes_in_transit - xfrlen; + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] seq %u nc %d scsi status %x resid %d tag_id %x", __func__, + cto->ct_fwhandle, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), cso->scsi_status, cso->resid, cso->tag_id); } + ccb->ccb_h.flags &= ~CAM_SEND_SENSE; + cto->ct_timeout = 10; } - isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[%x] CDB0=%x scsi status %x flags %x resid %d xfrlen %u offset %u", __func__, cto->ct_rxid, - atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, cso->dxfer_len, atp->bytes_xfered); - } else { - ct_entry_t *cto = (ct_entry_t *) local; - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO; - cto->ct_header.rqs_entry_count = 1; - cto->ct_header.rqs_seqno = 1; - cto->ct_iid = cso->init_id; - cto->ct_iid |= XS_CHANNEL(ccb) << 7; - cto->ct_tgt = ccb->ccb_h.target_id; - cto->ct_lun = ccb->ccb_h.target_lun; - cto->ct_fwhandle = cso->tag_id; - if (atp->rxid) { - cto->ct_tag_val = atp->rxid; - cto->ct_flags |= CT_TQAE; - } - if (ccb->ccb_h.flags & CAM_DIS_DISCONNECT) { - cto->ct_flags |= CT_NODISC; - } - if (cso->dxfer_len == 0) { - cto->ct_flags |= CT_NO_DATA; - } else if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { - cto->ct_flags |= CT_DATA_IN; - } else { - cto->ct_flags |= CT_DATA_OUT; + if (isp_get_pcmd(isp, ccb)) { + ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "out of PCMDs\n"); + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + break; } - if (ccb->ccb_h.flags & CAM_SEND_STATUS) { - cto->ct_flags |= CT_SENDSTATUS|CT_CCINCR; - cto->ct_scsi_status = cso->scsi_status; - cto->ct_resid = cso->resid; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] scsi status %x resid %d tag_id %x", __func__, - cto->ct_fwhandle, cso->scsi_status, cso->resid, cso->tag_id); + if (isp_allocate_xs_tgt(isp, ccb, &handle)) { + ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "No XFLIST pointers for %s\n", __func__); + TAILQ_INSERT_HEAD(&tptr->waitq, &ccb->ccb_h, periph_links.tqe); + isp_free_pcmd(isp, ccb); + break; } - ccb->ccb_h.flags &= ~CAM_SEND_SENSE; - cto->ct_timeout = 10; - } + atp->bytes_in_transit += xfrlen; + PISP_PCMD(ccb)->datalen = xfrlen; - if (isp_allocate_xs_tgt(isp, ccb, &handle)) { - ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "No XFLIST pointers for %s\n", __func__); - goto restart_delay; - } - /* - * Call the dma setup routines for this entry (and any subsequent - * CTIOs) if there's data to move, and then tell the f/w it's got - * new things to play with. As with isp_start's usage of DMA setup, - * any swizzling is done in the machine dependent layer. Because - * of this, we put the request onto the queue area first in native *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:05:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C8B71065678; Sun, 2 Sep 2012 15:05:40 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E10E8FC1D; Sun, 2 Sep 2012 15:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F5egj022379; Sun, 2 Sep 2012 15:05:40 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F5ebg022376; Sun, 2 Sep 2012 15:05:40 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021505.q82F5ebg022376@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240017 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:05:40 -0000 Author: mjacob Date: Sun Sep 2 15:05:39 2012 New Revision: 240017 URL: http://svn.freebsd.org/changeset/base/240017 Log: MFC of 239218 Fix an oops where we wiped out DMA maps... Modified: stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:04:39 2012 (r240016) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:05:39 2012 (r240017) @@ -779,8 +779,13 @@ static ISP_INLINE void isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) { if (ISP_PCMD(ccb)) { - memset(ISP_PCMD(ccb), 0, sizeof (struct isp_pcmd)); - ((struct isp_pcmd *)ISP_PCMD(ccb))->next = isp->isp_osinfo.pcmd_free; +#ifdef ISP_TARGET_MODE + PISP_PCMD(ccb)->datalen = 0; + PISP_PCMD(ccb)->totslen = 0; + PISP_PCMD(ccb)->cumslen = 0; + PISP_PCMD(ccb)->crn = 0; +#endif + PISP_PCMD(ccb)->next = isp->isp_osinfo.pcmd_free; isp->isp_osinfo.pcmd_free = ISP_PCMD(ccb); ISP_PCMD(ccb) = NULL; } @@ -6326,12 +6331,20 @@ isp_common_dmateardown(ispsoftc_t *isp, int isp_fcp_next_crn(ispsoftc_t *isp, uint8_t *crnp, XS_T *cmd) { - uint32_t chan = XS_CHANNEL(cmd); - uint32_t tgt = XS_TGT(cmd); - uint32_t lun = XS_LUN(cmd); - struct isp_fc *fc = &isp->isp_osinfo.pc.fc[chan]; - int idx = NEXUS_HASH(tgt, lun); - struct isp_nexus *nxp = fc->nexus_hash[idx]; + uint32_t chan, tgt, lun; + struct isp_fc *fc; + struct isp_nexus *nxp; + int idx; + + if (isp->isp_type < ISP_HA_FC_2300) + return (0); + + chan = XS_CHANNEL(cmd); + tgt = XS_TGT(cmd); + lun = XS_LUN(cmd); + fc = &isp->isp_osinfo.pc.fc[chan]; + idx = NEXUS_HASH(tgt, lun); + nxp = fc->nexus_hash[idx]; while (nxp) { if (nxp->tgt == tgt && nxp->lun == lun) Modified: stable/9/sys/dev/isp/isp_pci.c ============================================================================== --- stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 15:04:39 2012 (r240016) +++ stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 15:05:39 2012 (r240017) @@ -1688,18 +1688,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) bus_dma_tag_destroy(fc->tdmat); goto bad; } - for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { - struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); - if (n == NULL) { - while (fc->nexus_free_list) { - n = fc->nexus_free_list; - fc->nexus_free_list = n->next; - free(n, M_DEVBUF); + if (isp->isp_type >= ISP_HA_FC_2300) { + for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { + struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); + if (n == NULL) { + while (fc->nexus_free_list) { + n = fc->nexus_free_list; + fc->nexus_free_list = n->next; + free(n, M_DEVBUF); + } + goto bad; } - goto bad; + n->next = fc->nexus_free_list; + fc->nexus_free_list = n; } - n->next = fc->nexus_free_list; - fc->nexus_free_list = n; } } } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:06:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A218E106564A; Sun, 2 Sep 2012 15:06:55 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C8438FC0C; Sun, 2 Sep 2012 15:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F6tJM022581; Sun, 2 Sep 2012 15:06:55 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F6tmx022579; Sun, 2 Sep 2012 15:06:55 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021506.q82F6tmx022579@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240018 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:06:55 -0000 Author: mjacob Date: Sun Sep 2 15:06:55 2012 New Revision: 240018 URL: http://svn.freebsd.org/changeset/base/240018 Log: MFC of 239219 Remove extraneous newline. Modified: stable/9/sys/dev/isp/isp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp.c ============================================================================== --- stable/9/sys/dev/isp/isp.c Sun Sep 2 15:05:39 2012 (r240017) +++ stable/9/sys/dev/isp/isp.c Sun Sep 2 15:06:55 2012 (r240018) @@ -939,7 +939,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); mbs.param[1] = code_org; mbs.param[2] = ucd.np[0]; - isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x\n", ucd.np[3], code_org); + isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x", ucd.np[3], code_org); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:07:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95166106566B; Sun, 2 Sep 2012 15:07:51 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9618FC08; Sun, 2 Sep 2012 15:07:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82F7pH4022752; Sun, 2 Sep 2012 15:07:51 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82F7pk0022750; Sun, 2 Sep 2012 15:07:51 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021507.q82F7pk0022750@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240019 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:07:51 -0000 Author: mjacob Date: Sun Sep 2 15:07:51 2012 New Revision: 240019 URL: http://svn.freebsd.org/changeset/base/240019 Log: MFC of 239330 On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED. Modified: stable/9/sys/dev/isp/isp_freebsd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:06:55 2012 (r240018) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 15:07:51 2012 (r240019) @@ -1154,10 +1154,27 @@ create_lun_state(ispsoftc_t *isp, int bu static ISP_INLINE void destroy_lun_state(ispsoftc_t *isp, tstate_t *tptr) { + union ccb *ccb; struct tslist *lhp; KASSERT((tptr->hold != 0), ("tptr is not held")); KASSERT((tptr->hold == 1), ("tptr still held (%d)", tptr->hold)); + do { + ccb = (union ccb *)SLIST_FIRST(&tptr->atios); + if (ccb) { + SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + } + } while (ccb); + do { + ccb = (union ccb *)SLIST_FIRST(&tptr->inots); + if (ccb) { + SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); + ccb->ccb_h.status = CAM_REQ_ABORTED; + xpt_done(ccb); + } + } while (ccb); ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, tptr->owner, "destroyed tstate\n"); @@ -1472,8 +1489,8 @@ done: } ccb->ccb_h.status = status; if (status == CAM_REQ_CMP) { - xpt_print(ccb->ccb_h.path, "lun now disabled for target mode\n"); destroy_lun_state(isp, tptr); + xpt_print(ccb->ccb_h.path, "lun now disabled for target mode\n"); } else { if (tptr) rls_lun_statep(isp, tptr); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:18:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C2B21065678; Sun, 2 Sep 2012 15:18:09 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5361F8FC1F; Sun, 2 Sep 2012 15:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FI9QE024220; Sun, 2 Sep 2012 15:18:09 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FI90r024218; Sun, 2 Sep 2012 15:18:09 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021518.q82FI90r024218@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240020 - stable/9/sys/dev/ispfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 15:18:09 -0000 Author: mjacob Date: Sun Sep 2 15:18:08 2012 New Revision: 240020 URL: http://svn.freebsd.org/changeset/base/240020 Log: MFC of 238806 Switch to FC-Tape f/w for the 23XX cards. Modified: stable/9/sys/dev/ispfw/asm_2300.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ispfw/asm_2300.h ============================================================================== --- stable/9/sys/dev/ispfw/asm_2300.h Sun Sep 2 15:07:51 2012 (r240019) +++ stable/9/sys/dev/ispfw/asm_2300.h Sun Sep 2 15:18:08 2012 (r240020) @@ -27,17 +27,17 @@ /************************************************************************ * * - * --- ISP2300 Initiator/Target Firmware --- * - * with Fabric support (Public Loop), with expanded LUN * - * addressing and 2K port logins. * + * --- ISP2300 Initiator/Target Firmware --- * + * with Fabric (Public Loop), Point-point, * + * expanded LUN addressing for FCTAPE, and 2K port logins * * * ************************************************************************/ /* - * Firmware Version 3.03.26 (16:54 Aug 14, 2007) + * Firmware Version 3.03.26 (16:58 Aug 14, 2007) */ static const uint16_t isp_2300_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0xd048, 0x0000, 0x0003, 0x0003, 0x001a, - 0x0107, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x0470, 0x0000, 0x0000, 0xddef, 0x0000, 0x0003, 0x0003, 0x001a, + 0x0117, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, @@ -50,487 +50,496 @@ static const uint16_t isp_2300_risc_code 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, 0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78, - 0x7883, 0x0004, 0x2089, 0x2bf2, 0x2051, 0x1800, 0x2a70, 0x20e1, - 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e53, 0x2029, - 0x3500, 0x2031, 0xffff, 0x2039, 0x34c8, 0x2021, 0x0200, 0x20e9, + 0x7883, 0x0004, 0x2089, 0x2c69, 0x2051, 0x1800, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e51, 0x2029, + 0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476, - 0x00e6, 0x2071, 0x1aa0, 0x2472, 0x00ee, 0x20a1, 0x1cc8, 0x716c, + 0x00e6, 0x2071, 0x1aac, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, - 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f19, 0x080c, - 0x5f04, 0x080c, 0x9eae, 0x080c, 0x10d0, 0x080c, 0x12b8, 0x080c, - 0x1a99, 0x080c, 0x0d58, 0x080c, 0x1055, 0x080c, 0x32cc, 0x080c, - 0x75f0, 0x080c, 0x6836, 0x080c, 0x8273, 0x080c, 0x235c, 0x080c, - 0x857b, 0x080c, 0x7c59, 0x080c, 0x2191, 0x080c, 0x22c5, 0x080c, - 0x2351, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f25, 0x080c, + 0x5fc1, 0x080c, 0xa333, 0x080c, 0x10dc, 0x080c, 0x12c4, 0x080c, + 0x1ae1, 0x080c, 0x0d55, 0x080c, 0x1061, 0x080c, 0x3368, 0x080c, + 0x7660, 0x080c, 0x695d, 0x080c, 0x83d5, 0x080c, 0x23a4, 0x080c, + 0x874c, 0x080c, 0x7cf9, 0x080c, 0x21d9, 0x080c, 0x230d, 0x080c, + 0x2399, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, - 0x0089, 0x2004, 0xd084, 0x190c, 0x119d, 0x2071, 0x1800, 0x7003, + 0x0089, 0x2004, 0xd084, 0x190c, 0x11a9, 0x2071, 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c, - 0x4b82, 0x080c, 0x32f3, 0x080c, 0x7661, 0x080c, 0x6d5c, 0x080c, - 0x829f, 0x080c, 0x2b09, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, - 0x0ade, 0x093e, 0x0b9e, 0x0d57, 0x0d57, 0x0d57, 0x080c, 0x0dc4, + 0x4c32, 0x080c, 0x338f, 0x080c, 0x76d1, 0x080c, 0x6e62, 0x080c, + 0x8401, 0x080c, 0x2b72, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, + 0x0ade, 0x093e, 0x0b9e, 0x0d54, 0x0d54, 0x0d54, 0x080c, 0x0dc3, 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001, - 0x1904, 0x0ab1, 0x080c, 0x0ecd, 0x080c, 0x72e5, 0x0150, 0x080c, - 0x7308, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, - 0x0478, 0x080c, 0x7212, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab1, - 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab1, 0x080c, 0x8253, 0x080c, - 0x8245, 0x2079, 0x0100, 0x782f, 0x0008, 0x2001, 0x0161, 0x2003, + 0x1904, 0x0ab1, 0x080c, 0x0e93, 0x080c, 0x7351, 0x0150, 0x080c, + 0x7374, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, + 0x0478, 0x080c, 0x727e, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab1, + 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab1, 0x080c, 0x83b5, 0x080c, + 0x83a7, 0x2079, 0x0100, 0x782f, 0x0008, 0x2001, 0x0161, 0x2003, 0x0001, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, - 0x7176, 0x080c, 0x835e, 0x2011, 0x7169, 0x080c, 0x8474, 0x2011, - 0x5d5f, 0x080c, 0x835e, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, - 0x080c, 0x5607, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0ab1, - 0x2011, 0x5d5f, 0x080c, 0x835e, 0x2011, 0x7176, 0x080c, 0x835e, - 0x2011, 0x7169, 0x080c, 0x8474, 0x2001, 0x0265, 0x2001, 0x0205, + 0x71cd, 0x080c, 0x84c2, 0x2011, 0x71c0, 0x080c, 0x85e0, 0x2011, + 0x5e1c, 0x080c, 0x84c2, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, + 0x080c, 0x56c4, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0ab1, + 0x2011, 0x5e1c, 0x080c, 0x84c2, 0x2011, 0x71cd, 0x080c, 0x84c2, + 0x2011, 0x71c0, 0x080c, 0x85e0, 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x1983, - 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5eac, - 0x00ce, 0x0804, 0x0ab1, 0x780f, 0x006b, 0x7a28, 0x080c, 0x72ed, + 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5f69, + 0x00ce, 0x0804, 0x0ab1, 0x780f, 0x006b, 0x7a28, 0x080c, 0x7359, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, - 0x8010, 0x73d4, 0x2001, 0x1984, 0x2003, 0x0001, 0x080c, 0x29ae, - 0x080c, 0x4abd, 0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, - 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x98cb, 0x2011, 0x0004, 0x080c, - 0xb965, 0x080c, 0x664c, 0x080c, 0x72e5, 0x1120, 0x080c, 0x29f2, - 0x02e0, 0x0400, 0x080c, 0x5eb3, 0x0140, 0x7093, 0x0001, 0x70cf, - 0x0000, 0x080c, 0x57d9, 0x0804, 0x0ab1, 0x080c, 0x55a7, 0xd094, - 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x55ab, - 0xd0d4, 0x1118, 0x080c, 0x29f2, 0x1270, 0x2011, 0x180c, 0x2204, - 0xc0bc, 0x00a8, 0x080c, 0x55ab, 0xd0d4, 0x1db8, 0x2011, 0x180c, + 0x8010, 0x73d4, 0x2001, 0x1984, 0x2003, 0x0001, 0x080c, 0x2a17, + 0x080c, 0x4b6d, 0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, + 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x9b9c, 0x2011, 0x0004, 0x080c, + 0xc1dd, 0x080c, 0x6758, 0x080c, 0x7351, 0x1120, 0x080c, 0x2a5b, + 0x02e0, 0x0400, 0x080c, 0x5f70, 0x0140, 0x7093, 0x0001, 0x70cf, + 0x0000, 0x080c, 0x5896, 0x0804, 0x0ab1, 0x080c, 0x5664, 0xd094, + 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5668, + 0xd0d4, 0x1118, 0x080c, 0x2a5b, 0x1270, 0x2011, 0x180c, 0x2204, + 0xc0bc, 0x00a8, 0x080c, 0x5668, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, - 0x080c, 0x673e, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, - 0x080c, 0x6704, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707b, - 0x0000, 0x080c, 0x72e5, 0x1130, 0x70ac, 0x9005, 0x1168, 0x080c, - 0xbc7a, 0x0050, 0x080c, 0xbc7a, 0x70d8, 0xd09c, 0x1128, 0x70ac, - 0x9005, 0x0110, 0x080c, 0x5e89, 0x70e3, 0x0000, 0x70df, 0x0000, - 0x70a3, 0x0000, 0x080c, 0x29fa, 0x0228, 0x2011, 0x0101, 0x2204, - 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x72e5, 0x1178, 0x9016, 0x0016, - 0x080c, 0x27b7, 0x2019, 0x194a, 0x211a, 0x001e, 0x705b, 0xffff, - 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x194a, 0x201b, + 0x080c, 0x6865, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, + 0x080c, 0x682b, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707b, + 0x0000, 0x080c, 0x7351, 0x1130, 0x70ac, 0x9005, 0x1168, 0x080c, + 0xc617, 0x0050, 0x080c, 0xc617, 0x70d8, 0xd09c, 0x1128, 0x70ac, + 0x9005, 0x0110, 0x080c, 0x5f46, 0x70e3, 0x0000, 0x70df, 0x0000, + 0x70a3, 0x0000, 0x080c, 0x2a63, 0x0228, 0x2011, 0x0101, 0x2204, + 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x7351, 0x1178, 0x9016, 0x0016, + 0x080c, 0x2820, 0x2019, 0x1949, 0x211a, 0x001e, 0x705b, 0xffff, + 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x1949, 0x201b, 0x0000, 0x2079, 0x185e, 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72da, - 0x080c, 0x72e5, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, - 0x080c, 0xb965, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, + 0x080c, 0x7351, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, + 0x080c, 0xc1dd, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, - 0x00fe, 0x080c, 0x2e5f, 0x2011, 0x0005, 0x080c, 0x99d6, 0x080c, - 0x8c37, 0x080c, 0x72e5, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, - 0x080c, 0x27b7, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, + 0x00fe, 0x080c, 0x2ed6, 0x2011, 0x0005, 0x080c, 0x9ca7, 0x080c, + 0x8e38, 0x080c, 0x7351, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, + 0x080c, 0x2820, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x2011, - 0x0005, 0x080c, 0x99d6, 0x080c, 0x8c37, 0x080c, 0x72e5, 0x0148, - 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x27b7, 0x61e2, 0x001e, - 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x72e5, - 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x72e5, + 0x0005, 0x080c, 0x9ca7, 0x080c, 0x8e38, 0x080c, 0x7351, 0x0148, + 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2820, 0x61e2, 0x001e, + 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x7351, + 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x7351, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, - 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x3162, + 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x31fe, 0x8108, 0x1f04, 0x0ac5, 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, 0x707e, 0x70af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0b9b, 0x70a8, - 0x9086, 0xffff, 0x0130, 0x080c, 0x2e5f, 0x080c, 0x8c37, 0x0804, + 0x9086, 0xffff, 0x0130, 0x080c, 0x2ed6, 0x080c, 0x8e38, 0x0804, 0x0b9b, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, - 0x080c, 0x31c5, 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, - 0x2fd8, 0x080c, 0x8c37, 0x70d8, 0xd094, 0x1904, 0x0b9b, 0x2011, - 0x0001, 0x080c, 0xbef8, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, - 0x3012, 0x080c, 0x8c37, 0x0804, 0x0b9b, 0x70e0, 0x9005, 0x1904, + 0x080c, 0x3261, 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, + 0x306e, 0x080c, 0x8e38, 0x70d8, 0xd094, 0x1904, 0x0b9b, 0x2011, + 0x0001, 0x080c, 0xc8ce, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, + 0x30a8, 0x080c, 0x8e38, 0x0804, 0x0b9b, 0x70e0, 0x9005, 0x1904, 0x0b9b, 0x70a4, 0x9005, 0x1904, 0x0b9b, 0x70d8, 0xd0a4, 0x0118, - 0xd0b4, 0x0904, 0x0b9b, 0x080c, 0x6704, 0x1904, 0x0b9b, 0x080c, - 0x6757, 0x1904, 0x0b9b, 0x080c, 0x673e, 0x01c0, 0x0156, 0x00c6, - 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6411, 0x1118, 0xb800, + 0xd0b4, 0x0904, 0x0b9b, 0x080c, 0x682b, 0x1904, 0x0b9b, 0x080c, + 0x687e, 0x1904, 0x0b9b, 0x080c, 0x6865, 0x01c0, 0x0156, 0x00c6, + 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x64fc, 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b3b, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0b9b, 0x0006, 0x2001, - 0x0103, 0x2003, 0x006b, 0x000e, 0x2011, 0x1990, 0x080c, 0x0f89, - 0x2011, 0x19aa, 0x080c, 0x0f89, 0x7030, 0xc08c, 0x7032, 0x7003, - 0x0003, 0x70ab, 0xffff, 0x080c, 0x0ecd, 0x9006, 0x080c, 0x264c, - 0x080c, 0x31c5, 0x0118, 0x080c, 0x4c5a, 0x0050, 0x0036, 0x0046, - 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4c74, 0x004e, 0x003e, - 0x00f6, 0x2079, 0x0100, 0x080c, 0x7308, 0x0150, 0x080c, 0x72e5, + 0x0103, 0x2003, 0x006b, 0x000e, 0x2011, 0x1990, 0x080c, 0x0f95, + 0x2011, 0x19aa, 0x080c, 0x0f95, 0x7030, 0xc08c, 0x7032, 0x7003, + 0x0003, 0x70ab, 0xffff, 0x080c, 0x0e75, 0x9006, 0x080c, 0x26b1, + 0x080c, 0x3261, 0x0118, 0x080c, 0x4d0a, 0x0050, 0x0036, 0x0046, + 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4d24, 0x004e, 0x003e, + 0x00f6, 0x2079, 0x0100, 0x080c, 0x7374, 0x0150, 0x080c, 0x7351, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0x19c5, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, - 0x0000, 0x080c, 0x99d6, 0x2011, 0x0000, 0x080c, 0x99e0, 0x080c, - 0x8c37, 0x080c, 0x8d06, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046, + 0x0000, 0x080c, 0x9ca7, 0x2011, 0x0000, 0x080c, 0x9cb1, 0x080c, + 0x8e38, 0x080c, 0x8f0e, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, - 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5e72, 0x7940, 0x918c, + 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5f2f, 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c2b, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, 0x080c, - 0x2a75, 0x1148, 0x2001, 0x0001, 0x080c, 0x29dd, 0x2001, 0x0001, - 0x080c, 0x29c0, 0x00b8, 0x080c, 0x2a7d, 0x1138, 0x9006, 0x080c, - 0x29dd, 0x9006, 0x080c, 0x29c0, 0x0068, 0x080c, 0x2a85, 0x1d50, - 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x27eb, - 0x0804, 0x0d0a, 0x080c, 0x72f6, 0x0148, 0x080c, 0x7308, 0x1118, - 0x080c, 0x75eb, 0x0050, 0x080c, 0x72ed, 0x0dd0, 0x080c, 0x75e6, - 0x080c, 0x75dc, 0x080c, 0x7212, 0x0058, 0x080c, 0x72e5, 0x0140, - 0x2009, 0x00f8, 0x080c, 0x5e72, 0x7843, 0x0090, 0x7843, 0x0010, - 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x72e5, 0x0138, - 0x7824, 0xd0ac, 0x1904, 0x0d0f, 0x1f04, 0x0c0a, 0x0070, 0x7824, - 0x080c, 0x72ff, 0x0118, 0xd0ac, 0x1904, 0x0d0f, 0x9084, 0x1800, - 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d0f, 0x2001, 0x0001, 0x080c, - 0x264c, 0x0804, 0x0d22, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, - 0x080c, 0x2a75, 0x1148, 0x2001, 0x0001, 0x080c, 0x29dd, 0x2001, - 0x0001, 0x080c, 0x29c0, 0x00b8, 0x080c, 0x2a7d, 0x1138, 0x9006, - 0x080c, 0x29dd, 0x9006, 0x080c, 0x29c0, 0x0068, 0x080c, 0x2a85, + 0x2ade, 0x1148, 0x2001, 0x0001, 0x080c, 0x2a46, 0x2001, 0x0001, + 0x080c, 0x2a29, 0x00b8, 0x080c, 0x2ae6, 0x1138, 0x9006, 0x080c, + 0x2a46, 0x9006, 0x080c, 0x2a29, 0x0068, 0x080c, 0x2aee, 0x1d50, + 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2854, + 0x0804, 0x0d0b, 0x080c, 0x7362, 0x0148, 0x080c, 0x7374, 0x1118, + 0x080c, 0x765b, 0x0050, 0x080c, 0x7359, 0x0dd0, 0x080c, 0x7656, + 0x080c, 0x764c, 0x080c, 0x727e, 0x0058, 0x080c, 0x7351, 0x0140, + 0x2009, 0x00f8, 0x080c, 0x5f2f, 0x7843, 0x0090, 0x7843, 0x0010, + 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x7351, 0x0138, + 0x7824, 0xd0ac, 0x1904, 0x0d10, 0x1f04, 0x0c0a, 0x0070, 0x7824, + 0x080c, 0x736b, 0x0118, 0xd0ac, 0x1904, 0x0d10, 0x9084, 0x1800, + 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d10, 0x2001, 0x0001, 0x080c, + 0x26b1, 0x0804, 0x0d23, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, + 0x080c, 0x2ade, 0x1148, 0x2001, 0x0001, 0x080c, 0x2a46, 0x2001, + 0x0001, 0x080c, 0x2a29, 0x00b8, 0x080c, 0x2ae6, 0x1138, 0x9006, + 0x080c, 0x2a46, 0x9006, 0x080c, 0x2a29, 0x0068, 0x080c, 0x2aee, 0x1d50, 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, - 0x27eb, 0x0804, 0x0d0a, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, - 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2a8d, 0x9085, 0x2000, - 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c64, 0x080c, 0x8454, + 0x2854, 0x0804, 0x0d0b, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, + 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2af6, 0x9085, 0x2000, + 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c64, 0x080c, 0x85c0, 0x1f04, 0x0c64, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, - 0x793a, 0x080c, 0x72f6, 0x0148, 0x080c, 0x7308, 0x1118, 0x080c, - 0x75eb, 0x0050, 0x080c, 0x72ed, 0x0dd0, 0x080c, 0x75e6, 0x080c, - 0x75dc, 0x080c, 0x7212, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5e72, + 0x793a, 0x080c, 0x7362, 0x0148, 0x080c, 0x7374, 0x1118, 0x080c, + 0x765b, 0x0050, 0x080c, 0x7359, 0x0dd0, 0x080c, 0x7656, 0x080c, + 0x764c, 0x080c, 0x727e, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5f2f, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c8a, 0x7850, 0x9085, 0x1400, - 0x7852, 0x080c, 0x72e5, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, - 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x8454, 0x7820, 0xd09c, - 0x1580, 0x080c, 0x72e5, 0x0904, 0x0cef, 0x7824, 0xd0ac, 0x1904, - 0x0d0f, 0x080c, 0x7308, 0x1528, 0x0046, 0x2021, 0x0320, 0x8421, - 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2a8d, 0x7824, 0x9084, - 0x1800, 0x1160, 0x9484, 0x0fff, 0x1138, 0x2001, 0x1810, 0x2004, - 0xd0fc, 0x0110, 0x080c, 0x0d34, 0x8421, 0x1158, 0x1d04, 0x0cca, - 0x080c, 0x8454, 0x080c, 0x75e6, 0x080c, 0x75dc, 0x7003, 0x0001, - 0x04f0, 0x8319, 0x1948, 0x1d04, 0x0cd7, 0x080c, 0x8454, 0x2009, - 0x1977, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b, - 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2a6e, 0x7924, - 0x080c, 0x2a8d, 0xd19c, 0x0110, 0x080c, 0x29ae, 0x00d8, 0x080c, - 0x72f6, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x72bd, 0x7003, - 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2a8d, 0x7824, 0x080c, - 0x72ff, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003, - 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x264c, 0x0078, 0x2009, - 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906, - 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, 0x9085, - 0x0400, 0x7852, 0x2001, 0x1984, 0x2003, 0x0000, 0x9006, 0x78f2, - 0x015e, 0x003e, 0x000e, 0x080c, 0x55b6, 0x090c, 0x0e64, 0x012e, - 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, - 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, - 0x8454, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, - 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189f, 0x7004, - 0x9086, 0x0001, 0x1110, 0x080c, 0x32f3, 0x00ee, 0x0005, 0x0005, - 0x2a70, 0x2061, 0x1988, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, - 0x001a, 0x600f, 0x0107, 0x2001, 0x1959, 0x900e, 0x2102, 0x7192, - 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, - 0x0008, 0x715a, 0x7063, 0xffff, 0x717a, 0x717e, 0x080c, 0xbc7a, - 0x2061, 0x1949, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, - 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, - 0x2061, 0x1951, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, - 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1965, - 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, - 0x2001, 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x6411, 0x1178, - 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, - 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, - 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, - 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dc6, - 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, - 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, - 0x3900, 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, - 0x78b2, 0x2001, 0x19e5, 0x2004, 0x78b6, 0x2001, 0x1a61, 0x2004, - 0x78ba, 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, - 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a84, - 0x7a08, 0x226a, 0x2069, 0x1a85, 0x7a18, 0x226a, 0x8d68, 0x7a1c, - 0x226a, 0x782c, 0x2019, 0x1a92, 0x201a, 0x2019, 0x1a95, 0x9016, - 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, - 0x1a9e, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, - 0x2019, 0x1a93, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, - 0x2069, 0x1a64, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, - 0x8d68, 0x8318, 0x1f04, 0x0e25, 0x002e, 0x003e, 0x00de, 0x015e, - 0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, - 0x2004, 0xd084, 0x0188, 0x2001, 0x19f8, 0x2004, 0x9005, 0x0130, - 0x2001, 0x008b, 0x2004, 0x9084, 0x8004, 0x0dd0, 0x2001, 0x008a, - 0x2003, 0x0002, 0x2003, 0x1001, 0x080c, 0x55b6, 0x1110, 0x080c, - 0x0e9b, 0x0cd0, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, - 0x9084, 0x0600, 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, - 0x2001, 0x017f, 0x2102, 0x0005, 0x00f6, 0x0006, 0x2079, 0x1826, - 0x2f04, 0x8000, 0x207a, 0x080c, 0x2a85, 0x1150, 0x0006, 0x2001, - 0x1974, 0x2004, 0xd0fc, 0x000e, 0x1118, 0x9082, 0x7530, 0x0010, - 0x9082, 0x000f, 0x0258, 0x9006, 0x207a, 0x2079, 0x1829, 0x2f04, - 0x9084, 0x0001, 0x9086, 0x0001, 0x207a, 0x0090, 0x2079, 0x1829, - 0x2f7c, 0x8fff, 0x1138, 0x0026, 0x2011, 0x0080, 0x080c, 0x0ee1, - 0x002e, 0x0030, 0x0026, 0x2011, 0x0000, 0x080c, 0x0ee1, 0x002e, - 0x000e, 0x00fe, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, - 0x0ee1, 0x20a9, 0x0fff, 0x080c, 0x0f02, 0x2011, 0x0040, 0x04c9, - 0x20a9, 0x0fff, 0x080c, 0x0f02, 0x0c80, 0x2011, 0x0040, 0x0488, - 0x2011, 0x0080, 0x0470, 0x0005, 0x0026, 0x70eb, 0x0000, 0x04b1, - 0x1148, 0x080c, 0x2a85, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, - 0x8282, 0x0040, 0x080c, 0x2a85, 0x1118, 0x2011, 0xcdc5, 0x0010, - 0x2011, 0xcac2, 0x0441, 0x002e, 0x0005, 0x080c, 0x55b6, 0x1140, - 0x0026, 0x2001, 0x1800, 0x2004, 0x9084, 0x0007, 0x0013, 0x002e, - 0x0005, 0x0ecc, 0x0eb0, 0x0eb0, 0x0ead, 0x0e64, 0x0eb0, 0x0eb0, - 0x0e64, 0x0016, 0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, - 0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, 0x0005, 0x2001, 0x1839, - 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, 0x190c, 0x0dc4, 0x70e4, - 0xd0e4, 0x0108, 0xc2e5, 0x72e6, 0xd0e4, 0x1118, 0x9294, 0x00c0, - 0x0c01, 0x0005, 0x1d04, 0x0f02, 0x2091, 0x6000, 0x1f04, 0x0f02, - 0x0005, 0x890e, 0x810e, 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, - 0x0005, 0x0006, 0x2200, 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, - 0x0005, 0x01d6, 0x0146, 0x0036, 0x0096, 0x2061, 0x188e, 0x600b, - 0x0000, 0x600f, 0x0000, 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, - 0xffc0, 0x2105, 0x0006, 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, - 0x9016, 0x2049, 0x0bff, 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, - 0x1138, 0x2105, 0x9306, 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, - 0x000e, 0x200f, 0x2001, 0x189e, 0x928a, 0x000e, 0x1638, 0x928a, - 0x0006, 0x2011, 0x0006, 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, - 0x2008, 0x82ff, 0x01b0, 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, - 0x0002, 0x6007, 0x0000, 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, - 0x20e8, 0x21a0, 0x21a8, 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, - 0x002e, 0x009e, 0x003e, 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, - 0x08e8, 0x0016, 0x0026, 0x0096, 0x3348, 0x080c, 0x0f09, 0x2100, - 0x9300, 0x2098, 0x22e0, 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, - 0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, - 0x0005, 0x20e9, 0x0001, 0x71b4, 0x81ff, 0x11c0, 0x9006, 0x2009, - 0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, - 0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0, 0x4001, 0x7078, - 0x8007, 0x717c, 0x810f, 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, - 0x23a0, 0x900e, 0x080c, 0x0da4, 0x2001, 0x0000, 0x810f, 0x20a9, - 0x0002, 0x4001, 0x0005, 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, - 0x0006, 0x080c, 0x1033, 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, - 0x1800, 0x080c, 0x10ac, 0x090c, 0x0dc4, 0x00ee, 0x0005, 0x0086, - 0x00e6, 0x0006, 0x0026, 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, - 0x2071, 0x1800, 0x73bc, 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, - 0x9906, 0x090c, 0x0dc4, 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0dc4, - 0xa000, 0x0c98, 0x012e, 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, - 0x0005, 0x0086, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, - 0x1911, 0x7010, 0x9005, 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, - 0x090c, 0x0dc4, 0xa000, 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, - 0x0005, 0x00e6, 0x2071, 0x1800, 0x0126, 0x2091, 0x8000, 0x70bc, - 0x8001, 0x0270, 0x70be, 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, - 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, - 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, - 0x70bc, 0x90ca, 0x0040, 0x0268, 0x8001, 0x70be, 0x702c, 0x2048, - 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, - 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, - 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, - 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, - 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70bc, 0x8000, 0x70be, - 0x080c, 0x8245, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, - 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, - 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, - 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188e, 0x7000, 0x9005, - 0x11a0, 0x2001, 0x04d4, 0xa802, 0x2048, 0x2009, 0x3500, 0x8940, - 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, - 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188e, 0x7104, - 0x7200, 0x82ff, 0x01d0, 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, - 0x7312, 0x8319, 0x2001, 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, - 0x2040, 0xa95e, 0xaa62, 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, - 0x9188, 0x0040, 0x9291, 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, - 0x1800, 0x74ba, 0x74be, 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, - 0x01e8, 0x908c, 0xf800, 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, - 0x0440, 0x0278, 0x9982, 0x04d4, 0x0288, 0x9982, 0x0800, 0x1270, - 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188e, 0x7010, 0x9902, - 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, - 0x00e6, 0x2071, 0x19f7, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, - 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, - 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x10e4, 0x702b, - 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0xa073, - 0x0000, 0x2071, 0x19f7, 0x701c, 0x9088, 0x1a01, 0x280a, 0x8000, - 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0dc4, 0x7004, - 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe, 0x00ee, - 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x19f7, - 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021, 0x00fe, - 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110, 0x7007, - 0x0006, 0x7000, 0x0002, 0x112d, 0x112b, 0x112b, 0x112b, 0x12a7, - 0x12a7, 0x12a7, 0x12a7, 0x080c, 0x0dc4, 0x701c, 0x7120, 0x9106, - 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110, 0x7007, - 0x0000, 0x0005, 0x0096, 0x9180, 0x1a01, 0x2004, 0x700a, 0x2048, - 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa890, 0x7802, - 0xa894, 0x7806, 0xa898, 0x780a, 0xa89c, 0x780e, 0xa87c, 0x700e, - 0xa874, 0x7016, 0xa878, 0x701a, 0xa86c, 0x009e, 0xd084, 0x0120, - 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1, 0x0005, - 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, - 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b, 0x0020, - 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0136, - 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9, 0x0000, - 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, - 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006, 0x8203, - 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001, 0x015e, - 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x0016, 0x2009, 0x19f7, - 0x2104, 0xc095, 0x200a, 0x080c, 0x110a, 0x001e, 0x0005, 0x0016, - 0x00e6, 0x2071, 0x19f7, 0x00f6, 0x2079, 0x0080, 0x792c, 0xd1bc, - 0x190c, 0x0dbd, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, - 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x111b, 0x11c5, - 0x11f9, 0x0dc4, 0x0dc4, 0x12b3, 0x0dc4, 0x918c, 0x0700, 0x1550, - 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, - 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, - 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, - 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x1160, 0x0005, 0x7008, - 0x0096, 0x2048, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, - 0x111b, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0200, 0x009e, - 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, - 0x7802, 0x7804, 0x7806, 0x080c, 0x1175, 0x0005, 0x7008, 0x0096, - 0x2048, 0xa873, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, - 0x7008, 0x2048, 0x7800, 0xa892, 0x7804, 0xa896, 0x7808, 0xa89a, - 0x780c, 0xa89e, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, - 0x00d6, 0x7008, 0x2048, 0x2001, 0x18ba, 0x2004, 0x9906, 0x1128, - 0xa8a0, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, - 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa8a0, 0x0086, 0x2940, - 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x110a, 0x0005, 0x00de, - 0x009e, 0x080c, 0x110a, 0x0005, 0xa8ac, 0xd08c, 0x0005, 0x0096, - 0xa0a4, 0x904d, 0x090c, 0x0dc4, 0xa070, 0x908e, 0x0100, 0x0130, - 0xa87f, 0x0030, 0xa887, 0x0000, 0xa89b, 0x4002, 0xa898, 0x908e, - 0x006b, 0x090c, 0x469d, 0x080c, 0x6b11, 0xa0a3, 0x0000, 0xa0a7, - 0x0000, 0x2848, 0x080c, 0x1033, 0x009e, 0x0005, 0x00a6, 0xa0a4, - 0x904d, 0x090c, 0x0dc4, 0xa070, 0x908e, 0x0100, 0x0128, 0xa87f, - 0x0001, 0xa887, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, - 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, - 0x9084, 0xffc0, 0x9080, 0x0002, 0xa07a, 0xa176, 0xb000, 0xa07e, - 0x2810, 0x080c, 0x10eb, 0x00c8, 0xa980, 0xa898, 0x0016, 0x0006, - 0x080c, 0x6b11, 0x000e, 0x001e, 0xd1a4, 0x0128, 0x00c6, 0x2060, - 0x080c, 0x9f18, 0x00ce, 0x7008, 0x2048, 0xa8a3, 0x0000, 0xa8a7, - 0x0000, 0x080c, 0x1033, 0x080c, 0x110a, 0x00ae, 0x0005, 0x0126, - 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, - 0x7002, 0x012e, 0x0005, 0x7007, 0x0000, 0x080c, 0x111b, 0x0005, - 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, 0x1a41, 0x7003, - 0x0000, 0x78bf, 0x00f6, 0x781b, 0x4800, 0x00c1, 0x7803, 0x0003, - 0x780f, 0x0000, 0x20a9, 0x0259, 0x2061, 0xd387, 0x2c0d, 0x7912, - 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04, 0x12ce, 0x7807, 0x0007, - 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, - 0x0000, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, 0x2001, 0x1a42, - 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, - 0x0002, 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, - 0x0031, 0x782b, 0x1a64, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, - 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a64, - 0x602f, 0x1cc8, 0x2001, 0x1819, 0x2004, 0x9082, 0x1cc8, 0x6032, - 0x603b, 0x1f70, 0x2001, 0x31cc, 0xd0fc, 0x190c, 0x0dc4, 0x2001, - 0x1810, 0x2004, 0xd0c4, 0x1128, 0x2001, 0x0003, 0x2004, 0xd0d4, - 0x1118, 0x783f, 0x31cc, 0x0020, 0x9084, 0xc000, 0x783f, 0xb1cc, - 0x00ce, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, 0x9184, 0x0030, - 0x190c, 0x0dbd, 0xd19c, 0x0158, 0x7820, 0x908c, 0xf000, 0x15f0, - 0x908a, 0x0024, 0x1a0c, 0x0dc4, 0x0023, 0x012e, 0x0005, 0x012e, - 0x0005, 0x1366, 0x1366, 0x137d, 0x1382, 0x1386, 0x138b, 0x13b3, - 0x13b7, 0x13c5, 0x13c9, 0x1366, 0x1452, 0x1456, 0x14c6, 0x1366, - 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, 0x1366, - 0x1366, 0x1366, 0x1366, 0x1366, 0x138d, 0x1366, 0x1366, 0x1366, - 0x1366, 0x1366, 0x1366, 0x136a, 0x1368, 0x1366, 0x080c, 0x0dc4, - 0x080c, 0x0dbd, 0x080c, 0x14cd, 0x2009, 0x1a59, 0x2104, 0x8000, - 0x200a, 0x080c, 0x7d22, 0x080c, 0x199b, 0x0005, 0x2009, 0x0048, - 0x2060, 0x080c, 0x9f88, 0x012e, 0x0005, 0x7004, 0xc085, 0xc0b5, - 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, 0x14cd, - 0x080c, 0x1636, 0x0005, 0x080c, 0x0dc4, 0x080c, 0x14cd, 0x2060, - 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, - 0x080c, 0x9f88, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, 0x03e8, - 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, - 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x14d2, 0x2001, 0x0307, - 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, 0x080c, - 0x14cd, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, - 0x2009, 0x0048, 0x080c, 0x9f88, 0x0005, 0x080c, 0x14cd, 0x080c, - 0x0dc4, 0x080c, 0x14cd, 0x080c, 0x143d, 0x7827, 0x0018, 0x79ac, - 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, 0x782b, 0x0000, 0x9065, - 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0400, - 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, - 0x0000, 0xd1bc, 0x090c, 0x0dc4, 0x2001, 0x020d, 0x2003, 0x0050, - 0x2003, 0x0020, 0x0478, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, - 0x1456, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, 0x0dc4, - 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01d8, 0x080c, - 0x7d22, 0x080c, 0x199b, 0x080c, 0xb955, 0x0158, 0xa9b0, 0xa936, - 0xa9b4, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa884, 0xc0bd, - 0xa886, 0xa984, 0x9184, 0x0020, 0x1120, 0xc1ad, 0xa986, 0x080c, - 0xb5c5, 0x0005, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, - 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xd314, 0xd5a4, 0x1118, - 0x080c, 0x14d2, 0x0005, 0x080c, 0x7d22, 0x080c, 0x199b, 0x0005, - 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, - 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, - 0x0120, 0x2001, 0x0016, 0x080c, 0x1553, 0x00fe, 0x007e, 0x006e, - 0x001e, 0x0005, 0x7004, 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, - 0x0004, 0x190c, 0x0dc4, 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, - 0x7106, 0x0016, 0x080c, 0x1619, 0x001e, 0x0148, 0x2001, 0x020d, - 0x2003, 0x0050, 0x2003, 0x0020, 0x080c, 0x14d2, 0x0005, 0x81ff, - 0x190c, 0x0dc4, 0x0005, 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, - 0x0016, 0x00e6, 0x1904, 0x14bb, 0x2071, 0x0200, 0x080c, 0x160d, - 0x080c, 0x1619, 0x05a8, 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048, - 0xa868, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, - 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c, - 0x1679, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, 0x17bd, 0x00fe, - 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, - 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x0419, 0x0040, - 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12de, 0x7803, 0x0001, - 0x00ee, 0x001e, 0x0005, 0x080c, 0x1619, 0x0dd0, 0x2001, 0x020d, - 0x2003, 0x0050, 0x2003, 0x0020, 0x0069, 0x0c90, 0x0031, 0x2060, - 0x2009, 0x0053, 0x080c, 0x9f88, 0x0005, 0x7808, 0xd09c, 0x0de8, - 0x7820, 0x0005, 0x080c, 0x143d, 0x00d6, 0x2069, 0x0200, 0x2009, - 0x01f4, 0x8109, 0x0520, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, - 0x2003, 0x0000, 0x79bc, 0xd1a4, 0x1578, 0x79b8, 0x918c, 0x0fff, - 0x0180, 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, - 0x810c, 0x810c, 0x810c, 0x080c, 0x153f, 0x6827, 0x0001, 0x8109, - 0x1dd0, 0x080c, 0x153f, 0x6827, 0x0002, 0x080c, 0x153f, 0x6804, - 0x9005, 0x1170, 0x682c, 0xd0e4, 0x1540, 0x691c, 0x9184, 0x0014, - 0x0120, 0x6830, 0x9084, 0x9554, 0x15b9, 0x6804, 0x9005, 0x0da8, - 0x79b8, 0xd1ec, 0x1130, 0x0870, 0x080c, 0x7d22, 0x080c, 0x199b, - 0x0090, 0x7827, 0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, - 0x0000, 0x2001, 0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, - 0x0300, 0x7803, 0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, - 0x9086, 0x5400, 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, - 0x0001, 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, - 0x9084, 0x0003, 0x1de0, 0x0005, 0x2079, 0x0001, 0x000e, 0x00f6, - 0x0804, 0x0dc6, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, - 0x9086, 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, - 0xd09c, 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x132a, 0x00ce, - 0x002e, 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, - 0x8080, 0x0059, 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, - 0x3900, 0x8000, 0x2004, 0x080c, 0x0dc4, 0x2009, 0x180c, 0x2104, - 0xc0f4, 0x200a, 0x2009, 0xff00, 0x8109, 0x0904, 0x15d1, 0x7a18, - 0x9284, 0x0030, 0x0904, 0x15cc, 0x9284, 0x0048, 0x9086, 0x0008, - 0x1904, 0x15cc, 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, - 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, - 0x00f6, 0x0026, 0x0016, 0x2009, 0x1a5c, 0x2104, 0x8000, 0x0208, - 0x200a, 0x080c, 0x8689, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, - 0x014e, 0x013e, 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, - 0xd0fc, 0x01d0, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, - 0x0156, 0x00f6, 0x0016, 0x2009, 0x1a5d, 0x2104, 0x8000, 0x0208, - 0x200a, 0x080c, 0x1d94, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, - 0x01de, 0x01ce, 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x157c, - 0x0005, 0x2001, 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, - 0x0030, 0x0508, 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, - 0x19d3, 0x2004, 0x9005, 0x01b8, 0x2001, 0x1a44, 0x2004, 0x9086, - 0x0000, 0x0188, 0x2009, 0x1a5b, 0x2104, 0x8000, 0x0208, 0x200a, - 0x080c, 0x96a1, 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, - 0xff00, 0x0804, 0x157c, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, - 0x7a3a, 0x781b, 0x8080, 0x080c, 0x1575, 0x1108, 0x0005, 0x792c, - 0x3900, 0x8000, 0x2004, 0x080c, 0x0dc4, 0x7037, 0x0001, 0x7150, - 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, - 0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, 0x7037, 0x0002, - 0x7058, 0x9084, 0xff00, 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, - 0x1a5a, 0x2404, 0x8000, 0x0208, 0x2022, 0x080c, 0x7d22, 0x080c, - 0x199b, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, 0x0c11, 0x1108, - 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0879, 0x6120, 0x9186, - 0x0000, 0x0560, 0x9186, 0x0002, 0x0548, 0x7358, 0x745c, 0x6014, - 0x905d, 0x0520, 0x2b48, 0xab42, 0xac3e, 0x2001, 0x1880, 0x2004, - 0xd0b4, 0x1138, 0x601c, 0xd0e4, 0x1120, 0xa83b, 0x7fff, 0xa837, - 0xffff, 0x080c, 0x1f90, 0x1190, 0x080c, 0x181a, 0x2a00, 0xa816, + 0x7852, 0x080c, 0x7351, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, + 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x85c0, 0x7820, 0xd09c, + 0x1588, 0x080c, 0x7351, 0x0904, 0x0cf0, 0x7824, 0xd0ac, 0x1904, + 0x0d10, 0x080c, 0x7374, 0x1530, 0x0046, 0x2021, 0x0320, 0x8421, + 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2af6, 0x7824, 0x9084, + 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004, + 0x9084, 0x9000, 0x0110, 0x080c, 0x0d31, 0x8421, 0x1158, 0x1d04, + 0x0ccb, 0x080c, 0x85c0, 0x080c, 0x7656, 0x080c, 0x764c, 0x7003, + 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0cd8, 0x080c, 0x85c0, + 0x2009, 0x1977, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, + 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2ad7, + 0x7924, 0x080c, 0x2af6, 0xd19c, 0x0110, 0x080c, 0x2a17, 0x00d8, + 0x080c, 0x7362, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x7329, + 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2af6, 0x7824, + 0x080c, 0x736b, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, + 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x26b1, 0x0078, + 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, + 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, + 0x9085, 0x0400, 0x7852, 0x2001, 0x1984, 0x2003, 0x0000, 0x9006, + 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x001e, + 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, + 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x85c0, 0x015e, 0x00fe, + 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, + 0x0005, 0x00e6, 0x2071, 0x189f, 0x7004, 0x9086, 0x0001, 0x1110, + 0x080c, 0x338f, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x1988, + 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x001a, 0x600f, 0x0117, + 0x2001, 0x1958, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, + 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a, 0x7063, + 0xffff, 0x717a, 0x717e, 0x080c, 0xc617, 0x70e7, 0x00c0, 0x2061, + 0x1948, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, + 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, + 0x1950, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, + 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1965, 0x6003, + 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, + 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x64fc, 0x1178, 0xb804, + 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, + 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, + 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, 0x0000, + 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dc5, 0x0006, + 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, + 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, + 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, 0x78b2, + 0x2001, 0x19e5, 0x2004, 0x78b6, 0x2001, 0x1a61, 0x2004, 0x78ba, + 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, + 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a84, 0x7a08, + 0x226a, 0x2069, 0x1a85, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, + 0x782c, 0x2019, 0x1a92, 0x201a, 0x2019, 0x1a95, 0x9016, 0x7808, + 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1aaa, + 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, + 0x1a93, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, + 0x1a64, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, + 0x8318, 0x1f04, 0x0e24, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, + 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x0188, 0x2001, 0x19f8, 0x2004, 0x9005, 0x0130, 0x2001, + 0x008b, 0x2004, 0x9084, 0x8004, 0x0dd0, 0x2001, 0x008a, 0x2003, + 0x0002, 0x2003, 0x1001, 0x080c, 0x5673, 0x1108, 0x0099, 0x0cd8, + 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600, + 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f, + 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, 0x0eed, + 0x20a9, 0x0900, 0x080c, 0x0f0e, 0x2011, 0x0040, 0x080c, 0x0eed, + 0x20a9, 0x0900, 0x080c, 0x0f0e, 0x0c78, 0x0026, 0x080c, 0x0efa, + 0x1118, 0x2011, 0x0040, 0x0098, 0x2011, 0x010e, 0x2214, 0x9294, + 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, + 0x6840, 0xd0e4, 0x70eb, 0x0000, 0x1120, 0x70eb, 0x0fa0, 0x080c, + 0x0eff, 0x002e, 0x0005, 0x0026, 0x080c, 0x0efa, 0x0128, 0xd0a4, + 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0eff, + 0x002e, 0x0005, 0x0026, 0x70eb, 0x0000, 0x080c, 0x0efa, 0x1148, + 0x080c, 0x2aee, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, + 0x0040, 0x080c, 0x2aee, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, + 0xcac2, 0x080c, 0x0eff, 0x002e, 0x0005, 0x00e6, 0x0006, 0x2071, + 0x1800, 0xd0b4, 0x70e4, 0x1110, 0xc0e4, 0x0048, 0x0006, 0x3b00, + 0x9084, 0xff3f, 0x20d8, 0x000e, 0x70eb, 0x0000, 0xc0e5, 0x0079, + 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, 0x70e4, + 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, 0x70e6, + 0x7000, 0x9084, 0x0007, 0x000b, 0x0005, 0x0ebc, 0x0e93, 0x0e93, + 0x0e75, 0x0ea2, 0x0e93, 0x0e93, 0x0ea2, 0x0016, 0x3b08, 0x3a00, + 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, + 0x001e, 0x0005, 0x2001, 0x1839, 0x2004, 0xd0dc, 0x0005, 0x9e86, + 0x1800, 0x190c, 0x0dc3, 0x70e4, 0xd0e4, 0x0108, 0xc2e5, 0x72e6, + 0xd0e4, 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0f0e, + 0x2091, 0x6000, 0x1f04, 0x0f0e, 0x0005, 0x890e, 0x810e, 0x810f, + 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, 0x914d, + 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, 0x0036, + 0x0096, 0x2061, 0x188e, 0x600b, 0x0000, 0x600f, 0x0000, 0x6003, + 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, 0x2001, + 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, 0xab02, + 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, 0x0120, + 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, 0x189e, + 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, 0x1210, + 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, 0x8200, + 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, 0x0026, + 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, 0x4104, + 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, 0x014e, + 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, 0x0096, + 0x3348, 0x080c, 0x0f15, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, + 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, + 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, 0x71b4, + 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, + 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, + 0x0008, 0x23a0, 0x4001, 0x7078, 0x8007, 0x717c, 0x810f, 0x20a9, + 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0da3, + 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x89ff, + 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x103f, 0x009e, + 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x10b8, 0x090c, + 0x0dc3, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, 0x0036, + 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73bc, 0x702c, + 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0dc3, 0x2300, + 0x9202, 0x0120, 0x1a0c, 0x0dc3, 0xa000, 0x0c98, 0x012e, 0x003e, + 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, 0x0006, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1911, 0x7010, 0x9005, 0x0140, + 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0dc3, 0xa000, 0x0cc8, + 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, 0x1800, + 0x0126, 0x2091, 0x8000, 0x70bc, 0x8001, 0x0270, 0x70be, 0x702c, + 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, + 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, + 0x2091, 0x8000, 0x2071, 0x1800, 0x70bc, 0x90ca, 0x0040, 0x0268, + 0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, 0x0000, + 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, + 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, + 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x83a7, 0x012e, 0x00ee, + 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, + 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, + 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, + 0x2071, 0x188e, 0x7000, 0x9005, 0x11a0, 0x2001, 0x0534, 0xa802, + 0x2048, 0x2009, 0x4d00, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, + 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, 0x0040, + 0x0c90, 0x2071, 0x188e, 0x7104, 0x7200, 0x82ff, 0x01d0, 0x7308, + 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, 0x0800, + 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, 0x8420, + 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, 0x0000, + 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74ba, 0x74be, 0x0005, + 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, 0x1168, + 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x0534, + 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, + 0x2071, 0x188e, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, + 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19f7, 0x7007, + 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, + 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, + 0x7022, 0x1f04, 0x10f0, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, + 0x2091, 0x8000, 0x00e6, 0xa073, 0x0000, 0x2071, 0x19f7, 0x701c, + 0x9088, 0x1a01, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, + 0x9106, 0x090c, 0x0dc3, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, + 0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x00e6, 0x2071, 0x19f7, 0x7004, 0x9005, 0x1128, 0x00f6, + 0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, + 0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1139, + 0x1137, 0x1137, 0x1137, 0x12b3, 0x12b3, 0x12b3, 0x12b3, 0x080c, + 0x0dc3, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, + 0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, + 0x1a01, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, + 0x782b, 0x0026, 0xa890, 0x7802, 0xa894, 0x7806, 0xa898, 0x780a, + 0xa89c, 0x780e, 0xa87c, 0x700e, 0xa874, 0x7016, 0xa878, 0x701a, + 0xa86c, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, + 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, + 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, + 0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, + 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, + 0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, + 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, + 0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, + 0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, + 0x0005, 0x0016, 0x2009, 0x19f7, 0x2104, 0xc095, 0x200a, 0x080c, + 0x1116, 0x001e, 0x0005, 0x0016, 0x00e6, 0x2071, 0x19f7, 0x00f6, + 0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c, 0x0dbc, 0x782b, 0x0002, + 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, + 0x001e, 0x0005, 0x1127, 0x11d1, 0x1205, 0x0dc3, 0x0dc3, 0x12bf, + 0x0dc3, 0x918c, 0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, + 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, + 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, + 0x013e, 0x700c, 0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, + 0x080c, 0x116c, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0100, + 0x009e, 0x7007, 0x0000, 0x080c, 0x1127, 0x0005, 0x7008, 0x0096, + 0x2048, 0xa873, 0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, + 0x700c, 0x9005, 0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, + 0x1181, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0200, 0x009e, + 0x7007, 0x0000, 0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa892, + 0x7804, 0xa896, 0x7808, 0xa89a, 0x780c, 0xa89e, 0xa873, 0x0100, + 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, + 0x18ba, 0x2004, 0x9906, 0x1128, 0xa8a0, 0x080f, 0x00de, 0x009e, + 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, + 0x0150, 0xa8a0, 0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, + 0x080c, 0x1116, 0x0005, 0x00de, 0x009e, 0x080c, 0x1116, 0x0005, + 0xa8ac, 0xd08c, 0x0005, 0x0096, 0xa0a4, 0x904d, 0x090c, 0x0dc3, + 0xa070, 0x908e, 0x0100, 0x0130, 0xa87f, 0x0030, 0xa887, 0x0000, + 0xa89b, 0x4002, 0xa898, 0x908e, 0x006b, 0x090c, 0x4740, 0x080c, + 0x6bf5, 0xa0a3, 0x0000, 0xa0a7, 0x0000, 0x2848, 0x080c, 0x103f, + 0x009e, 0x0005, 0x00a6, 0xa0a4, 0x904d, 0x090c, 0x0dc3, 0xa070, + 0x908e, 0x0100, 0x0128, 0xa87f, 0x0001, 0xa887, 0x0000, 0x00c0, + 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, + 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0xa07a, 0xa176, 0xb000, 0xa07e, 0x2810, 0x080c, 0x10f7, 0x00c8, + 0xa980, 0xa898, 0x0016, 0x0006, 0x080c, 0x6bf5, 0x000e, 0x001e, + 0xd1a4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xa39d, 0x00ce, 0x7008, + 0x2048, 0xa8a3, 0x0000, 0xa8a7, 0x0000, 0x080c, 0x103f, 0x080c, + 0x1116, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, + 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x7007, + 0x0000, 0x080c, 0x1127, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, + 0x0300, 0x2071, 0x1a41, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x781b, + 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9, 0x0266, + 0x2061, 0xe114, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, + 0x1f04, 0x12da, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, + 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c, 0x0110, + 0x7820, 0x0cd8, 0x2001, 0x1a42, 0x2003, 0x0000, 0x78ab, 0x0004, + 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, + 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a64, 0x781f, + 0xff00, 0x781b, 0xb700, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, + 0x781f, 0x0303, 0x2061, 0x1a64, 0x602f, 0x1cd0, 0x2001, 0x1819, + 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b, 0x1fb8, 0x2001, 0x3268, + 0xd0fc, 0x190c, 0x0dc3, 0x2001, 0x1810, 0x2004, 0xd0c4, 0x1128, + 0x2001, 0x0003, 0x2004, 0xd0d4, 0x1118, 0x783f, 0x3268, 0x0020, + 0x9084, 0xc000, 0x783f, 0xb268, 0x00ce, 0x0005, 0x0126, 0x2091, + 0x2200, 0x7908, 0x9184, 0x0030, 0x190c, 0x0dbc, 0xd19c, 0x0158, + 0x7820, 0x908c, 0xf000, 0x15f0, 0x908a, 0x0024, 0x1a0c, 0x0dc3, + 0x0023, 0x012e, 0x0005, 0x012e, 0x0005, 0x1372, 0x1372, 0x1389, + 0x138e, 0x1392, 0x1397, 0x13bf, 0x13c3, 0x13d1, 0x13d5, 0x1372, + 0x1467, 0x146b, 0x14db, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, + 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, + 0x1399, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1376, + 0x1374, 0x1372, 0x080c, 0x0dc3, 0x080c, 0x0dbc, 0x080c, 0x14e2, + 0x2009, 0x1a59, 0x2104, 0x8000, 0x200a, 0x080c, 0x7dcd, 0x080c, + 0x19e3, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xa419, 0x012e, + 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, + 0x7006, 0x0005, 0x080c, 0x14e2, 0x080c, 0x164b, 0x0005, 0x080c, + 0x0dc3, 0x080c, 0x14e2, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, + 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xa419, 0x2001, 0x015d, + 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, + 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, + 0x080c, 0x14e7, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, + 0xc095, 0x7006, 0x0005, 0x080c, 0x14e2, 0x2060, 0x6014, 0x0096, + 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xa419, + 0x0005, 0x080c, 0x14e2, 0x080c, 0x0dc3, 0x080c, 0x14e2, 0x080c, + 0x1452, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, + 0x7828, 0x782b, 0x0000, 0x9065, 0x0138, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, + 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0dc3, + 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x04c0, 0x78ab, + 0x0004, 0x7803, 0x0001, 0x080c, 0x146b, 0x0005, 0x7828, 0x782b, + 0x0000, 0x9065, 0x090c, 0x0dc3, 0x6014, 0x2048, 0x78ab, 0x0004, + 0x918c, 0x0700, 0x01d8, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x080c, + 0xc1cd, 0x0158, 0xa9b0, 0xa936, 0xa9b4, 0xa93a, 0xa83f, 0xffff, + 0xa843, 0xffff, 0xa884, 0xc0bd, 0xa886, 0xa984, 0x9184, 0x0020, + 0x1120, 0xc1ad, 0xa986, 0x080c, 0xbde5, 0x0005, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xc5b0, 0x2029, + 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, + 0x7dbc, 0x080c, 0xe0a1, 0xd5a4, 0x1118, 0x080c, 0x14e7, 0x0005, + 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x0005, 0x781f, 0x0300, 0x7803, + 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, + 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, + 0x080c, 0x1568, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, + 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0dc3, + 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, + 0x162e, 0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x080c, 0x14e7, 0x0005, 0x81ff, 0x190c, 0x0dc3, 0x0005, + 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, + 0x14d0, 0x2071, 0x0200, 0x080c, 0x1622, 0x080c, 0x162e, 0x05a8, + 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048, 0xa868, 0x009e, 0x9084, + 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1548, 0x601c, + 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c, 0x16c1, 0x00fe, 0x00a8, + 0x00f6, 0x2c78, 0x080c, 0x1805, 0x00fe, 0x2009, 0x01f4, 0x8109, + 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, + 0x2004, 0xd0ec, 0x1110, 0x0419, 0x0040, 0x2001, 0x020d, 0x2003, + 0x0020, 0x080c, 0x12ea, 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, + 0x080c, 0x162e, 0x0dd0, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x0069, 0x0c90, 0x0031, 0x2060, 0x2009, 0x0053, 0x080c, + 0xa419, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, + 0x1452, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0520, + 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, + 0xd1a4, 0x1578, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, + 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, + 0x080c, 0x1554, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x080c, 0x1554, + 0x6827, 0x0002, 0x080c, 0x1554, 0x6804, 0x9005, 0x1170, 0x682c, + 0xd0e4, 0x1540, 0x691c, 0x9184, 0x0014, 0x0120, 0x6830, 0x9084, + 0x9554, 0x15b9, 0x6804, 0x9005, 0x0da8, 0x79b8, 0xd1ec, 0x1130, + 0x0870, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x0090, 0x7827, 0x0015, + 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, + 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, + 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, + 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, + 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, + 0x0005, 0x2079, 0x0001, 0x000e, 0x00f6, 0x0804, 0x0dc5, 0x2001, + 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, + 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, + 0x0026, 0x00c6, 0x080c, 0x1336, 0x00ce, 0x002e, 0x001e, 0x000e, + 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, + 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, + 0x080c, 0x0dc3, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009, + 0xff00, 0x8109, 0x0904, 0x15e6, 0x7a18, 0x9284, 0x0030, 0x0904, + 0x15e1, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x15e1, 0x2001, + 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016, + 0x2009, 0x1a5c, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x885a, + 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de, + 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016, + 0x2009, 0x1a5d, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1ddc, + 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, + 0x000e, 0x7818, 0xd0bc, 0x1904, 0x1591, 0x0005, 0x2001, 0x180c, + 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284, + 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19d3, 0x2004, 0x9005, + 0x01b8, 0x2001, 0x1a44, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009, + 0x1a5b, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x994f, 0x2009, + 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1591, + 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, + 0x080c, 0x158a, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, + 0x080c, 0x0dc3, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, + 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, 0x0006, 0x0046, + 0x00e6, 0x2071, 0x0200, 0x7037, 0x0002, 0x7058, 0x9084, 0xff00, + 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, 0x1a5a, 0x2404, 0x8000, + 0x0208, 0x2022, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x9006, 0x00ee, + 0x004e, 0x000e, 0x0005, 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016, + 0x2071, 0x0200, 0x0879, 0x6120, 0x9186, 0x0000, 0x0904, 0x16b6, + 0x9186, 0x0002, 0x0904, 0x16b6, 0x6124, 0xd1dc, 0x01f8, 0x701c, + 0xd08c, 0x0904, 0x16b6, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, + 0xd0bc, 0x0904, 0x16b6, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, + 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x16b6, 0x9c06, 0x15f0, + 0x0126, 0x2091, 0x2600, 0x080c, 0x7d14, 0x012e, 0x7358, 0x745c, + 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, + 0x00be, 0xd0bc, 0x190c, 0xc58b, 0xab42, 0xac3e, 0x2001, 0x1880, + 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, + 0xffff, 0x080c, 0x1fd8, 0x1190, 0x080c, 0x1862, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, - 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x14d2, 0x0005, 0x080c, - 0x0dc4, 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x6818, 0x2ff0, + 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x14e7, 0x0005, 0x080c, + 0x0dc3, 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x693f, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa868, 0x2068, 0xa81a, 0x9d84, 0x000f, - 0x9088, 0x1f70, 0x2165, 0x0002, 0x16ab, 0x16f8, 0x16ab, 0x16ab, - 0x16ab, 0x16da, 0x16ab, 0x16af, 0x16a4, 0x16ef, 0x16ab, 0x16ab, - 0x16ab, 0x17b5, 0x16c3, 0x16b9, 0xa968, 0x918c, 0x00ff, 0x918e, - 0x0048, 0x0904, 0x16ef, 0x9085, 0x0001, 0x0804, 0x17ab, 0xa880, + 0x9088, 0x1fb8, 0x2165, 0x0002, 0x16f3, 0x1740, 0x16f3, 0x16f3, + 0x16f3, 0x1722, 0x16f3, 0x16f7, 0x16ec, 0x1737, 0x16f3, 0x16f3, + 0x16f3, 0x17fd, 0x170b, 0x1701, 0xa968, 0x918c, 0x00ff, 0x918e, + 0x0048, 0x0904, 0x1737, 0x9085, 0x0001, 0x0804, 0x17f3, 0xa880, 0xd0bc, 0x0dc8, 0xa894, 0xa842, 0xa890, 0xa83e, 0xa88c, 0x0804, - 0x16ff, 0xa880, 0xd0bc, 0x0d78, 0xa894, 0xa842, 0xa890, 0xa83e, - 0xa88c, 0x0804, 0x174e, 0xa880, 0xd0bc, 0x0d28, 0xa894, 0xa842, - 0xa890, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0dc4, 0xa168, 0xa91a, - 0x91ec, 0x000f, 0x9d80, 0x1f70, 0x2065, 0xa88c, 0xd19c, 0x1904, - 0x174e, 0x0428, 0xa880, 0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c, - 0x0dc4, 0xa168, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1f70, 0x2065, - 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x174e, 0x0080, 0xa880, - 0xd0ac, 0x0904, 0x16ab, 0x9006, 0xa842, 0xa83e, 0x0804, 0x174e, - 0xa880, 0xd0ac, 0x0904, 0x16ab, 0x9006, 0xa842, 0xa83e, 0x2c05, - 0x908a, 0x0037, 0x1a0c, 0x0dc4, 0x9082, 0x001c, 0x0002, 0x1722, - 0x1722, 0x1724, 0x1722, 0x1722, 0x1722, 0x172a, 0x1722, 0x1722, - 0x1722, 0x1730, 0x1722, 0x1722, 0x1722, 0x1736, 0x1722, 0x1722, - 0x1722, 0x173c, 0x1722, 0x1722, 0x1722, 0x1742, 0x1722, 0x1722, - 0x1722, 0x1748, 0x080c, 0x0dc4, 0xa578, 0xa47c, 0xa380, 0xa284, - 0x0804, 0x1793, 0xa588, 0xa48c, 0xa390, 0xa294, 0x0804, 0x1793, - 0xa598, 0xa49c, 0xa3a0, 0xa2a4, 0x0804, 0x1793, 0xa5a8, 0xa4ac, - 0xa3b0, 0xa2b4, 0x0804, 0x1793, 0xa5b8, 0xa4bc, 0xa3c0, 0xa2c4, - 0x0804, 0x1793, 0xa5c8, 0xa4cc, 0xa3d0, 0xa2d4, 0x0804, 0x1793, - 0xa5d8, 0xa4dc, 0xa3e0, 0xa2e4, 0x0804, 0x1793, 0x2c05, 0x908a, - 0x0035, 0x1a0c, 0x0dc4, 0x9082, 0x001c, 0x0002, 0x1771, 0x176f, - 0x176f, 0x176f, 0x176f, 0x176f, 0x1778, 0x176f, 0x176f, 0x176f, - 0x176f, 0x176f, 0x177f, 0x176f, 0x176f, 0x176f, 0x176f, 0x176f, - 0x1786, 0x176f, 0x176f, 0x176f, 0x176f, 0x176f, 0x178d, 0x080c, - 0x0dc4, 0xa570, 0xa474, 0xa778, 0xa67c, 0xa380, 0xa284, 0x00d8, + 0x1747, 0xa880, 0xd0bc, 0x0d78, 0xa894, 0xa842, 0xa890, 0xa83e, + 0xa88c, 0x0804, 0x1796, 0xa880, 0xd0bc, 0x0d28, 0xa894, 0xa842, + 0xa890, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0dc3, 0xa168, 0xa91a, + 0x91ec, 0x000f, 0x9d80, 0x1fb8, 0x2065, 0xa88c, 0xd19c, 0x1904, + 0x1796, 0x0428, 0xa880, 0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c, + 0x0dc3, 0xa168, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1fb8, 0x2065, + 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1796, 0x0080, 0xa880, + 0xd0ac, 0x0904, 0x16f3, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1796, + 0xa880, 0xd0ac, 0x0904, 0x16f3, 0x9006, 0xa842, 0xa83e, 0x2c05, + 0x908a, 0x0037, 0x1a0c, 0x0dc3, 0x9082, 0x001c, 0x0002, 0x176a, + 0x176a, 0x176c, 0x176a, 0x176a, 0x176a, 0x1772, 0x176a, 0x176a, + 0x176a, 0x1778, 0x176a, 0x176a, 0x176a, 0x177e, 0x176a, 0x176a, + 0x176a, 0x1784, 0x176a, 0x176a, 0x176a, 0x178a, 0x176a, 0x176a, + 0x176a, 0x1790, 0x080c, 0x0dc3, 0xa578, 0xa47c, 0xa380, 0xa284, + 0x0804, 0x17db, 0xa588, 0xa48c, 0xa390, 0xa294, 0x0804, 0x17db, + 0xa598, 0xa49c, 0xa3a0, 0xa2a4, 0x0804, 0x17db, 0xa5a8, 0xa4ac, + 0xa3b0, 0xa2b4, 0x0804, 0x17db, 0xa5b8, 0xa4bc, 0xa3c0, 0xa2c4, + 0x0804, 0x17db, 0xa5c8, 0xa4cc, 0xa3d0, 0xa2d4, 0x0804, 0x17db, + 0xa5d8, 0xa4dc, 0xa3e0, 0xa2e4, 0x0804, 0x17db, 0x2c05, 0x908a, + 0x0035, 0x1a0c, 0x0dc3, 0x9082, 0x001c, 0x0002, 0x17b9, 0x17b7, + 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17c0, 0x17b7, 0x17b7, 0x17b7, + 0x17b7, 0x17b7, 0x17c7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, + 0x17ce, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17d5, 0x080c, + 0x0dc3, 0xa570, 0xa474, 0xa778, 0xa67c, 0xa380, 0xa284, 0x00d8, 0xa588, 0xa48c, 0xa790, 0xa694, 0xa398, 0xa29c, 0x00a0, 0xa5a0, 0xa4a4, 0xa7a8, 0xa6ac, 0xa3b0, 0xa2b4, 0x0068, 0xa5b8, 0xa4bc, 0xa7c0, 0xa6c4, 0xa3c8, 0xa2cc, 0x0030, 0xa5d0, 0xa4d4, 0xa7d8, @@ -538,120 +547,120 @@ static const uint16_t isp_2300_risc_code 0xae2a, 0xa98c, 0x8c60, 0x2c1d, 0xa8b0, 0xaab4, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa880, 0xc0dd, 0xa882, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, - 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, 0x0804, 0x16ab, 0x2001, - 0x180d, 0x2004, 0xd08c, 0x190c, 0x6818, 0x2ff0, 0x0126, 0x2091, + 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, 0x0804, 0x16f3, 0x2001, + 0x180d, 0x2004, 0xd08c, 0x190c, 0x693f, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, - 0x2061, 0x1f6b, 0xa813, 0x1f6b, 0x2c05, 0xa80a, 0xa968, 0xa91a, - 0xa880, 0xd0ac, 0x090c, 0x0dc4, 0x9006, 0xa842, 0xa83e, 0x2c05, - 0x908a, 0x0035, 0x1a0c, 0x0dc4, 0xadd0, 0xacd4, 0xafd8, 0xaedc, + 0x2061, 0x1fb3, 0xa813, 0x1fb3, 0x2c05, 0xa80a, 0xa968, 0xa91a, + 0xa880, 0xd0ac, 0x090c, 0x0dc3, 0x9006, 0xa842, 0xa83e, 0x2c05, + 0x908a, 0x0035, 0x1a0c, 0x0dc3, 0xadd0, 0xacd4, 0xafd8, 0xaedc, 0xabe0, 0xaae4, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8b0, 0xaab4, 0xa836, 0xaa3a, 0xa98c, 0xa868, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0080, 0x918a, 0x0002, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa880, 0xc0dd, 0xa882, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0xa804, - 0x9045, 0x090c, 0x0dc4, 0xa80e, 0xa068, 0xa81a, 0x9084, 0x000f, - 0x9080, 0x1f70, 0x2015, 0x82ff, 0x090c, 0x0dc4, 0xaa12, 0x2205, + 0x9045, 0x090c, 0x0dc3, 0xa80e, 0xa068, 0xa81a, 0x9084, 0x000f, + 0x9080, 0x1fb8, 0x2015, 0x82ff, 0x090c, 0x0dc3, 0xaa12, 0x2205, 0xa80a, 0x0c08, 0x903e, 0x2730, 0xa884, 0xd0fc, 0x1190, 0x2d00, - 0x0002, 0x190f, 0x1871, 0x1871, 0x190f, 0x190f, 0x1909, 0x190f, - 0x1871, 0x18c0, 0x18c0, 0x18c0, 0x190f, 0x190f, 0x190f, 0x1906, - 0x18c0, 0xc0fc, 0xa886, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, - 0x0904, 0x1911, 0x2c05, 0x908a, 0x0035, 0x1a0c, 0x0dc4, 0x9082, - 0x001c, 0x0002, 0x185d, 0x185b, 0x185b, 0x185b, 0x185b, 0x185b, - 0x1861, 0x185b, 0x185b, 0x185b, 0x185b, 0x185b, 0x1865, 0x185b, - 0x185b, 0x185b, 0x185b, 0x185b, 0x1869, 0x185b, 0x185b, 0x185b, - 0x185b, 0x185b, 0x186d, 0x080c, 0x0dc4, 0xa778, 0xa67c, 0x0804, - 0x1911, 0xa790, 0xa694, 0x0804, 0x1911, 0xa7a8, 0xa6ac, 0x0804, - 0x1911, 0xa7c0, 0xa6c4, 0x0804, 0x1911, 0xa7d8, 0xa6dc, 0x0804, - 0x1911, 0x2c05, 0x908a, 0x0037, 0x1a0c, 0x0dc4, 0x9082, 0x001c, - 0x0002, 0x1894, 0x1894, 0x1896, 0x1894, 0x1894, 0x1894, 0x189c, - 0x1894, 0x1894, 0x1894, 0x18a2, 0x1894, 0x1894, 0x1894, 0x18a8, - 0x1894, 0x1894, 0x1894, 0x18ae, 0x1894, 0x1894, 0x1894, 0x18b4, - 0x1894, 0x1894, 0x1894, 0x18ba, 0x080c, 0x0dc4, 0xa578, 0xa47c, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:20:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 654071065674; Sun, 2 Sep 2012 15:20:11 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45E1C8FC14; Sun, 2 Sep 2012 15:20:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FKBHi024521; Sun, 2 Sep 2012 15:20:11 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FKBmP024519; Sun, 2 Sep 2012 15:20:11 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021520.q82FKBmP024519@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240021 - stable/9/sys/cam/ctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 15:20:11 -0000 Author: mjacob Date: Sun Sep 2 15:20:10 2012 New Revision: 240021 URL: http://svn.freebsd.org/changeset/base/240021 Log: MFC of 238870. Handle a case where we had an SRR that pushed back the.. Modified: stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Sun Sep 2 15:18:08 2012 (r240020) +++ stable/9/sys/cam/ctl/scsi_ctl.c Sun Sep 2 15:20:10 2012 (r240021) @@ -1081,11 +1081,81 @@ ctlfe_free_ccb(struct cam_periph *periph } } +static int +ctlfe_adjust_cdb(struct ccb_accept_tio *atio, uint32_t offset) +{ + uint64_t lba; + uint32_t num_blocks, nbc; + uint8_t *cmdbyt = (atio->ccb_h.flags & CAM_CDB_POINTER)? + atio->cdb_io.cdb_ptr : atio->cdb_io.cdb_bytes; + + nbc = offset >> 9; /* ASSUMING 512 BYTE BLOCKS */ + + switch (cmdbyt[0]) { + case READ_6: + case WRITE_6: + { + struct scsi_rw_6 *cdb = (struct scsi_rw_6 *)cmdbyt; + lba = scsi_3btoul(cdb->addr); + lba &= 0x1fffff; + num_blocks = cdb->length; + if (num_blocks == 0) + num_blocks = 256; + lba += nbc; + num_blocks -= nbc; + scsi_ulto3b(lba, cdb->addr); + cdb->length = num_blocks; + break; + } + case READ_10: + case WRITE_10: + { + struct scsi_rw_10 *cdb = (struct scsi_rw_10 *)cmdbyt; + lba = scsi_4btoul(cdb->addr); + num_blocks = scsi_2btoul(cdb->length); + lba += nbc; + num_blocks -= nbc; + scsi_ulto4b(lba, cdb->addr); + scsi_ulto2b(num_blocks, cdb->length); + break; + } + case READ_12: + case WRITE_12: + { + struct scsi_rw_12 *cdb = (struct scsi_rw_12 *)cmdbyt; + lba = scsi_4btoul(cdb->addr); + num_blocks = scsi_4btoul(cdb->length); + lba += nbc; + num_blocks -= nbc; + scsi_ulto4b(lba, cdb->addr); + scsi_ulto4b(num_blocks, cdb->length); + break; + } + case READ_16: + case WRITE_16: + { + struct scsi_rw_16 *cdb = (struct scsi_rw_16 *)cmdbyt; + lba = scsi_8btou64(cdb->addr); + num_blocks = scsi_4btoul(cdb->length); + lba += nbc; + num_blocks -= nbc; + scsi_u64to8b(lba, cdb->addr); + scsi_ulto4b(num_blocks, cdb->length); + break; + } + default: + return -1; + } + return (0); +} + static void ctlfedone(struct cam_periph *periph, union ccb *done_ccb) { struct ctlfe_lun_softc *softc; struct ctlfe_softc *bus_softc; + struct ccb_accept_tio *atio = NULL; + union ctl_io *io = NULL; #ifdef CTLFE_DEBUG printf("%s: entered, func_code = %#x, type = %#lx\n", __func__, @@ -1123,13 +1193,12 @@ ctlfedone(struct cam_periph *periph, uni } switch (done_ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: { - union ctl_io *io; - struct ccb_accept_tio *atio; atio = &done_ccb->atio; softc->atios_returned++; + resubmit: /* * Allocate a ctl_io, pass it to CTL, and wait for the * datamove or done. @@ -1213,8 +1282,8 @@ ctlfedone(struct cam_periph *periph, uni break; } case XPT_CONT_TARGET_IO: { - struct ccb_accept_tio *atio; - union ctl_io *io; + int srr = 0; + uint32_t srr_off = 0; atio = (struct ccb_accept_tio *)done_ccb->ccb_h.ccb_atio; io = (union ctl_io *)atio->ccb_h.io_ptr; @@ -1225,6 +1294,57 @@ ctlfedone(struct cam_periph *periph, uni __func__, atio->tag_id, done_ccb->ccb_h.flags); #endif /* + * Handle SRR case were the data pointer is pushed back hack + */ + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_MESSAGE_RECV + && done_ccb->csio.msg_ptr != NULL + && done_ccb->csio.msg_ptr[0] == MSG_EXTENDED + && done_ccb->csio.msg_ptr[1] == 5 + && done_ccb->csio.msg_ptr[2] == 0) { + srr = 1; + srr_off = + (done_ccb->csio.msg_ptr[3] << 24) + | (done_ccb->csio.msg_ptr[4] << 16) + | (done_ccb->csio.msg_ptr[5] << 8) + | (done_ccb->csio.msg_ptr[6]); + } + + if (srr && (done_ccb->ccb_h.flags & CAM_SEND_STATUS)) { + /* + * If status was being sent, the back end data is now + * history. Hack it up and resubmit a new command with + * the CDB adjusted. If the SIM does the right thing, + * all of the resid math should work. + */ + softc->ccbs_freed++; + xpt_release_ccb(done_ccb); + ctl_free_io(io); + if (ctlfe_adjust_cdb(atio, srr_off) == 0) { + done_ccb = (union ccb *)atio; + goto resubmit; + } + /* + * Fall through to doom.... + */ + } else if (srr) { + /* + * If we have an srr and we're still sending data, we + * should be able to adjust offsets and cycle again. + */ + io->scsiio.kern_rel_offset = + io->scsiio.ext_data_filled = srr_off; + io->scsiio.ext_data_len = io->scsiio.kern_total_len - + io->scsiio.kern_rel_offset; + softc->ccbs_freed++; + io->scsiio.io_hdr.status = CTL_STATUS_NONE; + xpt_release_ccb(done_ccb); + TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, + periph_links.tqe); + xpt_schedule(periph, /*priority*/ 1); + return; + } + + /* * If we were sending status back to the initiator, free up * resources. If we were doing a datamove, call the * datamove done routine. From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:21:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34FE2106564A; Sun, 2 Sep 2012 15:21:56 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2023C8FC08; Sun, 2 Sep 2012 15:21:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FLtGh024799; Sun, 2 Sep 2012 15:21:55 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FLtqH024797; Sun, 2 Sep 2012 15:21:55 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021521.q82FLtqH024797@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240022 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:21:56 -0000 Author: mjacob Date: Sun Sep 2 15:21:55 2012 New Revision: 240022 URL: http://svn.freebsd.org/changeset/base/240022 Log: MFC of 238887- fix compilation on isp_sbus.c Modified: stable/9/sys/dev/isp/isp_sbus.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/9/sys/dev/isp/isp_sbus.c Sun Sep 2 15:20:10 2012 (r240021) +++ stable/9/sys/dev/isp/isp_sbus.c Sun Sep 2 15:21:55 2012 (r240022) @@ -600,7 +600,7 @@ dma2(void *arg, bus_dma_segment_t *dm_se ddir = ISP_NOXFR; } - if (isp_send_cmd(isp, rq, dm_segs, nseg, XS_XFRLEN(csio), ddir) != CMD_QUEUED) { + if (isp_send_cmd(isp, rq, dm_segs, nseg, XS_XFRLEN(csio), ddir, NULL) != CMD_QUEUED) { mp->error = MUSHERR_NOQENTRIES; } } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:23:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECD65106564A; Sun, 2 Sep 2012 15:23:01 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5B28FC18; Sun, 2 Sep 2012 15:23:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FN1H8024991; Sun, 2 Sep 2012 15:23:01 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FN1Aw024989; Sun, 2 Sep 2012 15:23:01 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021523.q82FN1Aw024989@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240023 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:23:02 -0000 Author: mjacob Date: Sun Sep 2 15:23:01 2012 New Revision: 240023 URL: http://svn.freebsd.org/changeset/base/240023 Log: MFC of 239010 Oops. We only do allocate room for extended commands and responses for 2300 cards are newer. Modified: stable/9/sys/dev/isp/isp_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_pci.c ============================================================================== --- stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 15:21:55 2012 (r240022) +++ stable/9/sys/dev/isp/isp_pci.c Sun Sep 2 15:23:01 2012 (r240023) @@ -1482,16 +1482,18 @@ imc(void *arg, bus_dma_segment_t *segs, segs->ds_addr += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); imushp->vbase += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); - imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr; - imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase; - imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free; - for (ecmd = imushp->isp->isp_osinfo.ecmd_free; ecmd < &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS]; ecmd++) { - if (ecmd == &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS - 1]) { - ecmd->next = NULL; - } else { - ecmd->next = ecmd + 1; - } - } + if (imushp->isp->isp_type >= ISP_HA_FC_2300) { + imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr; + imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase; + imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free; + for (ecmd = imushp->isp->isp_osinfo.ecmd_free; ecmd < &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS]; ecmd++) { + if (ecmd == &imushp->isp->isp_osinfo.ecmd_free[N_XCMDS - 1]) { + ecmd->next = NULL; + } else { + ecmd->next = ecmd + 1; + } + } + } #ifdef ISP_TARGET_MODE segs->ds_addr += (N_XCMDS * XCMD_SIZE); imushp->vbase += (N_XCMDS * XCMD_SIZE); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:24:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 398C7106564A; Sun, 2 Sep 2012 15:24:58 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23DA18FC14; Sun, 2 Sep 2012 15:24:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FOvri025281; Sun, 2 Sep 2012 15:24:57 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FOvkE025279; Sun, 2 Sep 2012 15:24:57 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021524.q82FOvkE025279@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240024 - stable/9/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:24:58 -0000 Author: mjacob Date: Sun Sep 2 15:24:57 2012 New Revision: 240024 URL: http://svn.freebsd.org/changeset/base/240024 Log: MFC of 239212 Add VERIFY_10 def. Modified: stable/9/sys/cam/scsi/scsi_all.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.h Sun Sep 2 15:23:01 2012 (r240023) +++ stable/9/sys/cam/scsi/scsi_all.h Sun Sep 2 15:24:57 2012 (r240024) @@ -984,6 +984,7 @@ struct ata_pass_16 { #define WRITE_10 0x2A #define POSITION_TO_ELEMENT 0x2B #define WRITE_VERIFY_10 0x2E +#define VERIFY_10 0x2F #define SYNCHRONIZE_CACHE 0x35 #define READ_DEFECT_DATA_10 0x37 #define WRITE_BUFFER 0x3B From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 15:27:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4050106564A; Sun, 2 Sep 2012 15:27:20 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44818FC0C; Sun, 2 Sep 2012 15:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82FRKTr025621; Sun, 2 Sep 2012 15:27:20 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82FRKd2025619; Sun, 2 Sep 2012 15:27:20 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209021527.q82FRKd2025619@svn.freebsd.org> From: Matt Jacob Date: Sun, 2 Sep 2012 15:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240025 - stable/9/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 15:27:21 -0000 Author: mjacob Date: Sun Sep 2 15:27:20 2012 New Revision: 240025 URL: http://svn.freebsd.org/changeset/base/240025 Log: MFC of 239023 Add detach logic to SBus variant. Modified: stable/9/sys/dev/isp/isp_sbus.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/9/sys/dev/isp/isp_sbus.c Sun Sep 2 15:24:57 2012 (r240024) +++ stable/9/sys/dev/isp/isp_sbus.c Sun Sep 2 15:27:20 2012 (r240025) @@ -78,19 +78,22 @@ static struct ispmdvec mdvec = { static int isp_sbus_probe (device_t); static int isp_sbus_attach (device_t); +static int isp_sbus_detach (device_t); #define ISP_SBD(isp) ((struct isp_sbussoftc *)isp)->sbus_dev struct isp_sbussoftc { ispsoftc_t sbus_isp; device_t sbus_dev; - struct resource * sbus_reg; + struct resource * regs; + void * irq; + int iqd; + int rgd; void * ih; int16_t sbus_poff[_NREG_BLKS]; sdparam sbus_param; struct isp_spi sbus_spi; struct ispmdvec sbus_mdvec; - struct resource * sbus_ires; }; @@ -98,6 +101,7 @@ static device_method_t isp_sbus_methods[ /* Device interface */ DEVMETHOD(device_probe, isp_sbus_probe), DEVMETHOD(device_attach, isp_sbus_attach), + DEVMETHOD(device_detach, isp_sbus_detach), { 0, 0 } }; @@ -136,13 +140,21 @@ isp_sbus_probe(device_t dev) static int isp_sbus_attach(device_t dev) { - struct resource *regs; - int tval, iqd, isp_debug, role, rid, ispburst, default_id; + int tval, isp_debug, role, ispburst, default_id; struct isp_sbussoftc *sbs; ispsoftc_t *isp = NULL; int locksetup = 0; int ints_setup = 0; + sbs = device_get_softc(dev); + if (sbs == NULL) { + device_printf(dev, "cannot get softc\n"); + return (ENOMEM); + } + + sbs->sbus_dev = dev; + sbs->sbus_mdvec = mdvec; + /* * Figure out if we're supposed to skip this one. * If we are, we actually go to ISP_ROLE_NONE. @@ -165,23 +177,15 @@ isp_sbus_attach(device_t dev) role = ISP_DEFAULT_ROLES; } - sbs = malloc(sizeof (*sbs), M_DEVBUF, M_NOWAIT | M_ZERO); - if (sbs == NULL) { - device_printf(dev, "cannot allocate softc\n"); - return (ENOMEM); - } + sbs->irq = sbs->regs = NULL; + sbs->rgd = sbs->iqd = 0; - regs = NULL; - iqd = 0; - rid = 0; - regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (regs == 0) { + sbs->regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sbs->rgd, + RF_ACTIVE); + if (sbs->regs == NULL) { device_printf(dev, "unable to map registers\n"); goto bad; } - sbs->sbus_dev = dev; - sbs->sbus_reg = regs; - sbs->sbus_mdvec = mdvec; sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF; sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF; @@ -189,8 +193,8 @@ isp_sbus_attach(device_t dev) sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF; sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF; isp = &sbs->sbus_isp; - isp->isp_bus_tag = rman_get_bustag(regs); - isp->isp_bus_handle = rman_get_bushandle(regs); + isp->isp_bus_tag = rman_get_bustag(sbs->regs); + isp->isp_bus_handle = rman_get_bushandle(sbs->regs); isp->isp_mdvec = &sbs->sbus_mdvec; isp->isp_bustype = ISP_BT_SBUS; isp->isp_type = ISP_HA_SCSI_UNKNOWN; @@ -244,7 +248,6 @@ isp_sbus_attach(device_t dev) SDPARAM(isp, 0)->isp_ptisp = 1; } - isp->isp_osinfo.fw = firmware_get("isp_1000"); if (isp->isp_osinfo.fw) { union { @@ -280,16 +283,15 @@ isp_sbus_attach(device_t dev) mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF); locksetup++; - iqd = 0; - sbs->sbus_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, + sbs->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sbs->iqd, RF_ACTIVE | RF_SHAREABLE); - if (sbs->sbus_ires == NULL) { + if (sbs->irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); goto bad; } - if (isp_setup_intr(dev, sbs->sbus_ires, ISP_IFLAGS, NULL, - isp_platform_intr, isp, &sbs->ih)) { + if (isp_setup_intr(dev, sbs->irq, ISP_IFLAGS, NULL, isp_platform_intr, + isp, &sbs->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; } @@ -333,25 +335,49 @@ isp_sbus_attach(device_t dev) bad: if (sbs && ints_setup) { - (void) bus_teardown_intr(dev, sbs->sbus_ires, sbs->ih); + (void) bus_teardown_intr(dev, sbs->irq, sbs->ih); } - if (sbs && sbs->sbus_ires) { - bus_release_resource(dev, SYS_RES_IRQ, iqd, sbs->sbus_ires); + if (sbs && sbs->irq) { + bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd, sbs->irq); } if (locksetup && isp) { mtx_destroy(&isp->isp_osinfo.lock); } - if (regs) { - (void) bus_release_resource(dev, SYS_RES_MEMORY, 0, regs); + if (sbs->regs) { + (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd, + sbs->regs); } + return (ENXIO); +} - if (sbs) { - free(sbs, M_DEVBUF); +static int +isp_sbus_detach(device_t dev) +{ + struct isp_sbussoftc *sbs; + ispsoftc_t *isp; + int status; + + sbs = device_get_softc(dev); + if (sbs == NULL) { + return (ENXIO); } - return (ENXIO); + isp = (ispsoftc_t *) sbs; + status = isp_detach(isp); + if (status) + return (status); + ISP_LOCK(isp); + isp_uninit(isp); + if (sbs->ih) { + (void) bus_teardown_intr(dev, sbs->irq, sbs->ih); + } + ISP_UNLOCK(isp); + mtx_destroy(&isp->isp_osinfo.lock); + (void) bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd, sbs->irq); + (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd, sbs->regs); + return (0); } #define IspVirt2Off(a, x) \ From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 17:39:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91BC1106564A; Sun, 2 Sep 2012 17:39:03 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 643998FC17; Sun, 2 Sep 2012 17:39:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82Hd3IT042580; Sun, 2 Sep 2012 17:39:03 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82Hd3CE042578; Sun, 2 Sep 2012 17:39:03 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209021739.q82Hd3CE042578@svn.freebsd.org> From: Andrey Zonov Date: Sun, 2 Sep 2012 17:39: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: r240026 - 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, 02 Sep 2012 17:39:03 -0000 Author: zont Date: Sun Sep 2 17:39:02 2012 New Revision: 240026 URL: http://svn.freebsd.org/changeset/base/240026 Log: - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz and kern.sgrowsiz sysctls writable. Approved by: kib (mentor) Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Sun Sep 2 15:27:20 2012 (r240025) +++ head/sys/kern/subr_param.c Sun Sep 2 17:39:02 2012 (r240026) @@ -119,18 +119,18 @@ SYSCTL_LONG(_kern, OID_AUTO, maxswzone, "Maximum memory for swap metadata"); SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, &maxbcache, 0, "Maximum value of vfs.maxbufspace"); -SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN, &maxtsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxtsiz, 0, "Maximum text size"); -SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN, &dfldsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dfldsiz, 0, "Initial data size limit"); -SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN, &maxdsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxdsiz, 0, "Maximum data size"); -SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN, &dflssiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dflssiz, 0, "Initial stack size limit"); -SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN, &maxssiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxssiz, 0, "Maximum stack size"); -SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN, &sgrowsiz, 0, - "Amount to grow stack on a stack fault"); +SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &sgrowsiz, + 0, "Amount to grow stack on a stack fault"); SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, NULL, 0, sysctl_kern_vm_guest, "A", "Virtual machine guest detected? (none|generic|xen)"); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 17:46:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2648106564A; Sun, 2 Sep 2012 17:46:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDC5A8FC12; Sun, 2 Sep 2012 17:46:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82HkkPN043589; Sun, 2 Sep 2012 17:46:46 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82HkkJZ043587; Sun, 2 Sep 2012 17:46:46 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021746.q82HkkJZ043587@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 17:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240027 - stable/9/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 17:46:47 -0000 Author: eadler Date: Sun Sep 2 17:46:46 2012 New Revision: 240027 URL: http://svn.freebsd.org/changeset/base/240027 Log: MFC r239048: Add additional Perle Speed LE serial cards PR: kern/168816 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/puc/pucdata.c Directory Properties: stable/9/sys/dev/puc/ (props changed) Modified: stable/9/sys/dev/puc/pucdata.c ============================================================================== --- stable/9/sys/dev/puc/pucdata.c Sun Sep 2 17:39:02 2012 (r240026) +++ stable/9/sys/dev/puc/pucdata.c Sun Sep 2 17:46:46 2012 (r240027) @@ -768,11 +768,36 @@ const struct puc_cfg puc_pci_devices[] = */ { 0x155f, 0x0331, 0xffff, 0, + "Perle Ultraport4 Express", + DEFAULT_RCLK * 8, + PUC_PORT_4S, 0x10, 0, 8, + }, + + { 0x155f, 0xB012, 0xffff, 0, + "Perle Speed2 LE", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x10, 0, 8, + }, + + { 0x155f, 0xB022, 0xffff, 0, + "Perle Speed2 LE", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x10, 0, 8, + }, + + { 0x155f, 0xB004, 0xffff, 0, "Perle Speed4 LE", DEFAULT_RCLK * 8, PUC_PORT_4S, 0x10, 0, 8, }, + { 0x155f, 0xB008, 0xffff, 0, + "Perle Speed8 LE", + DEFAULT_RCLK * 8, + PUC_PORT_8S, 0x10, 0, 8, + }, + + /* * Oxford Semiconductor PCI Express Expresso family * From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:00:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9293C1065674; Sun, 2 Sep 2012 18:00:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C52B8FC0A; Sun, 2 Sep 2012 18:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I0v6i045328; Sun, 2 Sep 2012 18:00:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I0v9X045326; Sun, 2 Sep 2012 18:00:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021800.q82I0v9X045326@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:00: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: r240028 - 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: Sun, 02 Sep 2012 18:00:57 -0000 Author: eadler Date: Sun Sep 2 18:00:57 2012 New Revision: 240028 URL: http://svn.freebsd.org/changeset/base/240028 Log: MFC r239047: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/8/sys/dev/aic7xxx/aic_osm_lib.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/aic7xxx/aic_osm_lib.c ============================================================================== --- stable/8/sys/dev/aic7xxx/aic_osm_lib.c Sun Sep 2 17:46:46 2012 (r240027) +++ stable/8/sys/dev/aic7xxx/aic_osm_lib.c Sun Sep 2 18:00:57 2012 (r240028) @@ -54,9 +54,6 @@ aic_set_recoveryscb(struct aic_softc *ai * them after we've successfully fixed this problem. */ LIST_FOREACH(list_scb, &aic->pending_scbs, pending_links) { - union ccb *ccb; - - ccb = list_scb->io_ctx; callout_stop(&scb->io_timer); } } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:01:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E4D01065829; Sun, 2 Sep 2012 18:01:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 391C98FC1A; Sun, 2 Sep 2012 18:01:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I1HJd045418; Sun, 2 Sep 2012 18:01:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I1Gwo045416; Sun, 2 Sep 2012 18:01:16 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021801.q82I1Gwo045416@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:01:16 +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: r240029 - stable/7/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: Sun, 02 Sep 2012 18:01:17 -0000 Author: eadler Date: Sun Sep 2 18:01:16 2012 New Revision: 240029 URL: http://svn.freebsd.org/changeset/base/240029 Log: MFC r239047: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/7/sys/dev/aic7xxx/aic_osm_lib.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/aic7xxx/aic_osm_lib.c ============================================================================== --- stable/7/sys/dev/aic7xxx/aic_osm_lib.c Sun Sep 2 18:00:57 2012 (r240028) +++ stable/7/sys/dev/aic7xxx/aic_osm_lib.c Sun Sep 2 18:01:16 2012 (r240029) @@ -54,9 +54,6 @@ aic_set_recoveryscb(struct aic_softc *ai * them after we've successfully fixed this problem. */ LIST_FOREACH(list_scb, &aic->pending_scbs, pending_links) { - union ccb *ccb; - - ccb = list_scb->io_ctx; callout_stop(&scb->io_timer); } } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:04:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F2351065674; Sun, 2 Sep 2012 18:04:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 399B28FC12; Sun, 2 Sep 2012 18:04:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I47Gr045791; Sun, 2 Sep 2012 18:04:07 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I47SZ045789; Sun, 2 Sep 2012 18:04:07 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021804.q82I47SZ045789@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:04:07 +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: r240030 - stable/7/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:04:07 -0000 Author: eadler Date: Sun Sep 2 18:04:06 2012 New Revision: 240030 URL: http://svn.freebsd.org/changeset/base/240030 Log: MFC r239076: Add support for SIIG Cyber Serial Dual PCI 16C850 Approved by: cperciva (implicit) Modified: stable/7/sys/dev/puc/pucdata.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/puc/pucdata.c ============================================================================== --- stable/7/sys/dev/puc/pucdata.c Sun Sep 2 18:01:16 2012 (r240029) +++ stable/7/sys/dev/puc/pucdata.c Sun Sep 2 18:04:06 2012 (r240030) @@ -626,6 +626,12 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_4S, 0x10, 0, 8, }, + { 0x1415, 0x950a, 0x131f, 0x2032, + "SIIG Cyber Serial Dual PCI 16C850", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x950a, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:04:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7BF41065782; Sun, 2 Sep 2012 18:04:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9217F8FC08; Sun, 2 Sep 2012 18:04:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I4Sdf045865; Sun, 2 Sep 2012 18:04:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I4S8v045863; Sun, 2 Sep 2012 18:04:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021804.q82I4S8v045863@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240031 - stable/8/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:04:28 -0000 Author: eadler Date: Sun Sep 2 18:04:27 2012 New Revision: 240031 URL: http://svn.freebsd.org/changeset/base/240031 Log: MFC r239076: Add support for SIIG Cyber Serial Dual PCI 16C850 Approved by: cperciva (implicit) Modified: stable/8/sys/dev/puc/pucdata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/puc/pucdata.c ============================================================================== --- stable/8/sys/dev/puc/pucdata.c Sun Sep 2 18:04:06 2012 (r240030) +++ stable/8/sys/dev/puc/pucdata.c Sun Sep 2 18:04:27 2012 (r240031) @@ -737,6 +737,12 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_2S, 0x10, 0, 8, }, + { 0x1415, 0x950a, 0x131f, 0x2032, + "SIIG Cyber Serial Dual PCI 16C850", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x950a, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:04:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 284B7106580D; Sun, 2 Sep 2012 18:04:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D02B8FC17; Sun, 2 Sep 2012 18:04:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I4op1045940; Sun, 2 Sep 2012 18:04:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I4oP0045937; Sun, 2 Sep 2012 18:04:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021804.q82I4oP0045937@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240032 - stable/9/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:04:52 -0000 Author: eadler Date: Sun Sep 2 18:04:50 2012 New Revision: 240032 URL: http://svn.freebsd.org/changeset/base/240032 Log: MFC r239076: Add support for SIIG Cyber Serial Dual PCI 16C850 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/puc/pucdata.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/puc/ (props changed) Modified: stable/9/sys/dev/puc/pucdata.c ============================================================================== --- stable/9/sys/dev/puc/pucdata.c Sun Sep 2 18:04:27 2012 (r240031) +++ stable/9/sys/dev/puc/pucdata.c Sun Sep 2 18:04:50 2012 (r240032) @@ -737,6 +737,12 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_2S, 0x10, 0, 8, }, + { 0x1415, 0x950a, 0x131f, 0x2032, + "SIIG Cyber Serial Dual PCI 16C850", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x950a, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:08:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 403351065670; Sun, 2 Sep 2012 18:08:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B1768FC0A; Sun, 2 Sep 2012 18:08:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I8gBB046395; Sun, 2 Sep 2012 18:08:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I8fji046393; Sun, 2 Sep 2012 18:08:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021808.q82I8fji046393@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240033 - stable/9/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:08:42 -0000 Author: eadler Date: Sun Sep 2 18:08:41 2012 New Revision: 240033 URL: http://svn.freebsd.org/changeset/base/240033 Log: MFC r238399: Document the behavior of mount with failok specified. PR: docs/163742 Approved by: cperciva (implicit) Modified: stable/9/sbin/mount/mount.8 Directory Properties: stable/9/sbin/mount/ (props changed) Modified: stable/9/sbin/mount/mount.8 ============================================================================== --- stable/9/sbin/mount/mount.8 Sun Sep 2 18:04:50 2012 (r240032) +++ stable/9/sbin/mount/mount.8 Sun Sep 2 18:08:41 2012 (r240033) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd July 12, 2012 .Dt MOUNT 8 .Os .Sh NAME @@ -145,6 +145,11 @@ When used with the .Fl u flag, this is the same as specifying the options currently in effect for the mounted file system. +.It Cm failok +If this option is specified, +.Nm +will return 0 even if an error occurs +during the mount of the filesystem. .It Cm force The same as .Fl f ; From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:08:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9861065673; Sun, 2 Sep 2012 18:08:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 382C48FC17; Sun, 2 Sep 2012 18:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82I8lqq046437; Sun, 2 Sep 2012 18:08:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82I8lNv046435; Sun, 2 Sep 2012 18:08:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021808.q82I8lNv046435@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:08:47 +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: r240034 - stable/8/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:08:47 -0000 Author: eadler Date: Sun Sep 2 18:08:46 2012 New Revision: 240034 URL: http://svn.freebsd.org/changeset/base/240034 Log: MFC r238399: Document the behavior of mount with failok specified. PR: docs/163742 Approved by: cperciva (implicit) Modified: stable/8/sbin/mount/mount.8 Directory Properties: stable/8/sbin/mount/ (props changed) Modified: stable/8/sbin/mount/mount.8 ============================================================================== --- stable/8/sbin/mount/mount.8 Sun Sep 2 18:08:41 2012 (r240033) +++ stable/8/sbin/mount/mount.8 Sun Sep 2 18:08:46 2012 (r240034) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd July 12, 2012 .Dt MOUNT 8 .Os .Sh NAME @@ -145,6 +145,11 @@ When used with the .Fl u flag, this is the same as specifying the options currently in effect for the mounted file system. +.It Cm failok +If this option is specified, +.Nm +will return 0 even if an error occurs +during the mount of the filesystem. .It Cm force The same as .Fl f ; From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:10:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D68FC106567F; Sun, 2 Sep 2012 18:10:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1C7C8FC17; Sun, 2 Sep 2012 18:10:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IATVi046664; Sun, 2 Sep 2012 18:10:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IATLu046662; Sun, 2 Sep 2012 18:10:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021810.q82IATLu046662@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240035 - stable/9/usr.sbin/ancontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:10:30 -0000 Author: eadler Date: Sun Sep 2 18:10:29 2012 New Revision: 240035 URL: http://svn.freebsd.org/changeset/base/240035 Log: MFC r238221: Fix always 0 tautologly revealed by gcc46 Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/ancontrol/ancontrol.c Directory Properties: stable/9/usr.sbin/ancontrol/ (props changed) Modified: stable/9/usr.sbin/ancontrol/ancontrol.c ============================================================================== --- stable/9/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:08:46 2012 (r240034) +++ stable/9/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:10:29 2012 (r240035) @@ -1443,7 +1443,7 @@ an_enable_leap_mode(const char *iface, c caps = (struct an_ltv_caps *)&areq; - if (!caps->an_softcaps & AN_AUTHTYPE_LEAP) { + if (!(caps->an_softcaps & AN_AUTHTYPE_LEAP)) { fprintf(stderr, "Firmware does not support LEAP\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:10:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32BB81065674; Sun, 2 Sep 2012 18:10:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6758FC0C; Sun, 2 Sep 2012 18:10:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IAUmb046702; Sun, 2 Sep 2012 18:10:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IAUrC046697; Sun, 2 Sep 2012 18:10:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021810.q82IAUrC046697@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:10: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: r240036 - stable/8/usr.sbin/ancontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:10:31 -0000 Author: eadler Date: Sun Sep 2 18:10:30 2012 New Revision: 240036 URL: http://svn.freebsd.org/changeset/base/240036 Log: MFC r238221: Fix always 0 tautologly revealed by gcc46 Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/ancontrol/ancontrol.c Directory Properties: stable/8/usr.sbin/ancontrol/ (props changed) Modified: stable/8/usr.sbin/ancontrol/ancontrol.c ============================================================================== --- stable/8/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:10:29 2012 (r240035) +++ stable/8/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:10:30 2012 (r240036) @@ -1444,7 +1444,7 @@ an_enable_leap_mode(const char *iface, c caps = (struct an_ltv_caps *)&areq; - if (!caps->an_softcaps & AN_AUTHTYPE_LEAP) { + if (!(caps->an_softcaps & AN_AUTHTYPE_LEAP)) { fprintf(stderr, "Firmware does not support LEAP\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:10:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63B3E106568A; Sun, 2 Sep 2012 18:10:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3268FC15; Sun, 2 Sep 2012 18:10:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IAWLU046734; Sun, 2 Sep 2012 18:10:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IAWBH046732; Sun, 2 Sep 2012 18:10:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021810.q82IAWBH046732@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:10:32 +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: r240037 - stable/7/usr.sbin/ancontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:10:32 -0000 Author: eadler Date: Sun Sep 2 18:10:31 2012 New Revision: 240037 URL: http://svn.freebsd.org/changeset/base/240037 Log: MFC r238221: Fix always 0 tautologly revealed by gcc46 Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/ancontrol/ancontrol.c Directory Properties: stable/7/usr.sbin/ancontrol/ (props changed) Modified: stable/7/usr.sbin/ancontrol/ancontrol.c ============================================================================== --- stable/7/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:10:30 2012 (r240036) +++ stable/7/usr.sbin/ancontrol/ancontrol.c Sun Sep 2 18:10:31 2012 (r240037) @@ -1445,7 +1445,7 @@ an_enable_leap_mode(const char *iface, c caps = (struct an_ltv_caps *)&areq; - if (!caps->an_softcaps & AN_AUTHTYPE_LEAP) { + if (!(caps->an_softcaps & AN_AUTHTYPE_LEAP)) { fprintf(stderr, "Firmware does not support LEAP\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:13:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 208571065678; Sun, 2 Sep 2012 18:13:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AFA88FC15; Sun, 2 Sep 2012 18:13:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IDIaw047120; Sun, 2 Sep 2012 18:13:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IDILk047118; Sun, 2 Sep 2012 18:13:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021813.q82IDILk047118@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:13: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: r240038 - 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, 02 Sep 2012 18:13:19 -0000 Author: eadler Date: Sun Sep 2 18:13:18 2012 New Revision: 240038 URL: http://svn.freebsd.org/changeset/base/240038 Log: MFC r238203: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/8/sys/dev/ata/chipsets/ata-via.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-via.c Sun Sep 2 18:10:31 2012 (r240037) +++ stable/8/sys/dev/ata/chipsets/ata-via.c Sun Sep 2 18:13:18 2012 (r240038) @@ -472,12 +472,10 @@ ata_via_sata_reset(device_t dev) static int ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SSTATUS: @@ -520,12 +518,10 @@ ata_via_sata_scr_read(device_t dev, int static int ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SERROR: From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:13:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03AA106566C; Sun, 2 Sep 2012 18:13:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBC658FC1E; Sun, 2 Sep 2012 18:13:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IDM5f047162; Sun, 2 Sep 2012 18:13:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IDM7j047160; Sun, 2 Sep 2012 18:13:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021813.q82IDM7j047160@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240039 - stable/9/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, 02 Sep 2012 18:13:23 -0000 Author: eadler Date: Sun Sep 2 18:13:22 2012 New Revision: 240039 URL: http://svn.freebsd.org/changeset/base/240039 Log: MFC r238203: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/9/sys/dev/ata/chipsets/ata-via.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-via.c Sun Sep 2 18:13:18 2012 (r240038) +++ stable/9/sys/dev/ata/chipsets/ata-via.c Sun Sep 2 18:13:22 2012 (r240039) @@ -472,12 +472,10 @@ ata_via_sata_reset(device_t dev) static int ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SSTATUS: @@ -520,12 +518,10 @@ ata_via_sata_scr_read(device_t dev, int static int ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) { - struct ata_channel *ch; device_t parent; uint32_t val; parent = device_get_parent(dev); - ch = device_get_softc(dev); port = (port == 1) ? 1 : 0; switch (reg) { case ATA_SERROR: From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:14:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE42C106568C; Sun, 2 Sep 2012 18:14:01 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFFB48FC0C; Sun, 2 Sep 2012 18:14:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IE1Nm047270; Sun, 2 Sep 2012 18:14:01 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IE1iN047268; Sun, 2 Sep 2012 18:14:01 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209021814.q82IE1iN047268@svn.freebsd.org> From: Rui Paulo Date: Sun, 2 Sep 2012 18:14: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: r240040 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:14:02 -0000 Author: rpaulo Date: Sun Sep 2 18:14:01 2012 New Revision: 240040 URL: http://svn.freebsd.org/changeset/base/240040 Log: Make sure we visit both symbol sections even if one of them doesn't exist. This makes it possible to dtrace some C++ programs like devd. Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sun Sep 2 18:13:22 2012 (r240039) +++ head/lib/libproc/proc_sym.c Sun Sep 2 18:14:01 2012 (r240040) @@ -254,7 +254,7 @@ proc_addr2sym(struct proc_handle *p, uin */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { DPRINTF("ERROR: elf_getdata() failed"); - goto err2; + goto symtab; } i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { @@ -274,11 +274,11 @@ proc_addr2sym(struct proc_handle *p, uin * the function. */ symcopy->st_value = rsym; - error = 0; goto out; } } } +symtab: /* * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) @@ -430,18 +430,17 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Dynamic Symbols table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { + if ((data = elf_getdata(dynsymscn, NULL))) { DPRINTF("ERROR: elf_getdata() failed"); - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, dynsymstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; - error = 0; - goto out; + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, dynsymstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + symcopy->st_value = map->pr_vaddr + sym.st_value; + error = 0; + goto out; + } } } /* @@ -450,17 +449,15 @@ proc_name2sym(struct proc_handle *p, con */ if (symtabscn == NULL) goto err2; - if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, symtabstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - error = 0; - goto out; + if ((data = elf_getdata(symtabscn, NULL))) { + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, symtabstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + error = 0; + goto out; + } } } out: From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:17:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B53391065673; Sun, 2 Sep 2012 18:17:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F60E8FC08; Sun, 2 Sep 2012 18:17:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IHC9H047801; Sun, 2 Sep 2012 18:17:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IHCuK047799; Sun, 2 Sep 2012 18:17:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021817.q82IHCuK047799@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:17:12 +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: r240041 - stable/7/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:17:12 -0000 Author: eadler Date: Sun Sep 2 18:17:12 2012 New Revision: 240041 URL: http://svn.freebsd.org/changeset/base/240041 Log: MFC r238201: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/7/sys/dev/aac/aac_disk.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/aac/aac_disk.c ============================================================================== --- stable/7/sys/dev/aac/aac_disk.c Sun Sep 2 18:14:01 2012 (r240040) +++ stable/7/sys/dev/aac/aac_disk.c Sun Sep 2 18:17:12 2012 (r240041) @@ -329,9 +329,6 @@ aac_disk_dump(void *arg, void *virtual, void aac_biodone(struct bio *bp) { - struct aac_disk *sc; - - sc = (struct aac_disk *)bp->bio_disk->d_drv1; fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); if (bp->bio_flags & BIO_ERROR) From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:17:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AED310656B1; Sun, 2 Sep 2012 18:17:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBA5E8FC14; Sun, 2 Sep 2012 18:17:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IHGQN047844; Sun, 2 Sep 2012 18:17:16 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IHGgY047842; Sun, 2 Sep 2012 18:17:16 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021817.q82IHGgY047842@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240042 - stable/8/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:17:17 -0000 Author: eadler Date: Sun Sep 2 18:17:16 2012 New Revision: 240042 URL: http://svn.freebsd.org/changeset/base/240042 Log: MFC r238201: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/8/sys/dev/aac/aac_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/aac/aac_disk.c ============================================================================== --- stable/8/sys/dev/aac/aac_disk.c Sun Sep 2 18:17:12 2012 (r240041) +++ stable/8/sys/dev/aac/aac_disk.c Sun Sep 2 18:17:16 2012 (r240042) @@ -332,9 +332,6 @@ aac_disk_dump(void *arg, void *virtual, void aac_biodone(struct bio *bp) { - struct aac_disk *sc; - - sc = (struct aac_disk *)bp->bio_disk->d_drv1; fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); if (bp->bio_flags & BIO_ERROR) From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:17:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD33610656F8; Sun, 2 Sep 2012 18:17:20 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD938FC17; Sun, 2 Sep 2012 18:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IHKKK047883; Sun, 2 Sep 2012 18:17:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IHK74047881; Sun, 2 Sep 2012 18:17:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021817.q82IHK74047881@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240043 - stable/9/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:17:20 -0000 Author: eadler Date: Sun Sep 2 18:17:20 2012 New Revision: 240043 URL: http://svn.freebsd.org/changeset/base/240043 Log: MFC r238201: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/9/sys/dev/aac/aac_disk.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac_disk.c ============================================================================== --- stable/9/sys/dev/aac/aac_disk.c Sun Sep 2 18:17:16 2012 (r240042) +++ stable/9/sys/dev/aac/aac_disk.c Sun Sep 2 18:17:20 2012 (r240043) @@ -332,9 +332,6 @@ aac_disk_dump(void *arg, void *virtual, void aac_biodone(struct bio *bp) { - struct aac_disk *sc; - - sc = (struct aac_disk *)bp->bio_disk->d_drv1; fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); if (bp->bio_flags & BIO_ERROR) From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:19:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 489A1106566B; Sun, 2 Sep 2012 18:19:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E628FC28; Sun, 2 Sep 2012 18:19:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IJcmr048193; Sun, 2 Sep 2012 18:19:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IJb1m048191; Sun, 2 Sep 2012 18:19:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021819.q82IJb1m048191@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240044 - stable/8/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: Sun, 02 Sep 2012 18:19:38 -0000 Author: eadler Date: Sun Sep 2 18:19:37 2012 New Revision: 240044 URL: http://svn.freebsd.org/changeset/base/240044 Log: MFC r238206: Add missing sleep stat increase PR: kern/168211 Approved by: cperciva (implicit) Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Sun Sep 2 18:17:20 2012 (r240043) +++ stable/8/sys/vm/uma_core.c Sun Sep 2 18:19:37 2012 (r240044) @@ -2161,6 +2161,7 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone->uz_flags |= UMA_ZFLAG_FULL; if (flags & M_NOWAIT) break; + zone->uz_sleeps++; msleep(keg, &keg->uk_lock, PVM, "keglimit", 0); continue; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:19:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D62D31065673; Sun, 2 Sep 2012 18:19:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C17498FC16; Sun, 2 Sep 2012 18:19:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IJfg8048235; Sun, 2 Sep 2012 18:19:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IJfGZ048232; Sun, 2 Sep 2012 18:19:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021819.q82IJfGZ048232@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240045 - stable/9/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: Sun, 02 Sep 2012 18:19:42 -0000 Author: eadler Date: Sun Sep 2 18:19:41 2012 New Revision: 240045 URL: http://svn.freebsd.org/changeset/base/240045 Log: MFC r238206: Add missing sleep stat increase PR: kern/168211 Approved by: cperciva (implicit) Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Sun Sep 2 18:19:37 2012 (r240044) +++ stable/9/sys/vm/uma_core.c Sun Sep 2 18:19:41 2012 (r240045) @@ -2166,6 +2166,7 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone->uz_flags |= UMA_ZFLAG_FULL; if (flags & M_NOWAIT) break; + zone->uz_sleeps++; msleep(keg, &keg->uk_lock, PVM, "keglimit", 0); continue; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:28:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8E34106566B; Sun, 2 Sep 2012 18:28:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C37988FC14; Sun, 2 Sep 2012 18:28:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IS9Uc049339; Sun, 2 Sep 2012 18:28:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IS9e0049337; Sun, 2 Sep 2012 18:28:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021828.q82IS9e0049337@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240046 - stable/9/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:28:10 -0000 Author: eadler Date: Sun Sep 2 18:28:09 2012 New Revision: 240046 URL: http://svn.freebsd.org/changeset/base/240046 Log: MFC r238204: Remove unneeded variable reported by gcc46 which stopped being used in r234178. Approved by: cperciva (implicit) Modified: stable/9/sbin/growfs/growfs.c Directory Properties: stable/9/sbin/growfs/ (props changed) Modified: stable/9/sbin/growfs/growfs.c ============================================================================== --- stable/9/sbin/growfs/growfs.c Sun Sep 2 18:19:41 2012 (r240045) +++ stable/9/sbin/growfs/growfs.c Sun Sep 2 18:28:09 2012 (r240046) @@ -803,7 +803,6 @@ updcsloc(time_t modtime, int fsi, int fs DBG_FUNC("updcsloc") struct csum *cs; int ocscg, ncscg; - int blocks; ufs2_daddr_t d; int lcs = 0; int block; @@ -820,8 +819,6 @@ updcsloc(time_t modtime, int fsi, int fs } ocscg = dtog(&osblock, osblock.fs_csaddr); cs = fscs + ocscg; - blocks = 1 + howmany(sblock.fs_cssize, sblock.fs_bsize) - - howmany(osblock.fs_cssize, osblock.fs_bsize); /* * Read original cylinder group from disk, and make a copy. From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:31:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE5851065670; Sun, 2 Sep 2012 18:31:23 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 990D48FC16; Sun, 2 Sep 2012 18:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IVNtt049749; Sun, 2 Sep 2012 18:31:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IVN9w049746; Sun, 2 Sep 2012 18:31:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021831.q82IVN9w049746@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240047 - stable/9/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:31:23 -0000 Author: eadler Date: Sun Sep 2 18:31:23 2012 New Revision: 240047 URL: http://svn.freebsd.org/changeset/base/240047 Log: MFC r238200: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/9/sys/cam/scsi/scsi_all.c stable/9/sys/cam/scsi/scsi_ch.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Sun Sep 2 18:28:09 2012 (r240046) +++ stable/9/sys/cam/scsi/scsi_all.c Sun Sep 2 18:31:23 2012 (r240047) @@ -4148,9 +4148,9 @@ scsi_sense_desc_sbuf(struct sbuf *sb, st struct scsi_inquiry_data *inq_data, struct scsi_sense_desc_header *header) { - int i, found; + int i; - for (i = 0, found = 0; i < (sizeof(scsi_sense_printers) / + for (i = 0; i < (sizeof(scsi_sense_printers) / sizeof(scsi_sense_printers[0])); i++) { struct scsi_sense_desc_printer *printer; Modified: stable/9/sys/cam/scsi/scsi_ch.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_ch.c Sun Sep 2 18:28:09 2012 (r240046) +++ stable/9/sys/cam/scsi/scsi_ch.c Sun Sep 2 18:31:23 2012 (r240047) @@ -433,17 +433,11 @@ static int chclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; - struct ch_softc *softc; - int error; - - error = 0; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) return(ENXIO); - softc = (struct ch_softc *)periph->softc; - cam_periph_release(periph); return(0); From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:33:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD851106564A; Sun, 2 Sep 2012 18:33:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7AC98FC0A; Sun, 2 Sep 2012 18:33:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IXhDJ050073; Sun, 2 Sep 2012 18:33:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IXhgs050071; Sun, 2 Sep 2012 18:33:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021833.q82IXhgs050071@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:33: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: r240048 - stable/7/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:33:43 -0000 Author: eadler Date: Sun Sep 2 18:33:43 2012 New Revision: 240048 URL: http://svn.freebsd.org/changeset/base/240048 Log: MFC r238199: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/7/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:31:23 2012 (r240047) +++ stable/7/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:33:43 2012 (r240048) @@ -312,7 +312,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con ACPI_OBJECT *reslist_object; ACPI_STATUS status; char *method_name, *reslist_name; - int res_changed; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -443,7 +442,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con * Now we are ready to switch, so kill off any current power * resource references. */ - res_changed = acpi_pwr_dereference_resource(pc); + acpi_pwr_dereference_resource(pc); /* * Add new power resource references, if we have any. Traverse the @@ -455,7 +454,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con reslist_object->Package.Count)); acpi_ForeachPackageObject(reslist_object, acpi_pwr_reference_resource, pc); - res_changed = 1; } /* From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:33:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B2D61065673; Sun, 2 Sep 2012 18:33:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 356C48FC14; Sun, 2 Sep 2012 18:33:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IXmrb050116; Sun, 2 Sep 2012 18:33:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IXmCj050114; Sun, 2 Sep 2012 18:33:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021833.q82IXmCj050114@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:33: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: r240049 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:33:48 -0000 Author: eadler Date: Sun Sep 2 18:33:47 2012 New Revision: 240049 URL: http://svn.freebsd.org/changeset/base/240049 Log: MFC r238199: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/8/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:33:43 2012 (r240048) +++ stable/8/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:33:47 2012 (r240049) @@ -314,7 +314,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con ACPI_OBJECT *reslist_object; ACPI_STATUS status; char *method_name, *reslist_name; - int res_changed; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -445,7 +444,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con * Now we are ready to switch, so kill off any current power * resource references. */ - res_changed = acpi_pwr_dereference_resource(pc); + acpi_pwr_dereference_resource(pc); /* * Add new power resource references, if we have any. Traverse the @@ -457,7 +456,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con reslist_object->Package.Count)); acpi_ForeachPackageObject(reslist_object, acpi_pwr_reference_resource, pc); - res_changed = 1; } /* From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:33:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6E2F1065794; Sun, 2 Sep 2012 18:33:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 918F28FC1B; Sun, 2 Sep 2012 18:33:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IXprU050153; Sun, 2 Sep 2012 18:33:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IXppZ050151; Sun, 2 Sep 2012 18:33:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021833.q82IXppZ050151@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240050 - stable/9/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:33:51 -0000 Author: eadler Date: Sun Sep 2 18:33:51 2012 New Revision: 240050 URL: http://svn.freebsd.org/changeset/base/240050 Log: MFC r238199: Remove variables which are initialized but never used thereafter reported by gcc46 warning Approved by: cperciva (implicit) Modified: stable/9/sys/dev/acpica/acpi_powerres.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:33:47 2012 (r240049) +++ stable/9/sys/dev/acpica/acpi_powerres.c Sun Sep 2 18:33:51 2012 (r240050) @@ -314,7 +314,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con ACPI_OBJECT *reslist_object; ACPI_STATUS status; char *method_name, *reslist_name; - int res_changed; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -445,7 +444,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con * Now we are ready to switch, so kill off any current power * resource references. */ - res_changed = acpi_pwr_dereference_resource(pc); + acpi_pwr_dereference_resource(pc); /* * Add new power resource references, if we have any. Traverse the @@ -457,7 +456,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE con reslist_object->Package.Count)); acpi_ForeachPackageObject(reslist_object, acpi_pwr_reference_resource, pc); - res_changed = 1; } /* From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:40:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36445106564A; Sun, 2 Sep 2012 18:40:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4268FC08; Sun, 2 Sep 2012 18:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IeBWk050902; Sun, 2 Sep 2012 18:40:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IeBVY050898; Sun, 2 Sep 2012 18:40:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021840.q82IeBVY050898@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:40:11 +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: r240051 - stable/7/share/syscons/keymaps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:40:12 -0000 Author: eadler Date: Sun Sep 2 18:40:11 2012 New Revision: 240051 URL: http://svn.freebsd.org/changeset/base/240051 Log: MFC r235251,r238205: Add Spanish Dvorak keyboard model to syscons. (not verified to be accurate) PR: conf/160235 Approved by: cperciva (implicit) Added: stable/7/share/syscons/keymaps/spanish.dvorak.kbd - copied unchanged from r235251, head/share/syscons/keymaps/spanish.dvorak.kbd Modified: stable/7/share/syscons/keymaps/INDEX.keymaps stable/7/share/syscons/keymaps/Makefile Directory Properties: stable/7/share/syscons/keymaps/ (props changed) Modified: stable/7/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/7/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:33:51 2012 (r240050) +++ stable/7/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:40:11 2012 (r240051) @@ -365,6 +365,8 @@ ru.koi8-r.shift.kbd:pt:Russo koi8-r (shi ru.koi8-r.shift.kbd:es:Ruso koi8-r (shift) ru.koi8-r.shift.kbd:uk:òÏÓŠÊÓØËÁ koi8-r (shift) +spanish.dvorak.kbd:en:Spanish Dvorak + spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 spanish.iso.kbd:fr:Espagnol ISO-8859-1 Modified: stable/7/share/syscons/keymaps/Makefile ============================================================================== --- stable/7/share/syscons/keymaps/Makefile Sun Sep 2 18:33:51 2012 (r240050) +++ stable/7/share/syscons/keymaps/Makefile Sun Sep 2 18:40:11 2012 (r240051) @@ -36,6 +36,7 @@ FILES= INDEX.keymaps \ ru.cp866.kbd ru.iso5.kbd \ si.iso.kbd \ sk.iso2.kbd \ + spanish.dvorak.kbd \ spanish.iso.kbd spanish.iso.acc.kbd spanish.iso15.acc.kbd \ swedish.iso.kbd swedish.cp850.kbd \ swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \ Copied: stable/7/share/syscons/keymaps/spanish.dvorak.kbd (from r235251, head/share/syscons/keymaps/spanish.dvorak.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/syscons/keymaps/spanish.dvorak.kbd Sun Sep 2 18:40:11 2012 (r240051, copy of r235251, head/share/syscons/keymaps/spanish.dvorak.kbd) @@ -0,0 +1,139 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '|' '!' nop nop O + 003 '2' '"' nop nop '@' '"' nop nop O + 004 '3' 183 nop nop '#' '#' nop nop O + 005 '4' '$' nop nop '~' '~' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '&' nop nop 172 172 nop nop O + 008 '7' '/' nop nop '7' '/' nop nop O + 009 '8' '(' nop nop '8' '(' nop nop O + 010 '9' ')' nop nop '9' ')' nop nop O + 011 '0' '=' nop nop '0' '=' nop nop O + 012 ''' '?' nop nop ''' '?' nop nop O + 013 161 191 nop nop 161 191 nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 '.' ':' nop nop '.' ':' nop nop O + 017 ',' ';' nop nop ',' ';' nop nop O + 018 241 209 nop nop '~' '~' nop nop O + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'y' 'Y' em em 'y' 'Y' em em C + 021 'f' 'F' ack ack 'f' 'F' ack ack C + 022 'g' 'G' bel bel 'g' 'G' bel bel C + 023 'c' 'C' etx etx 'c' 'C' etx etx C + 024 'h' 'H' bs bs 'h' 'H' bs bs C + 025 'l' 'L' ff ff 'l' 'L' ff ff C + 026 dgra dcir esc esc '[' '[' esc esc O + 027 '+' '*' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 'o' 'O' si si 243 211 si si C + 032 'e' 'E' enq enq 164 164 enq enq C + 033 'u' 'U' nak nak 250 218 nak nak C + 034 'i' 'I' ht ht 237 205 ht ht C + 035 'd' 'D' eot eot 'd' 'D' eot eot C + 036 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 038 'n' 'N' so so 'n' 'N' so so C + 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 040 dacu duml nop nop '{' '{' nop nop O + 041 '\' '|' fs fs '\' '|' fs fs O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 231 199 rs rs '}' '}' rs rs O + 044 '-' '_' us us '-' '_' us us O + 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 046 'j' 'J' nl nl 'j' 'J' nl nl C + 047 'k' 'K' vt vt 'k' 'K' vt vt C + 048 'x' 'X' can can 'x' 'X' can can C + 049 'b' 'B' stx stx 'b' 'B' stx stx C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 'w' 'W' etb etb 'w' 'W' etb etb C + 052 'v' 'V' syn syn 'v' 'V' syn syn C + 053 'z' 'Z' sub sub 'z' 'Z' sub sub C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '<' '>' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dacu 180 ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + ( 'o' 245 ) ( 'O' 213 ) + dmac 000 + dbre 000 + ddot 000 + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) + dsla 000 + drin 176 ( 'a' 229 ) ( 'A' 197 ) + dced 184 ( 'c' 231 ) ( 'C' 199 ) + dapo 000 + ddac 000 + dogo 000 + dcar 000 From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:40:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F2C9106566B; Sun, 2 Sep 2012 18:40:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC6D88FC0A; Sun, 2 Sep 2012 18:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IeEkT050939; Sun, 2 Sep 2012 18:40:14 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IeEjH050935; Sun, 2 Sep 2012 18:40:14 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021840.q82IeEjH050935@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240052 - stable/8/share/syscons/keymaps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:40:15 -0000 Author: eadler Date: Sun Sep 2 18:40:14 2012 New Revision: 240052 URL: http://svn.freebsd.org/changeset/base/240052 Log: MFC r235251,r238205: Add Spanish Dvorak keyboard model to syscons. (not verified to be accurate) PR: conf/160235 Approved by: cperciva (implicit) Added: stable/8/share/syscons/keymaps/spanish.dvorak.kbd - copied unchanged from r235251, head/share/syscons/keymaps/spanish.dvorak.kbd Modified: stable/8/share/syscons/keymaps/INDEX.keymaps stable/8/share/syscons/keymaps/Makefile Directory Properties: stable/8/share/syscons/keymaps/ (props changed) Modified: stable/8/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/8/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:40:11 2012 (r240051) +++ stable/8/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:40:14 2012 (r240052) @@ -378,6 +378,8 @@ ru.koi8-r.win.kbd:pt:Russo koi8-r (winke ru.koi8-r.win.kbd:es:Ruso koi8-r (winkeys) ru.koi8-r.win.kbd:uk:òÏÓŠÊÓØËÁ koi8-r (winkeys) +spanish.dvorak.kbd:en:Spanish Dvorak + spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 spanish.iso.kbd:fr:Espagnol ISO-8859-1 Modified: stable/8/share/syscons/keymaps/Makefile ============================================================================== --- stable/8/share/syscons/keymaps/Makefile Sun Sep 2 18:40:11 2012 (r240051) +++ stable/8/share/syscons/keymaps/Makefile Sun Sep 2 18:40:14 2012 (r240052) @@ -36,6 +36,7 @@ FILES= INDEX.keymaps \ ru.cp866.kbd ru.iso5.kbd \ si.iso.kbd \ sk.iso2.kbd \ + spanish.dvorak.kbd \ spanish.iso.kbd spanish.iso.acc.kbd spanish.iso15.acc.kbd \ swedish.iso.kbd swedish.cp850.kbd \ swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \ Copied: stable/8/share/syscons/keymaps/spanish.dvorak.kbd (from r235251, head/share/syscons/keymaps/spanish.dvorak.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/syscons/keymaps/spanish.dvorak.kbd Sun Sep 2 18:40:14 2012 (r240052, copy of r235251, head/share/syscons/keymaps/spanish.dvorak.kbd) @@ -0,0 +1,139 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '|' '!' nop nop O + 003 '2' '"' nop nop '@' '"' nop nop O + 004 '3' 183 nop nop '#' '#' nop nop O + 005 '4' '$' nop nop '~' '~' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '&' nop nop 172 172 nop nop O + 008 '7' '/' nop nop '7' '/' nop nop O + 009 '8' '(' nop nop '8' '(' nop nop O + 010 '9' ')' nop nop '9' ')' nop nop O + 011 '0' '=' nop nop '0' '=' nop nop O + 012 ''' '?' nop nop ''' '?' nop nop O + 013 161 191 nop nop 161 191 nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 '.' ':' nop nop '.' ':' nop nop O + 017 ',' ';' nop nop ',' ';' nop nop O + 018 241 209 nop nop '~' '~' nop nop O + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'y' 'Y' em em 'y' 'Y' em em C + 021 'f' 'F' ack ack 'f' 'F' ack ack C + 022 'g' 'G' bel bel 'g' 'G' bel bel C + 023 'c' 'C' etx etx 'c' 'C' etx etx C + 024 'h' 'H' bs bs 'h' 'H' bs bs C + 025 'l' 'L' ff ff 'l' 'L' ff ff C + 026 dgra dcir esc esc '[' '[' esc esc O + 027 '+' '*' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 'o' 'O' si si 243 211 si si C + 032 'e' 'E' enq enq 164 164 enq enq C + 033 'u' 'U' nak nak 250 218 nak nak C + 034 'i' 'I' ht ht 237 205 ht ht C + 035 'd' 'D' eot eot 'd' 'D' eot eot C + 036 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 038 'n' 'N' so so 'n' 'N' so so C + 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 040 dacu duml nop nop '{' '{' nop nop O + 041 '\' '|' fs fs '\' '|' fs fs O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 231 199 rs rs '}' '}' rs rs O + 044 '-' '_' us us '-' '_' us us O + 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 046 'j' 'J' nl nl 'j' 'J' nl nl C + 047 'k' 'K' vt vt 'k' 'K' vt vt C + 048 'x' 'X' can can 'x' 'X' can can C + 049 'b' 'B' stx stx 'b' 'B' stx stx C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 'w' 'W' etb etb 'w' 'W' etb etb C + 052 'v' 'V' syn syn 'v' 'V' syn syn C + 053 'z' 'Z' sub sub 'z' 'Z' sub sub C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '<' '>' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dacu 180 ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + ( 'o' 245 ) ( 'O' 213 ) + dmac 000 + dbre 000 + ddot 000 + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) + dsla 000 + drin 176 ( 'a' 229 ) ( 'A' 197 ) + dced 184 ( 'c' 231 ) ( 'C' 199 ) + dapo 000 + ddac 000 + dogo 000 + dcar 000 From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:40:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE71510656F3; Sun, 2 Sep 2012 18:40:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6600D8FC12; Sun, 2 Sep 2012 18:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IeI3u050982; Sun, 2 Sep 2012 18:40:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IeI2w050980; Sun, 2 Sep 2012 18:40:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021840.q82IeI2w050980@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240053 - stable/9/share/syscons/keymaps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:40:20 -0000 Author: eadler Date: Sun Sep 2 18:40:17 2012 New Revision: 240053 URL: http://svn.freebsd.org/changeset/base/240053 Log: MFC r235251,r238205: Add Spanish Dvorak keyboard model to syscons. (not verified to be accurate) PR: conf/160235 Approved by: cperciva (implicit) Modified: stable/9/share/syscons/keymaps/INDEX.keymaps Directory Properties: stable/9/share/syscons/keymaps/ (props changed) Modified: stable/9/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/9/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:40:14 2012 (r240052) +++ stable/9/share/syscons/keymaps/INDEX.keymaps Sun Sep 2 18:40:17 2012 (r240053) @@ -378,6 +378,8 @@ ru.koi8-r.win.kbd:pt:Russo koi8-r (winke ru.koi8-r.win.kbd:es:Ruso koi8-r (winkeys) ru.koi8-r.win.kbd:uk:òÏÓŠÊÓØËÁ koi8-r (winkeys) +spanish.dvorak.kbd:en:Spanish Dvorak + spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 spanish.iso.kbd:fr:Espagnol ISO-8859-1 From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:44:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333F3106566B; Sun, 2 Sep 2012 18:44:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CB558FC0C; Sun, 2 Sep 2012 18:44:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82Iieb7051558; Sun, 2 Sep 2012 18:44:40 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IiemY051556; Sun, 2 Sep 2012 18:44:40 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021844.q82IiemY051556@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240054 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:44:41 -0000 Author: eadler Date: Sun Sep 2 18:44:40 2012 New Revision: 240054 URL: http://svn.freebsd.org/changeset/base/240054 Log: MFC r237178,r237180: Fix mdoc style nits PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/7/share/man/man4/hptrr.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/hptrr.4 ============================================================================== --- stable/7/share/man/man4/hptrr.4 Sun Sep 2 18:40:17 2012 (r240053) +++ stable/7/share/man/man4/hptrr.4 Sun Sep 2 18:44:40 2012 (r240054) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2009 +.Dd June 6, 2012 .Dt HPTRR 4 .Os .Sh NAME @@ -51,7 +51,10 @@ The following tunables are settable from .Bl -ohang .It Va hw.hptrr.attach_generic set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4) and mvs(4). +PCI identification. These chips are also supported by +.Xr ata 4 +and +.Xr mvs 4 . Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,8 +115,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 , -.Xr mvs 4 +.Xr mvs 4 , +.Xr loader 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:44:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47187106564A; Sun, 2 Sep 2012 18:44:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 309288FC12; Sun, 2 Sep 2012 18:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82Iiiju051598; Sun, 2 Sep 2012 18:44:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IihaN051596; Sun, 2 Sep 2012 18:44:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021844.q82IihaN051596@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:44:43 +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: r240055 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:44:44 -0000 Author: eadler Date: Sun Sep 2 18:44:43 2012 New Revision: 240055 URL: http://svn.freebsd.org/changeset/base/240055 Log: MFC r237178,r237180: Fix mdoc style nits PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/8/share/man/man4/hptrr.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/hptrr.4 ============================================================================== --- stable/8/share/man/man4/hptrr.4 Sun Sep 2 18:44:40 2012 (r240054) +++ stable/8/share/man/man4/hptrr.4 Sun Sep 2 18:44:43 2012 (r240055) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2009 +.Dd June 6, 2012 .Dt HPTRR 4 .Os .Sh NAME @@ -51,7 +51,10 @@ The following tunables are settable from .Bl -ohang .It Va hw.hptrr.attach_generic set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4) and mvs(4). +PCI identification. These chips are also supported by +.Xr ata 4 +and +.Xr mvs 4 . Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,8 +115,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 , -.Xr mvs 4 +.Xr mvs 4 , +.Xr loader 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:44:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E5301065791; Sun, 2 Sep 2012 18:44:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2900C8FC15; Sun, 2 Sep 2012 18:44:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IimTJ051641; Sun, 2 Sep 2012 18:44:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82Iil9m051639; Sun, 2 Sep 2012 18:44:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021844.q82Iil9m051639@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240056 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 18:44:48 -0000 Author: eadler Date: Sun Sep 2 18:44:47 2012 New Revision: 240056 URL: http://svn.freebsd.org/changeset/base/240056 Log: MFC r237178,r237180: Fix mdoc style nits PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/9/share/man/man4/hptrr.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/hptrr.4 ============================================================================== --- stable/9/share/man/man4/hptrr.4 Sun Sep 2 18:44:43 2012 (r240055) +++ stable/9/share/man/man4/hptrr.4 Sun Sep 2 18:44:47 2012 (r240056) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2009 +.Dd June 6, 2012 .Dt HPTRR 4 .Os .Sh NAME @@ -51,7 +51,10 @@ The following tunables are settable from .Bl -ohang .It Va hw.hptrr.attach_generic set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4) and mvs(4). +PCI identification. These chips are also supported by +.Xr ata 4 +and +.Xr mvs 4 . Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,8 +115,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 , -.Xr mvs 4 +.Xr mvs 4 , +.Xr loader 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:54:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F5BD106566C; Sun, 2 Sep 2012 18:54:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89B298FC12; Sun, 2 Sep 2012 18:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IsWPB053037; Sun, 2 Sep 2012 18:54:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IsWbV053035; Sun, 2 Sep 2012 18:54:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021854.q82IsWbV053035@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:54:32 +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: r240057 - stable/7/sys/netinet/libalias X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:54:32 -0000 Author: eadler Date: Sun Sep 2 18:54:31 2012 New Revision: 240057 URL: http://svn.freebsd.org/changeset/base/240057 Log: MFC r236596: Fix style nit: don't use leading zero for dates in .Dd Approved by: cperciva (implicit) Modified: stable/7/sys/netinet/libalias/libalias.3 Directory Properties: stable/7/sys/ (props changed) stable/7/usr.bin/usbhidctl/ (props changed) Modified: stable/7/sys/netinet/libalias/libalias.3 ============================================================================== --- stable/7/sys/netinet/libalias/libalias.3 Sun Sep 2 18:44:47 2012 (r240056) +++ stable/7/sys/netinet/libalias/libalias.3 Sun Sep 2 18:54:31 2012 (r240057) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 04, 2011 +.Dd July 4, 2011 .Dt LIBALIAS 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:54:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED85B106564A; Sun, 2 Sep 2012 18:54:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D768C8FC12; Sun, 2 Sep 2012 18:54:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IslcW053105; Sun, 2 Sep 2012 18:54:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IslrB053101; Sun, 2 Sep 2012 18:54:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021854.q82IslrB053101@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:54:47 +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: r240058 - in stable/8: sys/netinet/libalias usr.bin/gzip usr.bin/usbhidctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:54:48 -0000 Author: eadler Date: Sun Sep 2 18:54:47 2012 New Revision: 240058 URL: http://svn.freebsd.org/changeset/base/240058 Log: MFC r236596: Fix style nit: don't use leading zero for dates in .Dd Approved by: cperciva (implicit) Modified: stable/8/sys/netinet/libalias/libalias.3 stable/8/usr.bin/gzip/zmore.1 stable/8/usr.bin/usbhidctl/usbhidctl.1 Directory Properties: stable/8/sys/ (props changed) stable/8/usr.bin/gzip/ (props changed) stable/8/usr.bin/usbhidctl/ (props changed) Modified: stable/8/sys/netinet/libalias/libalias.3 ============================================================================== --- stable/8/sys/netinet/libalias/libalias.3 Sun Sep 2 18:54:31 2012 (r240057) +++ stable/8/sys/netinet/libalias/libalias.3 Sun Sep 2 18:54:47 2012 (r240058) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 04, 2011 +.Dd July 4, 2011 .Dt LIBALIAS 3 .Os .Sh NAME Modified: stable/8/usr.bin/gzip/zmore.1 ============================================================================== --- stable/8/usr.bin/gzip/zmore.1 Sun Sep 2 18:54:31 2012 (r240057) +++ stable/8/usr.bin/gzip/zmore.1 Sun Sep 2 18:54:47 2012 (r240058) @@ -20,7 +20,7 @@ .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" .\" $FreeBSD$ -.Dd February 06, 2011 +.Dd February 6, 2011 .Dt ZMORE 1 .Os .Sh NAME Modified: stable/8/usr.bin/usbhidctl/usbhidctl.1 ============================================================================== --- stable/8/usr.bin/usbhidctl/usbhidctl.1 Sun Sep 2 18:54:31 2012 (r240057) +++ stable/8/usr.bin/usbhidctl/usbhidctl.1 Sun Sep 2 18:54:47 2012 (r240058) @@ -35,7 +35,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 01, 2011 +.Dd August 1, 2011 .Dt USBHIDCTL 1 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 18:54:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9F121065673; Sun, 2 Sep 2012 18:54:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3A5A8FC16; Sun, 2 Sep 2012 18:54:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82IspRu053207; Sun, 2 Sep 2012 18:54:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82IspLY053203; Sun, 2 Sep 2012 18:54:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209021854.q82IspLY053203@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 18:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240059 - in stable/9: sys/netinet/libalias usr.bin/gzip usr.bin/usbhidctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 18:54:51 -0000 Author: eadler Date: Sun Sep 2 18:54:51 2012 New Revision: 240059 URL: http://svn.freebsd.org/changeset/base/240059 Log: MFC r236596: Fix style nit: don't use leading zero for dates in .Dd Approved by: cperciva (implicit) Modified: stable/9/sys/netinet/libalias/libalias.3 stable/9/usr.bin/gzip/zmore.1 stable/9/usr.bin/usbhidctl/usbhidctl.1 Directory Properties: stable/9/sys/ (props changed) stable/9/usr.bin/gzip/ (props changed) stable/9/usr.bin/usbhidctl/ (props changed) Modified: stable/9/sys/netinet/libalias/libalias.3 ============================================================================== --- stable/9/sys/netinet/libalias/libalias.3 Sun Sep 2 18:54:47 2012 (r240058) +++ stable/9/sys/netinet/libalias/libalias.3 Sun Sep 2 18:54:51 2012 (r240059) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 04, 2011 +.Dd July 4, 2011 .Dt LIBALIAS 3 .Os .Sh NAME Modified: stable/9/usr.bin/gzip/zmore.1 ============================================================================== --- stable/9/usr.bin/gzip/zmore.1 Sun Sep 2 18:54:47 2012 (r240058) +++ stable/9/usr.bin/gzip/zmore.1 Sun Sep 2 18:54:51 2012 (r240059) @@ -20,7 +20,7 @@ .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" .\" $FreeBSD$ -.Dd February 06, 2011 +.Dd February 6, 2011 .Dt ZMORE 1 .Os .Sh NAME Modified: stable/9/usr.bin/usbhidctl/usbhidctl.1 ============================================================================== --- stable/9/usr.bin/usbhidctl/usbhidctl.1 Sun Sep 2 18:54:47 2012 (r240058) +++ stable/9/usr.bin/usbhidctl/usbhidctl.1 Sun Sep 2 18:54:51 2012 (r240059) @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 01, 2011 +.Dd August 1, 2011 .Dt USBHIDCTL 1 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 19:04:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A09D1065676; Sun, 2 Sep 2012 19:04:10 +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 9843D8FC0C; Sun, 2 Sep 2012 19:04:08 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA14250; Sun, 02 Sep 2012 22:04:00 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T8FSi-000GjY-AU; Sun, 02 Sep 2012 22:04:00 +0300 Message-ID: <5043AD9C.1060508@FreeBSD.org> Date: Sun, 02 Sep 2012 22:03:56 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Andrey Zonov References: <201209021739.q82Hd3CE042578@svn.freebsd.org> In-Reply-To: <201209021739.q82Hd3CE042578@svn.freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r240026 - 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, 02 Sep 2012 19:04:10 -0000 on 02/09/2012 20:39 Andrey Zonov said the following: > CTLFLAG_RDTUN | CTLFLAG_RW This combination looks like nonsense to me (because of "RD"). CTLFLAG_RDTUN Advisory flag that a system tunable also exists for this variable; however, the run-time variable is read-only. Probably you meant CTLFLAG_RW | CTLFLAG_TUN -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 20:22:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE70F1065670 for ; Sun, 2 Sep 2012 20:22:13 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEA38FC0C for ; Sun, 2 Sep 2012 20:22:13 +0000 (UTC) Received: by bkcje9 with SMTP id je9so2282647bkc.13 for ; Sun, 02 Sep 2012 13:22:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=7n660bpXpoeGuJSeZc+c5EYy1Gw0LZvqOXlP80UtU8c=; b=dc1re/gQ1q/zLuHoq8UsD9X0hORDG/Wa9b2ez9pEvrxPtNwC9sOkbdYLcM/B4LxD/Y m1Y2cwjelsWXPKP6cgamZQsG1X81it426G6LuLgIBCoiYEOmICVoyY92eiADRWRKAi82 /C9ZnhLqMbldryqs2d8RR6M9Urx4OoIMtqs2MicsPDLL+Jzxge3L6GxVfqaCt7LmEEfB uiCOLPEH3XuLQLW/MmXv1piiDETTKJSwz98haaWHFDPAYyEMck4v50yNyjtO69FENLTh mG2SepBlN6cCGOfhfR1b4aKFSVbVEkDAIU7WSi1GRFZ2ntjZEKIs0UMm/7Xn5cFQcpUn 1vlw== Received: by 10.204.10.92 with SMTP id o28mr6241041bko.39.1346617332168; Sun, 02 Sep 2012 13:22:12 -0700 (PDT) Received: from rnote.ddteam.net (105-190-133-95.pool.ukrtel.net. [95.133.190.105]) by mx.google.com with ESMTPS id hs2sm6546567bkc.1.2012.09.02.13.22.09 (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 13:22:11 -0700 (PDT) Date: Sun, 2 Sep 2012 23:22:04 +0300 From: Aleksandr Rybalko To: Andrew Turner Message-Id: <20120902232204.4de5f3a3.ray@ddteam.net> In-Reply-To: <201209020148.q821ml0M018010@svn.freebsd.org> References: <201209020148.q821ml0M018010@svn.freebsd.org> X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnQzE3sfVvQYwW8KMVGlzW8xr++i5PuVl4Zbn4Ngd4XDr3uj2Nzr0s1MD6jT8W61Xez89es Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 20:22:13 -0000 On Sun, 2 Sep 2012 01:48:47 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Sun Sep 2 01:48:47 2012 > New Revision: 239998 > URL: http://svn.freebsd.org/changeset/base/239998 > > Log: > Fix a logic inversion in an assert to allow us to use dts files that > include other files. Big Thanks for that!!! It's hard to add overlapping support also? So second instance of same node will be able to change attributes of previous one, such a "status". Or add new attributes, like GPIO lines usage. Then we will be able to have per-SoC dts and per-board. > > Modified: > head/contrib/dtc/dtc-lexer.l > > Modified: head/contrib/dtc/dtc-lexer.l > ============================================================================== > --- head/contrib/dtc/dtc-lexer.l Sat Sep 1 23:33:49 > 2012 (r239997) +++ head/contrib/dtc/dtc-lexer.l Sun > Sep 2 01:48:47 2012 (r239998) @@ -198,7 +198,7 @@ static void > push_input_file(const char * { > assert(filename); > > - assert(include_stack_pointer >= MAX_INCLUDE_NESTING); > + assert(include_stack_pointer < MAX_INCLUDE_NESTING); > > srcfile_push(filename); > Thanks. WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 20:28:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DCBD106564A for ; Sun, 2 Sep 2012 20:28:23 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BC29E8FC19 for ; Sun, 2 Sep 2012 20:28:22 +0000 (UTC) Received: by bkcje9 with SMTP id je9so2283661bkc.13 for ; Sun, 02 Sep 2012 13:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=/7Nn6VkiipupgCjHyTnbBZe2g2yw6HyQx7Vy+5VsZBY=; b=VSAWLMAdF/WiYpeh3Z8OMwqU2kYdFloci+RgjkD6ORnBDUKxm8r3wbGJhMpZz88FIO abBVpj8x7KU6A9xg2j6htp9mY2CvXIR5CUB2GWrm2E26Lpa5Cjqtd9aveC09Hm3YsQh0 hZT1smjsMNbKH94pM7e0yFlmOqDA3qltnVJz4NPFpYSG3wxoKcyZCDcG3Xj4bhl7F5SP +NAiG1pUCcHnDYqhRWAQqSupJPa832jcMZQZZk7eDHLQwjHfPopUBRoNOMCjUOiOcKgT gI8L5UORs6p/9eOUzzeHOERrfQODQg4awWKOqBHEVXEZbpUjTT7zhjrBBy8XEs9Fr7NQ eQTA== Received: by 10.204.41.206 with SMTP id p14mr6008452bke.54.1346617701256; Sun, 02 Sep 2012 13:28:21 -0700 (PDT) Received: from rnote.ddteam.net (105-190-133-95.pool.ukrtel.net. [95.133.190.105]) by mx.google.com with ESMTPS id g6sm6553275bkg.2.2012.09.02.13.28.19 (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 13:28:20 -0700 (PDT) Date: Sun, 2 Sep 2012 23:28:13 +0300 From: Aleksandr Rybalko To: Aleksandr Rybalko Message-Id: <20120902232813.6e150eff.ray@ddteam.net> In-Reply-To: <20120902232204.4de5f3a3.ray@ddteam.net> References: <201209020148.q821ml0M018010@svn.freebsd.org> <20120902232204.4de5f3a3.ray@ddteam.net> X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQk2I47xfuX4//R67Ia+kP5DC2WvCqSZGiH9PE4kDWHTaAVyB4d8nYUw66e9CJ1DTANVGRTm Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 20:28:23 -0000 On Sun, 2 Sep 2012 23:22:04 +0300 Aleksandr Rybalko wrote: > On Sun, 2 Sep 2012 01:48:47 +0000 (UTC) > Andrew Turner wrote: > > > Author: andrew > > Date: Sun Sep 2 01:48:47 2012 > > New Revision: 239998 > > URL: http://svn.freebsd.org/changeset/base/239998 > > > > Log: > > Fix a logic inversion in an assert to allow us to use dts files > > that include other files. > > Big Thanks for that!!! > > It's hard to add overlapping support also? So second instance of same > node will be able to change attributes of previous one, such a > "status". Or add new attributes, like GPIO lines usage. > > Then we will be able to have per-SoC dts and per-board. Sorry, that already supported, just a mistake in my DTS files. :) One have uart@0x00000000, second serial@0x00000000. Address is same, but name different. Thanks again! > > > > > Modified: > > head/contrib/dtc/dtc-lexer.l > > > > Modified: head/contrib/dtc/dtc-lexer.l > > ============================================================================== > > --- head/contrib/dtc/dtc-lexer.l Sat Sep 1 23:33:49 > > 2012 (r239997) +++ head/contrib/dtc/dtc-lexer.l Sun > > Sep 2 01:48:47 2012 (r239998) @@ -198,7 +198,7 @@ static > > void push_input_file(const char * { > > assert(filename); > > > > - assert(include_stack_pointer >= MAX_INCLUDE_NESTING); > > + assert(include_stack_pointer < MAX_INCLUDE_NESTING); > > > > srcfile_push(filename); > > > > Thanks. > > WBW > -- > Aleksandr Rybalko -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:04:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5EA88106564A; Sun, 2 Sep 2012 21:04:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4844F8FC14; Sun, 2 Sep 2012 21:04:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82L4fJH068981; Sun, 2 Sep 2012 21:04:41 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82L4eru068961; Sun, 2 Sep 2012 21:04:40 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209022104.q82L4eru068961@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 2 Sep 2012 21:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 21:04:41 -0000 Author: pfg Date: Sun Sep 2 21:04:40 2012 New Revision: 240060 URL: http://svn.freebsd.org/changeset/base/240060 Log: Fix RPC headers for C++ C++ mangling will cause trouble with variables like __rpc_xdr in xdr.h so rename this to XDR. While here add proper C++ guards to RPC headers. PR: 137443 MFC after: 2 weeks Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/include/rpc/clnt.h head/include/rpc/clnt_soc.h head/include/rpc/des_crypt.h head/include/rpc/nettype.h head/include/rpc/pmap_clnt.h head/include/rpc/pmap_rmt.h head/include/rpc/rpc_com.h head/include/rpc/rpc_msg.h head/include/rpc/rpcb_clnt.h head/include/rpc/rpcent.h head/include/rpc/rpcsec_gss.h head/include/rpc/svc.h head/include/rpc/svc_soc.h head/include/rpc/xdr.h head/sys/rpc/rpc_com.h head/sys/rpc/xdr.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/auth.h Sun Sep 2 21:04:40 2012 (r240060) @@ -51,6 +51,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define MAX_AUTH_BYTES 400 #define MAXNETNAMELEN 255 /* maximum length of network user's name */ @@ -366,4 +370,8 @@ __END_DECLS #define RPCSEC_GSS_KRB5I 390004 #define RPCSEC_GSS_KRB5P 390005 +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_AUTH_H */ Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/auth_unix.h Sun Sep 2 21:04:40 2012 (r240060) @@ -48,6 +48,10 @@ #define _RPC_AUTH_UNIX_H #include +#ifdef __cplusplus +extern "C" { +#endif + /* The machine name is part of a credential; it may not exceed 255 bytes */ #define MAX_MACHINE_NAME 255 @@ -81,4 +85,8 @@ struct short_hand_verf { struct opaque_auth new_cred; }; +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_AUTH_UNIX_H */ Modified: head/include/rpc/clnt.h ============================================================================== --- head/include/rpc/clnt.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/clnt.h Sun Sep 2 21:04:40 2012 (r240060) @@ -64,6 +64,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* * Well-known IPV6 RPC broadcast address. */ @@ -551,6 +555,10 @@ extern enum clnt_stat rpc_broadcast_exp( const int, const char *); __END_DECLS +#ifdef __cplusplus +} +#endif + /* For backward compatibility */ #include Modified: head/include/rpc/clnt_soc.h ============================================================================== --- head/include/rpc/clnt_soc.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/clnt_soc.h Sun Sep 2 21:04:40 2012 (r240060) @@ -49,6 +49,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ /* @@ -103,4 +107,8 @@ extern CLIENT *clntudp_bufcreate(struct struct timeval, int *, u_int, u_int); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* _RPC_CLNT_SOC_H */ Modified: head/include/rpc/des_crypt.h ============================================================================== --- head/include/rpc/des_crypt.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/des_crypt.h Sun Sep 2 21:04:40 2012 (r240060) @@ -47,6 +47,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define DES_MAXDATA 8192 /* max bytes encrypted in one call */ #define DES_DIRMASK (1 << 0) #define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ @@ -103,4 +107,8 @@ __BEGIN_DECLS void des_setparity( char *); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* _DES_DES_CRYPT_H */ Modified: head/include/rpc/nettype.h ============================================================================== --- head/include/rpc/nettype.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/nettype.h Sun Sep 2 21:04:40 2012 (r240060) @@ -44,6 +44,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #define _RPC_NONE 0 #define _RPC_NETPATH 1 #define _RPC_VISIBLE 2 @@ -61,4 +65,8 @@ extern struct netconfig *__rpc_getconf(v extern struct netconfig *__rpc_getconfip(const char *); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_NETTYPE_H */ Modified: head/include/rpc/pmap_clnt.h ============================================================================== --- head/include/rpc/pmap_clnt.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/pmap_clnt.h Sun Sep 2 21:04:40 2012 (r240060) @@ -66,6 +66,10 @@ #define _RPC_PMAP_CLNT_H_ #include +#ifdef __cplusplus +extern "C" { +#endif + __BEGIN_DECLS extern bool_t pmap_set(u_long, u_long, int, int); extern bool_t pmap_unset(u_long, u_long); @@ -83,4 +87,8 @@ extern u_short pmap_getport(struct sock u_long, u_long, u_int); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_PMAP_CLNT_H_ */ Modified: head/include/rpc/pmap_rmt.h ============================================================================== --- head/include/rpc/pmap_rmt.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/pmap_rmt.h Sun Sep 2 21:04:40 2012 (r240060) @@ -44,6 +44,10 @@ #define _RPC_PMAP_RMT_H #include +#ifdef __cplusplus +extern "C" { +#endif + struct rmtcallargs { u_long prog, vers, proc, arglen; caddr_t args_ptr; @@ -62,4 +66,8 @@ extern bool_t xdr_rmtcall_args(XDR *, st extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_PMAP_RMT_H */ Modified: head/include/rpc/rpc_com.h ============================================================================== --- head/include/rpc/rpc_com.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/rpc_com.h Sun Sep 2 21:04:40 2012 (r240060) @@ -42,9 +42,13 @@ #ifndef _RPC_RPCCOM_H #define _RPC_RPCCOM_H +/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ + #include -/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ +#ifdef __cplusplus +extern "C" { +#endif /* * The max size of the transport, if the size cannot be determined @@ -80,4 +84,8 @@ char *_get_next_token(char *, int); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* _RPC_RPCCOM_H */ Modified: head/include/rpc/rpc_msg.h ============================================================================== --- head/include/rpc/rpc_msg.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/rpc_msg.h Sun Sep 2 21:04:40 2012 (r240060) @@ -43,6 +43,10 @@ #ifndef _RPC_RPC_MSG_H #define _RPC_RPC_MSG_H +#ifdef __cplusplus +extern "C" { +#endif + #define RPC_MSG_VERSION ((u_int32_t) 2) #define RPC_SERVICE_PORT ((u_short) 2048) @@ -211,4 +215,8 @@ extern bool_t xdr_rejected_reply(XDR *, extern void _seterr_reply(struct rpc_msg *, struct rpc_err *); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_RPC_MSG_H */ Modified: head/include/rpc/rpcb_clnt.h ============================================================================== --- head/include/rpc/rpcb_clnt.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/rpcb_clnt.h Sun Sep 2 21:04:40 2012 (r240060) @@ -61,6 +61,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + __BEGIN_DECLS extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, const struct netconfig *, const struct netbuf *); @@ -82,4 +86,8 @@ extern char *rpcb_taddr2uaddr(struct net extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_RPCB_CLNT_H */ Modified: head/include/rpc/rpcent.h ============================================================================== --- head/include/rpc/rpcent.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/rpcent.h Sun Sep 2 21:04:40 2012 (r240060) @@ -45,6 +45,9 @@ /* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */ /* @(#)rpcent.h 1.1 88/12/06 SMI */ +#ifdef __cplusplus +extern "C" { +#endif struct rpcent { char *r_name; /* name of server for this rpc program */ @@ -64,4 +67,8 @@ extern void setrpcent(int); extern void endrpcent(void); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_CENT_H */ Modified: head/include/rpc/rpcsec_gss.h ============================================================================== --- head/include/rpc/rpcsec_gss.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/rpcsec_gss.h Sun Sep 2 21:04:40 2012 (r240060) @@ -29,6 +29,10 @@ #ifndef _RPCSEC_GSS_H #define _RPCSEC_GSS_H +#ifdef __cplusplus +extern "C" { +#endif + #include #ifndef MAX_GSS_MECH @@ -176,4 +180,8 @@ bool_t __rpc_gss_set_error(int rpc_gss_e __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPCSEC_GSS_H */ Modified: head/include/rpc/svc.h ============================================================================== --- head/include/rpc/svc.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/svc.h Sun Sep 2 21:04:40 2012 (r240060) @@ -65,6 +65,10 @@ * parameters, struct svc_req * and SVCXPRT *, defined below. */ +#ifdef __cplusplus +extern "C" { +#endif + /* * Service control requests */ @@ -467,6 +471,9 @@ int __rpc_get_local_uid(SVCXPRT *_transp __END_DECLS +#ifdef __cplusplus +} +#endif /* for backward compatibility */ #include Modified: head/include/rpc/svc_soc.h ============================================================================== --- head/include/rpc/svc_soc.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/svc_soc.h Sun Sep 2 21:04:40 2012 (r240060) @@ -49,6 +49,10 @@ * with TS-RPC */ +#ifdef __cplusplus +extern "C" { +#endif + /* * Approved way of getting address of caller */ @@ -113,4 +117,8 @@ __BEGIN_DECLS extern SVCXPRT *svcfd_create(int, u_int, u_int); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_SVC_SOC_H */ Modified: head/include/rpc/xdr.h ============================================================================== --- head/include/rpc/xdr.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/include/rpc/xdr.h Sun Sep 2 21:04:40 2012 (r240060) @@ -43,6 +43,10 @@ #define _RPC_XDR_H #include +#ifdef __cplusplus +extern "C" { +#endif + /* * XDR provides a conventional way for converting between C data * types and an external bit-string representation. Library supplied @@ -97,26 +101,26 @@ enum xdr_op { * an operations vector for the particular implementation (e.g. see xdr_mem.c), * and two private fields for the use of the particular implementation. */ -typedef struct __rpc_xdr { +typedef struct XDR { enum xdr_op x_op; /* operation; fast additional param */ const struct xdr_ops { /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); + bool_t (*x_getlong)(struct XDR *, long *); /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); + bool_t (*x_putlong)(struct XDR *, const long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); + bool_t (*x_getbytes)(struct XDR *, char *, u_int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); + u_int (*x_getpostn)(struct XDR *); /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); + bool_t (*x_setpostn)(struct XDR *, u_int); /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); + int32_t *(*x_inline)(struct XDR *, u_int); /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); + void (*x_destroy)(struct XDR *); + bool_t (*x_control)(struct XDR *, int, void *); } *x_ops; char * x_public; /* users' data */ void * x_private; /* pointer to private data */ @@ -366,4 +370,8 @@ extern bool_t xdrrec_eof(XDR *); extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); __END_DECLS +#ifdef __cplusplus +} +#endif + #endif /* !_RPC_XDR_H */ Modified: head/sys/rpc/rpc_com.h ============================================================================== --- head/sys/rpc/rpc_com.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/sys/rpc/rpc_com.h Sun Sep 2 21:04:40 2012 (r240060) @@ -114,8 +114,8 @@ extern int __rpc_sockisbound(struct sock extern int bindresvport(struct socket *so, struct sockaddr *sa); struct xucred; -struct __rpc_xdr; -bool_t xdr_authunix_parms(struct __rpc_xdr *xdrs, uint32_t *time, struct xucred *cred); +struct XDR; +bool_t xdr_authunix_parms(struct XDR *xdrs, uint32_t *time, struct xucred *cred); #endif __END_DECLS Modified: head/sys/rpc/xdr.h ============================================================================== --- head/sys/rpc/xdr.h Sun Sep 2 18:54:51 2012 (r240059) +++ head/sys/rpc/xdr.h Sun Sep 2 21:04:40 2012 (r240060) @@ -97,26 +97,26 @@ enum xdr_op { * an operations vector for the particular implementation (e.g. see xdr_mem.c), * and two private fields for the use of the particular implementation. */ -typedef struct __rpc_xdr { +typedef struct XDR { enum xdr_op x_op; /* operation; fast additional param */ const struct xdr_ops { /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); + bool_t (*x_getlong)(struct XDR *, long *); /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); + bool_t (*x_putlong)(struct XDR *, const long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); + bool_t (*x_getbytes)(struct XDR *, char *, u_int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); + u_int (*x_getpostn)(struct XDR *); /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); + bool_t (*x_setpostn)(struct XDR *, u_int); /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); + int32_t *(*x_inline)(struct XDR *, u_int); /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); + void (*x_destroy)(struct XDR *); + bool_t (*x_control)(struct XDR *, int, void *); } *x_ops; char * x_public; /* users' data */ void * x_private; /* pointer to private data */ From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:16:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36A69106564A; Sun, 2 Sep 2012 21:16:11 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 321AF8FC15; Sun, 2 Sep 2012 21:16:09 +0000 (UTC) Received: by eeke52 with SMTP id e52so1845586eek.13 for ; Sun, 02 Sep 2012 14:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=b9vmjsxdwk506Ue+SGMsygai5PWXgLd+jULRNUR7W+I=; b=0oG3ir6j4qDu3WdERkXcxo6iQUCfL7JpKbCa0vBtPk/SJZB8etHt0BxvX2OrRH9ntK ua+5vGjVI/zRkggu0Yd8PmxPsHH8BgXbA48wespN3EIDiWTAQL/l+Fhu2pIvqpxPLygE s9hiyT8seimHELKPO6tzsnSRQ+xbZsVyYOjERJU8Pj5y5YPbNFEVUwZoEiZtDAlyaX9b WycfvPB+DP0jswtys9LZqUtRJjlsFB6SbVGvurUhgbxyrNKWyw9o1g0Vbb0CRdiCzBWR KYsfmFqne+hImaddKCBQlKJfLd4LkP4QBB6C+cdVwhtWVwt9RkoVAtecWu0lJk/3ocyA Q+gw== Received: by 10.14.215.193 with SMTP id e41mr18810280eep.44.1346620569034; Sun, 02 Sep 2012 14:16:09 -0700 (PDT) Received: from ?IPv6:2001:470:28:4ba:bd0d:c674:d614:f7e2? ([2001:470:28:4ba:bd0d:c674:d614:f7e2]) by mx.google.com with ESMTPS id l42sm30968756eep.1.2012.09.02.14.16.06 (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 14:16:08 -0700 (PDT) Message-ID: <5043CC95.9090707@gmail.com> Date: Mon, 03 Sep 2012 01:16:05 +0400 From: Yuri Pankov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: "Pedro F. Giffuni" References: <201209022104.q82L4eru068961@svn.freebsd.org> In-Reply-To: <201209022104.q82L4eru068961@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 21:16:11 -0000 On Sun, 2 Sep 2012 21:04:40 +0000 (UTC), Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Sep 2 21:04:40 2012 > New Revision: 240060 > URL: http://svn.freebsd.org/changeset/base/240060 > > Log: > Fix RPC headers for C++ > > C++ mangling will cause trouble with variables like __rpc_xdr > in xdr.h so rename this to XDR. > While here add proper C++ guards to RPC headers. > > PR: 137443 > MFC after: 2 weeks > > Modified: > head/include/rpc/auth.h > head/include/rpc/auth_unix.h > head/include/rpc/clnt.h > head/include/rpc/clnt_soc.h > head/include/rpc/des_crypt.h > head/include/rpc/nettype.h > head/include/rpc/pmap_clnt.h > head/include/rpc/pmap_rmt.h > head/include/rpc/rpc_com.h > head/include/rpc/rpc_msg.h > head/include/rpc/rpcb_clnt.h > head/include/rpc/rpcent.h > head/include/rpc/rpcsec_gss.h > head/include/rpc/svc.h > head/include/rpc/svc_soc.h > head/include/rpc/xdr.h > head/sys/rpc/rpc_com.h > head/sys/rpc/xdr.h > > Modified: head/include/rpc/auth.h > ============================================================================== > --- head/include/rpc/auth.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/auth.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -51,6 +51,10 @@ > #include > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #define MAX_AUTH_BYTES 400 > #define MAXNETNAMELEN 255 /* maximum length of network user's name */ > > @@ -366,4 +370,8 @@ __END_DECLS > #define RPCSEC_GSS_KRB5I 390004 > #define RPCSEC_GSS_KRB5P 390005 > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_AUTH_H */ > > Modified: head/include/rpc/auth_unix.h > ============================================================================== > --- head/include/rpc/auth_unix.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/auth_unix.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -48,6 +48,10 @@ > #define _RPC_AUTH_UNIX_H > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > /* The machine name is part of a credential; it may not exceed 255 bytes */ > #define MAX_MACHINE_NAME 255 > > @@ -81,4 +85,8 @@ struct short_hand_verf { > struct opaque_auth new_cred; > }; > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_AUTH_UNIX_H */ > > Modified: head/include/rpc/clnt.h > ============================================================================== > --- head/include/rpc/clnt.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/clnt.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -64,6 +64,10 @@ > #include > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > /* > * Well-known IPV6 RPC broadcast address. > */ > @@ -551,6 +555,10 @@ extern enum clnt_stat rpc_broadcast_exp( > const int, const char *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > /* For backward compatibility */ > #include > > > Modified: head/include/rpc/clnt_soc.h > ============================================================================== > --- head/include/rpc/clnt_soc.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/clnt_soc.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -49,6 +49,10 @@ > > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ > > /* > @@ -103,4 +107,8 @@ extern CLIENT *clntudp_bufcreate(struct > struct timeval, int *, u_int, u_int); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* _RPC_CLNT_SOC_H */ > > Modified: head/include/rpc/des_crypt.h > ============================================================================== > --- head/include/rpc/des_crypt.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/des_crypt.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -47,6 +47,10 @@ > #include > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #define DES_MAXDATA 8192 /* max bytes encrypted in one call */ > #define DES_DIRMASK (1 << 0) > #define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ > @@ -103,4 +107,8 @@ __BEGIN_DECLS > void des_setparity( char *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* _DES_DES_CRYPT_H */ > > Modified: head/include/rpc/nettype.h > ============================================================================== > --- head/include/rpc/nettype.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/nettype.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -44,6 +44,10 @@ > > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #define _RPC_NONE 0 > #define _RPC_NETPATH 1 > #define _RPC_VISIBLE 2 > @@ -61,4 +65,8 @@ extern struct netconfig *__rpc_getconf(v > extern struct netconfig *__rpc_getconfip(const char *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_NETTYPE_H */ > > Modified: head/include/rpc/pmap_clnt.h > ============================================================================== > --- head/include/rpc/pmap_clnt.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/pmap_clnt.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -66,6 +66,10 @@ > #define _RPC_PMAP_CLNT_H_ > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > __BEGIN_DECLS > extern bool_t pmap_set(u_long, u_long, int, int); > extern bool_t pmap_unset(u_long, u_long); > @@ -83,4 +87,8 @@ extern u_short pmap_getport(struct sock > u_long, u_long, u_int); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_PMAP_CLNT_H_ */ > > Modified: head/include/rpc/pmap_rmt.h > ============================================================================== > --- head/include/rpc/pmap_rmt.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/pmap_rmt.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -44,6 +44,10 @@ > #define _RPC_PMAP_RMT_H > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > struct rmtcallargs { > u_long prog, vers, proc, arglen; > caddr_t args_ptr; > @@ -62,4 +66,8 @@ extern bool_t xdr_rmtcall_args(XDR *, st > extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_PMAP_RMT_H */ > > Modified: head/include/rpc/rpc_com.h > ============================================================================== > --- head/include/rpc/rpc_com.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/rpc_com.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -42,9 +42,13 @@ > #ifndef _RPC_RPCCOM_H > #define _RPC_RPCCOM_H > > +/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ > + > #include > > -/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ > +#ifdef __cplusplus > +extern "C" { > +#endif > > /* > * The max size of the transport, if the size cannot be determined > @@ -80,4 +84,8 @@ char *_get_next_token(char *, int); > > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* _RPC_RPCCOM_H */ > > Modified: head/include/rpc/rpc_msg.h > ============================================================================== > --- head/include/rpc/rpc_msg.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/rpc_msg.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -43,6 +43,10 @@ > #ifndef _RPC_RPC_MSG_H > #define _RPC_RPC_MSG_H > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #define RPC_MSG_VERSION ((u_int32_t) 2) > #define RPC_SERVICE_PORT ((u_short) 2048) > > @@ -211,4 +215,8 @@ extern bool_t xdr_rejected_reply(XDR *, > extern void _seterr_reply(struct rpc_msg *, struct rpc_err *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_RPC_MSG_H */ > > Modified: head/include/rpc/rpcb_clnt.h > ============================================================================== > --- head/include/rpc/rpcb_clnt.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/rpcb_clnt.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -61,6 +61,10 @@ > #include > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > __BEGIN_DECLS > extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, > const struct netconfig *, const struct netbuf *); > @@ -82,4 +86,8 @@ extern char *rpcb_taddr2uaddr(struct net > extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_RPCB_CLNT_H */ > > Modified: head/include/rpc/rpcent.h > ============================================================================== > --- head/include/rpc/rpcent.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/rpcent.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -45,6 +45,9 @@ > /* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */ > /* @(#)rpcent.h 1.1 88/12/06 SMI */ > > +#ifdef __cplusplus > +extern "C" { > +#endif > > struct rpcent { > char *r_name; /* name of server for this rpc program */ > @@ -64,4 +67,8 @@ extern void setrpcent(int); > extern void endrpcent(void); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_CENT_H */ > > Modified: head/include/rpc/rpcsec_gss.h > ============================================================================== > --- head/include/rpc/rpcsec_gss.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/rpcsec_gss.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -29,6 +29,10 @@ > #ifndef _RPCSEC_GSS_H > #define _RPCSEC_GSS_H > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #include > > #ifndef MAX_GSS_MECH > @@ -176,4 +180,8 @@ bool_t __rpc_gss_set_error(int rpc_gss_e > > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPCSEC_GSS_H */ > > Modified: head/include/rpc/svc.h > ============================================================================== > --- head/include/rpc/svc.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/svc.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -65,6 +65,10 @@ > * parameters, struct svc_req * and SVCXPRT *, defined below. > */ > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > /* > * Service control requests > */ > @@ -467,6 +471,9 @@ int __rpc_get_local_uid(SVCXPRT *_transp > > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > > /* for backward compatibility */ > #include > > Modified: head/include/rpc/svc_soc.h > ============================================================================== > --- head/include/rpc/svc_soc.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/svc_soc.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -49,6 +49,10 @@ > * with TS-RPC > */ > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > /* > * Approved way of getting address of caller > */ > @@ -113,4 +117,8 @@ __BEGIN_DECLS > extern SVCXPRT *svcfd_create(int, u_int, u_int); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_SVC_SOC_H */ > > Modified: head/include/rpc/xdr.h > ============================================================================== > --- head/include/rpc/xdr.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/include/rpc/xdr.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -43,6 +43,10 @@ > #define _RPC_XDR_H > #include > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > /* > * XDR provides a conventional way for converting between C data > * types and an external bit-string representation. Library supplied > @@ -97,26 +101,26 @@ enum xdr_op { > * an operations vector for the particular implementation (e.g. see xdr_mem.c), > * and two private fields for the use of the particular implementation. > */ > -typedef struct __rpc_xdr { > +typedef struct XDR { > enum xdr_op x_op; /* operation; fast additional param */ > const struct xdr_ops { > /* get a long from underlying stream */ > - bool_t (*x_getlong)(struct __rpc_xdr *, long *); > + bool_t (*x_getlong)(struct XDR *, long *); > /* put a long to " */ > - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); > + bool_t (*x_putlong)(struct XDR *, const long *); > /* get some bytes from " */ > - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); > + bool_t (*x_getbytes)(struct XDR *, char *, u_int); > /* put some bytes to " */ > - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); > + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); > /* returns bytes off from beginning */ > - u_int (*x_getpostn)(struct __rpc_xdr *); > + u_int (*x_getpostn)(struct XDR *); > /* lets you reposition the stream */ > - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); > + bool_t (*x_setpostn)(struct XDR *, u_int); > /* buf quick ptr to buffered data */ > - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); > + int32_t *(*x_inline)(struct XDR *, u_int); > /* free privates of this xdr_stream */ > - void (*x_destroy)(struct __rpc_xdr *); > - bool_t (*x_control)(struct __rpc_xdr *, int, void *); > + void (*x_destroy)(struct XDR *); > + bool_t (*x_control)(struct XDR *, int, void *); > } *x_ops; > char * x_public; /* users' data */ > void * x_private; /* pointer to private data */ > @@ -366,4 +370,8 @@ extern bool_t xdrrec_eof(XDR *); > extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); > __END_DECLS > > +#ifdef __cplusplus > +} > +#endif > + > #endif /* !_RPC_XDR_H */ > > Modified: head/sys/rpc/rpc_com.h > ============================================================================== > --- head/sys/rpc/rpc_com.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/sys/rpc/rpc_com.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -114,8 +114,8 @@ extern int __rpc_sockisbound(struct sock > extern int bindresvport(struct socket *so, struct sockaddr *sa); > > struct xucred; > -struct __rpc_xdr; > -bool_t xdr_authunix_parms(struct __rpc_xdr *xdrs, uint32_t *time, struct xucred *cred); > +struct XDR; > +bool_t xdr_authunix_parms(struct XDR *xdrs, uint32_t *time, struct xucred *cred); > #endif > > __END_DECLS > > Modified: head/sys/rpc/xdr.h > ============================================================================== > --- head/sys/rpc/xdr.h Sun Sep 2 18:54:51 2012 (r240059) > +++ head/sys/rpc/xdr.h Sun Sep 2 21:04:40 2012 (r240060) > @@ -97,26 +97,26 @@ enum xdr_op { > * an operations vector for the particular implementation (e.g. see xdr_mem.c), > * and two private fields for the use of the particular implementation. > */ > -typedef struct __rpc_xdr { > +typedef struct XDR { > enum xdr_op x_op; /* operation; fast additional param */ > const struct xdr_ops { > /* get a long from underlying stream */ > - bool_t (*x_getlong)(struct __rpc_xdr *, long *); > + bool_t (*x_getlong)(struct XDR *, long *); > /* put a long to " */ > - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); > + bool_t (*x_putlong)(struct XDR *, const long *); > /* get some bytes from " */ > - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); > + bool_t (*x_getbytes)(struct XDR *, char *, u_int); > /* put some bytes to " */ > - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); > + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); > /* returns bytes off from beginning */ > - u_int (*x_getpostn)(struct __rpc_xdr *); > + u_int (*x_getpostn)(struct XDR *); > /* lets you reposition the stream */ > - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); > + bool_t (*x_setpostn)(struct XDR *, u_int); > /* buf quick ptr to buffered data */ > - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); > + int32_t *(*x_inline)(struct XDR *, u_int); > /* free privates of this xdr_stream */ > - void (*x_destroy)(struct __rpc_xdr *); > - bool_t (*x_control)(struct __rpc_xdr *, int, void *); > + void (*x_destroy)(struct XDR *); > + bool_t (*x_control)(struct XDR *, int, void *); > } *x_ops; > char * x_public; /* users' data */ > void * x_private; /* pointer to private data */ Don't __BEGIN_DECLS and __END_DECLS do exactly that? i.e. it looks like some of the #ifdef's you added are redundant. From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:16:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67B2A1065676; Sun, 2 Sep 2012 21:16:11 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE5528FC16; Sun, 2 Sep 2012 21:16:10 +0000 (UTC) Received: by obbun3 with SMTP id un3so10787724obb.13 for ; Sun, 02 Sep 2012 14:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dIAiY9C7UOZ3H958OWVH22XJOvk+ToPB1noCc2A7gYY=; b=SHKH6sS18AStLaJ2KGNLws9cG8AVVZOwLVNI8HtKIz1Geon9A0lCIOJdoB/89Z4J4p /aybi5xiTnM0NLUhewQNsjaFlSpN7MK8B881owNSccEVhX9OSVdna81uKOP4bu3ki4b0 BJeJg1FgI5NnIXV5FkYdmbUJwqFtq/RFLMxFhoGw9IL65RoyQlYFSivPQI0jm75UQCm2 YgY5CHiCAHeKMzb/eWWeWOjm9lJCZKhbmGopIbAXY16PTTpwbI5PGwvJP8IX19odi0+9 acYzvwgx+GVmFIotlQlFKwiqGcSXmE89cXszyEUPM9VCyBAnFhIE+CeOzS89xnmkRYwH N4QA== MIME-Version: 1.0 Received: by 10.60.27.9 with SMTP id p9mr12126825oeg.69.1346620570227; Sun, 02 Sep 2012 14:16:10 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Sun, 2 Sep 2012 14:16:10 -0700 (PDT) In-Reply-To: <201209021739.q82Hd3CE042578@svn.freebsd.org> References: <201209021739.q82Hd3CE042578@svn.freebsd.org> Date: Sun, 2 Sep 2012 14:16:10 -0700 Message-ID: From: Garrett Cooper To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240026 - 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, 02 Sep 2012 21:16:11 -0000 On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov wrote: > Author: zont > Date: Sun Sep 2 17:39:02 2012 > New Revision: 240026 > URL: http://svn.freebsd.org/changeset/base/240026 > > Log: > - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz > and kern.sgrowsiz sysctls writable. > > Approved by: kib (mentor) > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Sun Sep 2 15:27:20 2012 (r240025) > +++ head/sys/kern/subr_param.c Sun Sep 2 17:39:02 2012 (r240026) > @@ -119,18 +119,18 @@ SYSCTL_LONG(_kern, OID_AUTO, maxswzone, > "Maximum memory for swap metadata"); > SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, &maxbcache, 0, > "Maximum value of vfs.maxbufspace"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN, &maxtsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxtsiz, 0, > "Maximum text size"); > -SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN, &dfldsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dfldsiz, 0, > "Initial data size limit"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN, &maxdsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxdsiz, 0, > "Maximum data size"); > -SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN, &dflssiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dflssiz, 0, > "Initial stack size limit"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN, &maxssiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxssiz, 0, > "Maximum stack size"); > -SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN, &sgrowsiz, 0, > - "Amount to grow stack on a stack fault"); > +SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &sgrowsiz, > + 0, "Amount to grow stack on a stack fault"); > SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, > NULL, 0, sysctl_kern_vm_guest, "A", > "Virtual machine guest detected? (none|generic|xen)"); Please add some basic sanity checking to init_param1 -- there's absolutely nothing preventing me from passing in values <= 0 or other non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:20:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CCBC1065674; Sun, 2 Sep 2012 21:20:54 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7F95F8FC26; Sun, 2 Sep 2012 21:20:53 +0000 (UTC) Received: by obbun3 with SMTP id un3so10791604obb.13 for ; Sun, 02 Sep 2012 14:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3nKC5f3hqZ1N8DvLobwF76oILzv/tBCxOYQKpvo+nVQ=; b=X4lSYchn+77iknnRcpfU3EIloGY5OS61eSUcvU2SqQJzi4qgbfWvj1VF6YxnVRGxDP kOQWfPAWa/+ZrHfOnvdcoID37716SfBu3jcQPsUuaFOESFs/7rLXochNS5QnBb0iH0HA meKOF1ywcyxoR0taZeDqfjurQZdaH7KMLl6uTC4KV/xmaN7H5QIrTFLwLfw7IbzUrpQ8 aBYDxSQHLPPV2CYbI0TiZcM/guTGaJcRznQK+nYlIHS6srMYy1bera89ZruUaCVdC+dw 6rohOqwq/lzF+4m76AaZHDu3xpkK9KMN3AbLtTfh6TjtHV6eXsmNqwAu+1lBXpLvj4Fx O1dQ== MIME-Version: 1.0 Received: by 10.182.38.71 with SMTP id e7mr12606915obk.67.1346620853038; Sun, 02 Sep 2012 14:20:53 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Sun, 2 Sep 2012 14:20:53 -0700 (PDT) In-Reply-To: References: <201209021739.q82Hd3CE042578@svn.freebsd.org> Date: Sun, 2 Sep 2012 14:20:53 -0700 Message-ID: From: Garrett Cooper To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240026 - 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, 02 Sep 2012 21:20:54 -0000 On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper wrote: > On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov wrote: >> Author: zont >> Date: Sun Sep 2 17:39:02 2012 >> New Revision: 240026 >> URL: http://svn.freebsd.org/changeset/base/240026 >> >> Log: >> - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz >> and kern.sgrowsiz sysctls writable. >> >> Approved by: kib (mentor) >> >> Modified: >> head/sys/kern/subr_param.c ... > > Please add some basic sanity checking to init_param1 -- there's > absolutely nothing preventing me from passing in values <= 0 or other Correction: values == 0 with little effort (missed the part where it was using TUNABLE_ULONG_FETCH). You could get negative values though if you overflow the value passed in -- in part because the getenv* functions in kern_environment.c don't check for/handle overflow gracefully .. I had a patch out for this a while ago that never made it in. > non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values. > Thanks, > -Garrett From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:44:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21B031065670; Sun, 2 Sep 2012 21:44:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C54B8FC0A; Sun, 2 Sep 2012 21:44:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82LiOEQ073560; Sun, 2 Sep 2012 21:44:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82LiONQ073558; Sun, 2 Sep 2012 21:44:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209022144.q82LiONQ073558@svn.freebsd.org> From: Eitan Adler Date: Sun, 2 Sep 2012 21:44: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: r240061 - stable/8/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: Sun, 02 Sep 2012 21:44:25 -0000 Author: eadler Date: Sun Sep 2 21:44:24 2012 New Revision: 240061 URL: http://svn.freebsd.org/changeset/base/240061 Log: Revert MFC of r238206 as this feature isn't available in stable/8 Approved by: cperciva (implicit) Pointyhat to: me Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Sun Sep 2 21:04:40 2012 (r240060) +++ stable/8/sys/vm/uma_core.c Sun Sep 2 21:44:24 2012 (r240061) @@ -2161,7 +2161,6 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone->uz_flags |= UMA_ZFLAG_FULL; if (flags & M_NOWAIT) break; - zone->uz_sleeps++; msleep(keg, &keg->uk_lock, PVM, "keglimit", 0); continue; } From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:59:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD283106564A for ; Sun, 2 Sep 2012 21:59:33 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm8-vm3.bullet.mail.ne1.yahoo.com (nm8-vm3.bullet.mail.ne1.yahoo.com [98.138.91.138]) by mx1.freebsd.org (Postfix) with SMTP id 4F4778FC16 for ; Sun, 2 Sep 2012 21:59:33 +0000 (UTC) Received: from [98.138.90.50] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 02 Sep 2012 21:59:32 -0000 Received: from [98.138.89.246] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 02 Sep 2012 21:59:32 -0000 Received: from [127.0.0.1] by omp1060.mail.ne1.yahoo.com with NNFMP; 02 Sep 2012 21:59:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 719899.37215.bm@omp1060.mail.ne1.yahoo.com Received: (qmail 56477 invoked by uid 60001); 2 Sep 2012 21:59:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346623171; bh=2W/Q9Qjdk1oeB3drHQQOJmgnfbeJiqivXvAsQ6w41NE=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=2SIzumNDzLMlpTdY2Nvx9UoQfcEra0fYSsSyyBLiKP3Pwi1CGw+T8OovmkZefyl+gznwmoDSyGhgXLwCysh8fUQKp2346YUPg6cvz2x9gK4jp0NrDWLb8U2AJhS08oobY5r9e1fIXNyAaK7BdTQ96d8ZZro+/Cfplwa9d+K/Qpo= X-YMail-OSG: pHJCYygVM1kGCtS99A3hfRacHEiJjeHoVw3Cju1II3FZWry 5HjQ1.4Q.IP0K6sb7JNpXxDKosg4P1wjQgdCLH8QY2BB2cgPX_ENhNS807dp xwzXQzaRncaUsUCa03.FgitZMR103rNnpVPvJKo30mXALj4rvmSRCD6mzai. EfoOAuksYV3ooPjYpmn1s4tCVZB2Px._qn3p1wl0Ovog_I32Ir.gel9jzxs2 rOzkyDLqnlvrUF73zYTt78McjX1ypJPDnnd1Odaz_AopF.fgZiwTS5N3EliF hrCQrRPVk_HyufO63Sqai4UMS_akcZ4pJgy1fGHlvERSItE0AaGtA_akrRar zCyllFx94DJ8ZVI7Al8DvXKP9qWZWF6XbDxiriorBeM.T.evxzXC1EfnFnnh uIL2ylJ.JrO2B2LIC3Nc36Al0UofufgYCEZAFhBuf5S6tZo3VKG32A6VbdEX 4.GaIzo.xR_5Ikld4EcLmIMre6eQNAwlVb6h4whIgbRDZkIm5ZSKAzKhzTkB F6T4XcvePB95UPHznSwICGcrHaajbZyrN Received: from [200.118.157.7] by web113517.mail.gq1.yahoo.com via HTTP; Sun, 02 Sep 2012 14:59:31 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.121.416 References: <201209022104.q82L4eru068961@svn.freebsd.org> <5043CC95.9090707@gmail.com> Message-ID: <1346623171.31494.YahooMailNeo@web113517.mail.gq1.yahoo.com> Date: Sun, 2 Sep 2012 14:59:31 -0700 (PDT) From: Pedro Giffuni To: Yuri Pankov In-Reply-To: <5043CC95.9090707@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pedro Giffuni List-Id: "SVN commit messages 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, 02 Sep 2012 21:59:33 -0000 Yes, indeed! I will revert most of it.=0A=A0=0AThanks for checking!=0A=A0= =0APedro.=0A=0A=0A>________________________________=0A> From: Yuri Pankov <= yuri.pankov@gmail.com>=0A>To: Pedro F. Giffuni =0A>Cc: sr= c-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org= =0A>Sent: Sunday, September 2, 2012 4:16 PM=0A>Subject: Re: svn commit: r2= 40060 - in head: include/rpc sys/rpc=0A> =0A>On Sun, 2 Sep 2012 21:04:40 += 0000 (UTC), Pedro F. Giffuni wrote:=0A>> Author: pfg=0A>> Date: Sun Sep=A0 = 2 21:04:40 2012=0A>> New Revision: 240060=0A>> URL: http://svn.freebsd.org/= changeset/base/240060=0A>>=0A>> Log:=0A>>=A0 =A0 Fix RPC headers for C++=0A= >>=0A>>=A0 =A0 C++ mangling will cause trouble with variables like __rpc_xd= r=0A>>=A0 =A0 in xdr.h so rename this to XDR.=0A>>=A0 =A0 While here add pr= oper C++ guards to RPC headers.=0A>>=0A>>=A0 =A0 PR:=A0=A0=A0 =A0=A0=A0 137= 443=0A>>=A0 =A0 MFC after:=A0=A0=A0 2 weeks=0A>>=0A>> Modified:=0A>>=A0 =A0= head/include/rpc/auth.h=0A>>=A0 =A0 head/include/rpc/auth_unix.h=0A>>=A0 = =A0 head/include/rpc/clnt.h=0A>>=A0 =A0 head/include/rpc/clnt_soc.h=0A>>=A0= =A0 head/include/rpc/des_crypt.h=0A>>=A0 =A0 head/include/rpc/nettype.h=0A= >>=A0 =A0 head/include/rpc/pmap_clnt.h=0A>>=A0 =A0 head/include/rpc/pmap_rm= t.h=0A>>=A0 =A0 head/include/rpc/rpc_com.h=0A>>=A0 =A0 head/include/rpc/rpc= _msg.h=0A>>=A0 =A0 head/include/rpc/rpcb_clnt.h=0A>>=A0 =A0 head/include/rp= c/rpcent.h=0A>>=A0 =A0 head/include/rpc/rpcsec_gss.h=0A>>=A0 =A0 head/inclu= de/rpc/svc.h=0A>>=A0 =A0 head/include/rpc/svc_soc.h=0A>>=A0 =A0 head/includ= e/rpc/xdr.h=0A>>=A0 =A0 head/sys/rpc/rpc_com.h=0A>>=A0 =A0 head/sys/rpc/xdr= .h=0A>>=0A>> Modified: head/include/rpc/auth.h=0A>> =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- he= ad/include/rpc/auth.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059= )=0A>> +++ head/include/rpc/auth.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0= =A0=A0 (r240060)=0A>> @@ -51,6 +51,10 @@=0A>>=A0 #include =0A= >>=A0 #include =0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> = +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 #define MAX_AUTH_BYTES=A0=A0=A0 = 400=0A>>=A0 #define MAXNETNAMELEN=A0=A0=A0 255=A0=A0=A0 /* maximum length = of network user's name */=0A>>=0A>> @@ -366,4 +370,8 @@ __END_DECLS=0A>>=A0= #define=A0=A0=A0 RPCSEC_GSS_KRB5I=A0=A0=A0 390004=0A>>=A0 #define=A0=A0= =A0 RPCSEC_GSS_KRB5P=A0=A0=A0 390005=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus= =0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_AUTH_H */=0A>>=0A>> M= odified: head/include/rpc/auth_unix.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/includ= e/rpc/auth_unix.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A= >> +++ head/include/rpc/auth_unix.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0= =A0=A0 (r240060)=0A>> @@ -48,6 +48,10 @@=0A>>=A0 #define _RPC_AUTH_UNIX_H= =0A>>=A0 #include =0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>= > +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 /* The machine name is part of= a credential; it may not exceed 255 bytes */=0A>>=A0 #define MAX_MACHINE_= NAME 255=0A>>=0A>> @@ -81,4 +85,8 @@ struct short_hand_verf {=0A>>=A0 =A0= =A0=A0 struct opaque_auth new_cred;=0A>>=A0 };=0A>>=0A>> +#ifdef=A0=A0=A0 = __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_AUTH_UNIX_= H */=0A>>=0A>> Modified: head/include/rpc/clnt.h=0A>> =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- he= ad/include/rpc/clnt.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059= )=0A>> +++ head/include/rpc/clnt.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0= =A0=A0 (r240060)=0A>> @@ -64,6 +64,10 @@=0A>>=A0 #include =0A= >>=A0 #include =0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +ext= ern "C" {=0A>> +#endif=0A>> +=0A>>=A0 /*=0A>>=A0 =A0 * Well-known IPV6 RPC= broadcast address.=0A>>=A0 =A0 */=0A>> @@ -551,6 +555,10 @@ extern enum cl= nt_stat rpc_broadcast_exp(=0A>>=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0= =A0=A0=A0 const int, const char *);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef= =A0=A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 /* For backward = compatibility */=0A>>=A0 #include =0A>>=0A>>=0A>> Modified= : head/include/rpc/clnt_soc.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/include/rpc/cln= t_soc.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ hea= d/include/rpc/clnt_soc.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r240= 060)=0A>> @@ -49,6 +49,10 @@=0A>>=0A>>=A0 #include =0A>>=0A>>= +#ifdef=A0=A0=A0 __cplusplus=0A>> +extern "C" {=0A>> +#endif=0A>> +=0A>>= =A0 #define UDPMSGSIZE=A0 =A0 =A0 8800=A0 =A0 /* rpc imposed limit on udp = msg size */=0A>>=0A>>=A0 /*=0A>> @@ -103,4 +107,8 @@ extern CLIENT *clntud= p_bufcreate(struct=0A>>=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 struct= timeval, int *, u_int, u_int);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0= =A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* _RPC_CLNT= _SOC_H */=0A>>=0A>> Modified: head/include/rpc/des_crypt.h=0A>> =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =0A>> --- head/include/rpc/des_crypt.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012= =A0=A0=A0 (r240059)=0A>> +++ head/include/rpc/des_crypt.h=A0=A0=A0 Sun Sep= =A0 2 21:04:40 2012=A0=A0=A0 (r240060)=0A>> @@ -47,6 +47,10 @@=0A>>=A0 #in= clude =0A>>=A0 #include =0A>>=0A>> +#ifdef=A0=A0= =A0 __cplusplus=0A>> +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 #define DES= _MAXDATA 8192=A0=A0=A0 /* max bytes encrypted in one call */=0A>>=A0 #defi= ne DES_DIRMASK (1 << 0)=0A>>=A0 #define DES_ENCRYPT (0*DES_DIRMASK)=A0=A0= =A0 /* Encrypt */=0A>> @@ -103,4 +107,8 @@ __BEGIN_DECLS=0A>>=A0 void des_= setparity( char *);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 __cplus= plus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif=A0 /* _DES_DES_CRYPT_H */= =0A>>=0A>> Modified: head/include/rpc/nettype.h=0A>> =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- he= ad/include/rpc/nettype.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240= 059)=0A>> +++ head/include/rpc/nettype.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 201= 2=A0=A0=A0 (r240060)=0A>> @@ -44,6 +44,10 @@=0A>>=0A>>=A0 #include =0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +extern "C" {=0A>> +#end= if=0A>> +=0A>>=A0 #define=A0=A0=A0 _RPC_NONE=A0=A0=A0 0=0A>>=A0 #define= =A0=A0=A0 _RPC_NETPATH=A0=A0=A0 1=0A>>=A0 #define=A0=A0=A0 _RPC_VISIBLE=A0= =A0=A0 2=0A>> @@ -61,4 +65,8 @@ extern struct netconfig *__rpc_getconf(v=0A= >>=A0 extern struct netconfig *__rpc_getconfip(const char *);=0A>>=A0 __E= ND_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>> += =0A>>=A0 #endif=A0=A0=A0 /* !_RPC_NETTYPE_H */=0A>>=0A>> Modified: head/in= clude/rpc/pmap_clnt.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/include/rpc/pmap_clnt.h= =A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ head/inclu= de/rpc/pmap_clnt.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r240060)= =0A>> @@ -66,6 +66,10 @@=0A>>=A0 #define _RPC_PMAP_CLNT_H_=0A>>=A0 #inclu= de =0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +extern "C" {= =0A>> +#endif=0A>> +=0A>>=A0 __BEGIN_DECLS=0A>>=A0 extern bool_t=A0=A0=A0= =A0=A0=A0 pmap_set(u_long, u_long, int, int);=0A>>=A0 extern bool_t=A0=A0= =A0 =A0=A0=A0 pmap_unset(u_long, u_long);=0A>> @@ -83,4 +87,8 @@ extern u_s= hort=A0=A0=A0 =A0=A0=A0 pmap_getport(struct sock=0A>>=A0 =A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 =A0 =A0 u_long, u_long, u_int);=0A>>=A0 __END_DEC= LS=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>= =A0 #endif /* !_RPC_PMAP_CLNT_H_ */=0A>>=0A>> Modified: head/include/rpc/p= map_rmt.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/include/rpc/pmap_rmt.h=A0=A0=A0 Sun = Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ head/include/rpc/pmap_rm= t.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r240060)=0A>> @@ -44,6 +4= 4,10 @@=0A>>=A0 #define _RPC_PMAP_RMT_H=0A>>=A0 #include =0A= >>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +extern "C" {=0A>> +#endif=0A>> += =0A>>=A0 struct rmtcallargs {=0A>>=A0 =A0=A0=A0 u_long prog, vers, proc, = arglen;=0A>>=A0 =A0=A0=A0 caddr_t args_ptr;=0A>> @@ -62,4 +66,8 @@ extern = bool_t xdr_rmtcall_args(XDR *, st=0A>>=A0 extern bool_t xdr_rmtcallres(XDR= *, struct rmtcallres *);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 _= _cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_PMAP_RMT_H = */=0A>>=0A>> Modified: head/include/rpc/rpc_com.h=0A>> =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> ---= head/include/rpc/rpc_com.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r= 240059)=0A>> +++ head/include/rpc/rpc_com.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 = 2012=A0=A0=A0 (r240060)=0A>> @@ -42,9 +42,13 @@=0A>>=A0 #ifndef _RPC_RPCCO= M_H=0A>>=A0 #define=A0=A0=A0 _RPC_RPCCOM_H=0A>>=0A>> +/* #pragma ident=A0= =A0=A0 "@(#)rpc_com.h=A0=A0=A0 1.11=A0=A0=A0 93/07/05 SMI" */=0A>> +=0A>>= =A0 #include =0A>>=0A>> -/* #pragma ident=A0=A0=A0 "@(#)rpc_c= om.h=A0=A0=A0 1.11=A0=A0=A0 93/07/05 SMI" */=0A>> +#ifdef __cplusplus=0A>> = +extern "C" {=0A>> +#endif=0A>>=0A>>=A0 /*=0A>>=A0 =A0 * The max size of t= he transport, if the size cannot be determined=0A>> @@ -80,4 +84,8 @@ char = *_get_next_token(char *, int);=0A>>=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef = __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* _RPC_RPCCOM_H */= =0A>>=0A>> Modified: head/include/rpc/rpc_msg.h=0A>> =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- he= ad/include/rpc/rpc_msg.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240= 059)=0A>> +++ head/include/rpc/rpc_msg.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 201= 2=A0=A0=A0 (r240060)=0A>> @@ -43,6 +43,10 @@=0A>>=A0 #ifndef _RPC_RPC_MSG_= H=0A>>=A0 #define _RPC_RPC_MSG_H=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A= >> +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 #define RPC_MSG_VERSION=A0=A0= =A0 =A0=A0=A0 ((u_int32_t) 2)=0A>>=A0 #define RPC_SERVICE_PORT=A0=A0=A0 ((= u_short) 2048)=0A>>=0A>> @@ -211,4 +215,8 @@ extern bool_t=A0=A0=A0 xdr_rej= ected_reply(XDR *,=0A>>=A0 extern void=A0=A0=A0 _seterr_reply(struct rpc_m= sg *, struct rpc_err *);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 __= cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_RPC_MSG_H */= =0A>>=0A>> Modified: head/include/rpc/rpcb_clnt.h=0A>> =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> ---= head/include/rpc/rpcb_clnt.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 = (r240059)=0A>> +++ head/include/rpc/rpcb_clnt.h=A0=A0=A0 Sun Sep=A0 2 21:04= :40 2012=A0=A0=A0 (r240060)=0A>> @@ -61,6 +61,10 @@=0A>>=A0 #include =0A>>=A0 #include =0A>>=0A>> +#ifdef=A0=A0=A0 __c= plusplus=0A>> +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 __BEGIN_DECLS=0A>>= =A0 extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,=0A>>=A0 =A0= =A0=A0 =A0=A0=A0 =A0 =A0 =A0 const struct netconfig=A0 *, const struct net= buf *);=0A>> @@ -82,4 +86,8 @@ extern char *rpcb_taddr2uaddr(struct net=0A>= >=A0 extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);= =0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +}=0A>> += #endif=0A>> +=0A>>=A0 #endif=A0=A0=A0 /* !_RPC_RPCB_CLNT_H */=0A>>=0A>> Mo= dified: head/include/rpc/rpcent.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/include/rpc/= rpcent.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ he= ad/include/rpc/rpcent.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r2400= 60)=0A>> @@ -45,6 +45,9 @@=0A>>=A0 /*=A0=A0=A0 #pragma ident "@(#)rpcent.h= =A0 1.13=A0 =A0 94/04/25 SMI"=A0=A0=A0 */=0A>>=A0 /*=A0 =A0 =A0 @(#)rpcen= t.h 1.1 88/12/06 SMI=A0 */=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +ex= tern "C" {=0A>> +#endif=0A>>=0A>>=A0 struct rpcent {=0A>>=A0 =A0 =A0 =A0 = char=A0 =A0 *r_name;=A0 =A0 =A0 =A0 /* name of server for this rpc program = */=0A>> @@ -64,4 +67,8 @@ extern void setrpcent(int);=0A>>=A0 extern void = endrpcent(void);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplu= s=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_CENT_H */=0A>>=0A>> = Modified: head/include/rpc/rpcsec_gss.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/includ= e/rpc/rpcsec_gss.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)= =0A>> +++ head/include/rpc/rpcsec_gss.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012= =A0=A0=A0 (r240060)=0A>> @@ -29,6 +29,10 @@=0A>>=A0 #ifndef _RPCSEC_GSS_H= =0A>>=A0 #define _RPCSEC_GSS_H=0A>>=0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>>= +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 #include =0A>>= =0A>>=A0 #ifndef MAX_GSS_MECH=0A>> @@ -176,4 +180,8 @@ bool_t __rpc_gss_se= t_error(int rpc_gss_e=0A>>=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0=A0=A0 = __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPCSEC_GSS_H *= /=0A>>=0A>> Modified: head/include/rpc/svc.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/= include/rpc/svc.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A= >> +++ head/include/rpc/svc.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 = (r240060)=0A>> @@ -65,6 +65,10 @@=0A>>=A0 =A0 * parameters, struct svc_req = * and SVCXPRT *, defined below.=0A>>=A0 =A0 */=0A>>=0A>> +#ifdef=A0=A0=A0 _= _cplusplus=0A>> +extern "C" {=0A>> +#endif=0A>> +=0A>>=A0 /*=0A>>=A0 =A0 *= =A0 =A0 =A0 Service control requests=0A>>=A0 =A0 */=0A>> @@ -467,6 +471,9 @= @ int __rpc_get_local_uid(SVCXPRT *_transp=0A>>=0A>>=A0 __END_DECLS=0A>>= =0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>>=0A>>=A0 /* fo= r backward compatibility */=0A>>=A0 #include =0A>>=0A>> Mod= ified: head/include/rpc/svc_soc.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/include/rpc/= svc_soc.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ h= ead/include/rpc/svc_soc.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r24= 0060)=0A>> @@ -49,6 +49,10 @@=0A>>=A0 =A0 * with TS-RPC=0A>>=A0 =A0 */=0A>>= =0A>> +#ifdef=A0=A0=A0 __cplusplus=0A>> +extern "C" {=0A>> +#endif=0A>> += =0A>>=A0 /*=0A>>=A0 =A0 *=A0 Approved way of getting address of caller=0A>= >=A0 =A0 */=0A>> @@ -113,4 +117,8 @@ __BEGIN_DECLS=0A>>=A0 extern SVCXPRT = *svcfd_create(int, u_int, u_int);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef=A0= =A0=A0 __cplusplus=0A>> +}=0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_SVC= _SOC_H */=0A>>=0A>> Modified: head/include/rpc/xdr.h=0A>> =3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> = --- head/include/rpc/xdr.h=A0=A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r2= 40059)=0A>> +++ head/include/rpc/xdr.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012= =A0=A0=A0 (r240060)=0A>> @@ -43,6 +43,10 @@=0A>>=A0 #define _RPC_XDR_H=0A>= >=A0 #include =0A>>=0A>> +#ifdef __cplusplus=0A>> +extern "C"= {=0A>> +#endif=0A>> +=0A>>=A0 /*=0A>>=A0 =A0 * XDR provides a conventiona= l way for converting between C data=0A>>=A0 =A0 * types and an external bit= -string representation.=A0 Library supplied=0A>> @@ -97,26 +101,26 @@ enum = xdr_op {=0A>>=A0 =A0 * an operations vector for the particular implementati= on (e.g. see xdr_mem.c),=0A>>=A0 =A0 * and two private fields for the use o= f the particular implementation.=0A>>=A0 =A0 */=0A>> -typedef struct __rpc_= xdr {=0A>> +typedef struct XDR {=0A>>=A0 =A0=A0=A0 enum xdr_op=A0=A0=A0 x_= op;=A0=A0=A0 =A0=A0=A0 /* operation; fast additional param */=0A>>=A0 =A0= =A0=A0 const struct xdr_ops {=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* get a long fr= om underlying stream */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_getlo= ng)(struct __rpc_xdr *, long *);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 = (*x_getlong)(struct XDR *, long *);=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* put a l= ong to " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_putlong)(struct _= _rpc_xdr *, const long *);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_pu= tlong)(struct XDR *, const long *);=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* get som= e bytes from " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_getbytes)(s= truct __rpc_xdr *, char *, u_int);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0= =A0 (*x_getbytes)(struct XDR *, char *, u_int);=0A>>=A0 =A0=A0=A0 =A0=A0= =A0 /* put some bytes to " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x= _putbytes)(struct __rpc_xdr *, const char *, u_int);=0A>> +=A0=A0=A0 =A0=A0= =A0 bool_t=A0=A0=A0 (*x_putbytes)(struct XDR *, const char *, u_int);=0A>>= =A0 =A0=A0=A0 =A0=A0=A0 /* returns bytes off from beginning */=0A>> -=A0= =A0=A0 =A0=A0=A0 u_int=A0=A0=A0 (*x_getpostn)(struct __rpc_xdr *);=0A>> += =A0=A0=A0 =A0=A0=A0 u_int=A0=A0=A0 (*x_getpostn)(struct XDR *);=0A>>=A0 = =A0=A0=A0 =A0=A0=A0 /* lets you reposition the stream */=0A>> -=A0=A0=A0 = =A0=A0=A0 bool_t=A0 (*x_setpostn)(struct __rpc_xdr *, u_int);=0A>> +=A0=A0= =A0 =A0=A0=A0 bool_t=A0 (*x_setpostn)(struct XDR *, u_int);=0A>>=A0 =A0=A0= =A0 =A0=A0=A0 /* buf quick ptr to buffered data */=0A>> -=A0=A0=A0 =A0=A0= =A0 int32_t *(*x_inline)(struct __rpc_xdr *, u_int);=0A>> +=A0=A0=A0 =A0=A0= =A0 int32_t *(*x_inline)(struct XDR *, u_int);=0A>>=A0 =A0=A0=A0 =A0=A0=A0= /* free privates of this xdr_stream */=0A>> -=A0=A0=A0 =A0=A0=A0 void=A0= =A0=A0 (*x_destroy)(struct __rpc_xdr *);=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t= =A0=A0=A0 (*x_control)(struct __rpc_xdr *, int, void *);=0A>> +=A0=A0=A0 = =A0=A0=A0 void=A0=A0=A0 (*x_destroy)(struct XDR *);=0A>> +=A0=A0=A0 =A0=A0= =A0 bool_t=A0=A0=A0 (*x_control)(struct XDR *, int, void *);=0A>>=A0 =A0= =A0=A0 } *x_ops;=0A>>=A0 =A0=A0=A0 char *=A0=A0=A0 =A0=A0=A0 x_public;=A0= =A0=A0 /* users' data */=0A>>=A0 =A0=A0=A0 void *=A0=A0=A0 =A0=A0=A0 x_pri= vate;=A0=A0=A0 /* pointer to private data */=0A>> @@ -366,4 +370,8 @@ exter= n bool_t xdrrec_eof(XDR *);=0A>>=A0 extern u_int xdrrec_readbytes(XDR *, c= addr_t, u_int);=0A>>=A0 __END_DECLS=0A>>=0A>> +#ifdef __cplusplus=0A>> +}= =0A>> +#endif=0A>> +=0A>>=A0 #endif /* !_RPC_XDR_H */=0A>>=0A>> Modified: = head/sys/rpc/rpc_com.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/sys/rpc/rpc_com.h=A0= =A0=A0 Sun Sep=A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ head/sys/rpc/= rpc_com.h=A0=A0=A0 Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r240060)=0A>> @@ -1= 14,8 +114,8 @@ extern int __rpc_sockisbound(struct sock=0A>>=A0 extern int= bindresvport(struct socket *so, struct sockaddr *sa);=0A>>=0A>>=A0 struct= xucred;=0A>> -struct __rpc_xdr;=0A>> -bool_t xdr_authunix_parms(struct __r= pc_xdr *xdrs, uint32_t *time, struct xucred *cred);=0A>> +struct XDR;=0A>> = +bool_t xdr_authunix_parms(struct XDR *xdrs, uint32_t *time, struct xucred = *cred);=0A>>=A0 #endif=0A>>=0A>>=A0 __END_DECLS=0A>>=0A>> Modified: head/= sys/rpc/xdr.h=0A>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A>> --- head/sys/rpc/xdr.h=A0=A0=A0 Sun Sep= =A0 2 18:54:51 2012=A0=A0=A0 (r240059)=0A>> +++ head/sys/rpc/xdr.h=A0=A0=A0= Sun Sep=A0 2 21:04:40 2012=A0=A0=A0 (r240060)=0A>> @@ -97,26 +97,26 @@ enu= m xdr_op {=0A>>=A0 =A0 * an operations vector for the particular implementa= tion (e.g. see xdr_mem.c),=0A>>=A0 =A0 * and two private fields for the use= of the particular implementation.=0A>>=A0 =A0 */=0A>> -typedef struct __rp= c_xdr {=0A>> +typedef struct XDR {=0A>>=A0 =A0=A0=A0 enum xdr_op=A0=A0=A0 = x_op;=A0=A0=A0 =A0=A0=A0 /* operation; fast additional param */=0A>>=A0 = =A0=A0=A0 const struct xdr_ops {=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* get a long= from underlying stream */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_ge= tlong)(struct __rpc_xdr *, long *);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0= =A0 (*x_getlong)(struct XDR *, long *);=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* put= a long to " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_putlong)(stru= ct __rpc_xdr *, const long *);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*= x_putlong)(struct XDR *, const long *);=0A>>=A0 =A0=A0=A0 =A0=A0=A0 /* get= some bytes from " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 (*x_getbyte= s)(struct __rpc_xdr *, char *, u_int);=0A>> +=A0=A0=A0 =A0=A0=A0 bool_t=A0= =A0=A0 (*x_getbytes)(struct XDR *, char *, u_int);=0A>>=A0 =A0=A0=A0 =A0= =A0=A0 /* put some bytes to " */=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t=A0=A0=A0 = (*x_putbytes)(struct __rpc_xdr *, const char *, u_int);=0A>> +=A0=A0=A0 =A0= =A0=A0 bool_t=A0=A0=A0 (*x_putbytes)(struct XDR *, const char *, u_int);=0A= >>=A0 =A0=A0=A0 =A0=A0=A0 /* returns bytes off from beginning */=0A>> -=A0= =A0=A0 =A0=A0=A0 u_int=A0=A0=A0 (*x_getpostn)(struct __rpc_xdr *);=0A>> += =A0=A0=A0 =A0=A0=A0 u_int=A0=A0=A0 (*x_getpostn)(struct XDR *);=0A>>=A0 = =A0=A0=A0 =A0=A0=A0 /* lets you reposition the stream */=0A>> -=A0=A0=A0 = =A0=A0=A0 bool_t=A0 (*x_setpostn)(struct __rpc_xdr *, u_int);=0A>> +=A0=A0= =A0 =A0=A0=A0 bool_t=A0 (*x_setpostn)(struct XDR *, u_int);=0A>>=A0 =A0=A0= =A0 =A0=A0=A0 /* buf quick ptr to buffered data */=0A>> -=A0=A0=A0 =A0=A0= =A0 int32_t *(*x_inline)(struct __rpc_xdr *, u_int);=0A>> +=A0=A0=A0 =A0=A0= =A0 int32_t *(*x_inline)(struct XDR *, u_int);=0A>>=A0 =A0=A0=A0 =A0=A0=A0= /* free privates of this xdr_stream */=0A>> -=A0=A0=A0 =A0=A0=A0 void=A0= =A0=A0 (*x_destroy)(struct __rpc_xdr *);=0A>> -=A0=A0=A0 =A0=A0=A0 bool_t= =A0=A0=A0 (*x_control)(struct __rpc_xdr *, int, void *);=0A>> +=A0=A0=A0 = =A0=A0=A0 void=A0=A0=A0 (*x_destroy)(struct XDR *);=0A>> +=A0=A0=A0 =A0=A0= =A0 bool_t=A0=A0=A0 (*x_control)(struct XDR *, int, void *);=0A>>=A0 =A0= =A0=A0 } *x_ops;=0A>>=A0 =A0=A0=A0 char *=A0=A0=A0 =A0=A0=A0 x_public;=A0= =A0=A0 /* users' data */=0A>>=A0 =A0=A0=A0 void *=A0=A0=A0 =A0=A0=A0 x_pri= vate;=A0=A0=A0 /* pointer to private data */=0A>=0A>Don't __BEGIN_DECLS and= __END_DECLS do exactly that? i.e. it looks like =0A>some of the #ifdef's y= ou added are redundant.=0A>=0A>=0A> From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 22:23:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E05321065670; Sun, 2 Sep 2012 22:23:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA7658FC1A; Sun, 2 Sep 2012 22:23:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q82MNOeO078030; Sun, 2 Sep 2012 22:23:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q82MNOQr078013; Sun, 2 Sep 2012 22:23:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209022223.q82MNOQr078013@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 2 Sep 2012 22:23: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: r240062 - head/include/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 02 Sep 2012 22:23:25 -0000 Author: pfg Date: Sun Sep 2 22:23:23 2012 New Revision: 240062 URL: http://svn.freebsd.org/changeset/base/240062 Log: Revert r240060: (Partial) __BEGIN_DECLS and __END_DECLS in cdefs.h take care of the __cplusplus mangling issues so most of the definitions were redundant. In the few places where they were not redundant we should use BSD style instead of the guards used upstream. Reported by: Yuri Pankov Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/include/rpc/clnt.h head/include/rpc/clnt_soc.h head/include/rpc/des_crypt.h head/include/rpc/nettype.h head/include/rpc/pmap_clnt.h head/include/rpc/pmap_rmt.h head/include/rpc/rpc_com.h head/include/rpc/rpc_msg.h head/include/rpc/rpcb_clnt.h head/include/rpc/rpcent.h head/include/rpc/rpcsec_gss.h head/include/rpc/svc.h head/include/rpc/svc_soc.h head/include/rpc/xdr.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/auth.h Sun Sep 2 22:23:23 2012 (r240062) @@ -51,10 +51,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - #define MAX_AUTH_BYTES 400 #define MAXNETNAMELEN 255 /* maximum length of network user's name */ @@ -370,8 +366,4 @@ __END_DECLS #define RPCSEC_GSS_KRB5I 390004 #define RPCSEC_GSS_KRB5P 390005 -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_AUTH_H */ Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/auth_unix.h Sun Sep 2 22:23:23 2012 (r240062) @@ -48,10 +48,6 @@ #define _RPC_AUTH_UNIX_H #include -#ifdef __cplusplus -extern "C" { -#endif - /* The machine name is part of a credential; it may not exceed 255 bytes */ #define MAX_MACHINE_NAME 255 @@ -85,8 +81,4 @@ struct short_hand_verf { struct opaque_auth new_cred; }; -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_AUTH_UNIX_H */ Modified: head/include/rpc/clnt.h ============================================================================== --- head/include/rpc/clnt.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/clnt.h Sun Sep 2 22:23:23 2012 (r240062) @@ -64,10 +64,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /* * Well-known IPV6 RPC broadcast address. */ @@ -555,10 +551,6 @@ extern enum clnt_stat rpc_broadcast_exp( const int, const char *); __END_DECLS -#ifdef __cplusplus -} -#endif - /* For backward compatibility */ #include Modified: head/include/rpc/clnt_soc.h ============================================================================== --- head/include/rpc/clnt_soc.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/clnt_soc.h Sun Sep 2 22:23:23 2012 (r240062) @@ -49,10 +49,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ /* @@ -107,8 +103,4 @@ extern CLIENT *clntudp_bufcreate(struct struct timeval, int *, u_int, u_int); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* _RPC_CLNT_SOC_H */ Modified: head/include/rpc/des_crypt.h ============================================================================== --- head/include/rpc/des_crypt.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/des_crypt.h Sun Sep 2 22:23:23 2012 (r240062) @@ -47,10 +47,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - #define DES_MAXDATA 8192 /* max bytes encrypted in one call */ #define DES_DIRMASK (1 << 0) #define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ @@ -107,8 +103,4 @@ __BEGIN_DECLS void des_setparity( char *); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* _DES_DES_CRYPT_H */ Modified: head/include/rpc/nettype.h ============================================================================== --- head/include/rpc/nettype.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/nettype.h Sun Sep 2 22:23:23 2012 (r240062) @@ -44,10 +44,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - #define _RPC_NONE 0 #define _RPC_NETPATH 1 #define _RPC_VISIBLE 2 @@ -65,8 +61,4 @@ extern struct netconfig *__rpc_getconf(v extern struct netconfig *__rpc_getconfip(const char *); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_NETTYPE_H */ Modified: head/include/rpc/pmap_clnt.h ============================================================================== --- head/include/rpc/pmap_clnt.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/pmap_clnt.h Sun Sep 2 22:23:23 2012 (r240062) @@ -66,10 +66,6 @@ #define _RPC_PMAP_CLNT_H_ #include -#ifdef __cplusplus -extern "C" { -#endif - __BEGIN_DECLS extern bool_t pmap_set(u_long, u_long, int, int); extern bool_t pmap_unset(u_long, u_long); @@ -87,8 +83,4 @@ extern u_short pmap_getport(struct sock u_long, u_long, u_int); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_PMAP_CLNT_H_ */ Modified: head/include/rpc/pmap_rmt.h ============================================================================== --- head/include/rpc/pmap_rmt.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/pmap_rmt.h Sun Sep 2 22:23:23 2012 (r240062) @@ -44,10 +44,6 @@ #define _RPC_PMAP_RMT_H #include -#ifdef __cplusplus -extern "C" { -#endif - struct rmtcallargs { u_long prog, vers, proc, arglen; caddr_t args_ptr; @@ -66,8 +62,4 @@ extern bool_t xdr_rmtcall_args(XDR *, st extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_PMAP_RMT_H */ Modified: head/include/rpc/rpc_com.h ============================================================================== --- head/include/rpc/rpc_com.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/rpc_com.h Sun Sep 2 22:23:23 2012 (r240062) @@ -42,13 +42,9 @@ #ifndef _RPC_RPCCOM_H #define _RPC_RPCCOM_H -/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ - #include -#ifdef __cplusplus -extern "C" { -#endif +/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ /* * The max size of the transport, if the size cannot be determined @@ -84,8 +80,4 @@ char *_get_next_token(char *, int); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* _RPC_RPCCOM_H */ Modified: head/include/rpc/rpc_msg.h ============================================================================== --- head/include/rpc/rpc_msg.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/rpc_msg.h Sun Sep 2 22:23:23 2012 (r240062) @@ -43,10 +43,6 @@ #ifndef _RPC_RPC_MSG_H #define _RPC_RPC_MSG_H -#ifdef __cplusplus -extern "C" { -#endif - #define RPC_MSG_VERSION ((u_int32_t) 2) #define RPC_SERVICE_PORT ((u_short) 2048) @@ -215,8 +211,4 @@ extern bool_t xdr_rejected_reply(XDR *, extern void _seterr_reply(struct rpc_msg *, struct rpc_err *); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_RPC_MSG_H */ Modified: head/include/rpc/rpcb_clnt.h ============================================================================== --- head/include/rpc/rpcb_clnt.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/rpcb_clnt.h Sun Sep 2 22:23:23 2012 (r240062) @@ -61,10 +61,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - __BEGIN_DECLS extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, const struct netconfig *, const struct netbuf *); @@ -86,8 +82,4 @@ extern char *rpcb_taddr2uaddr(struct net extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_RPCB_CLNT_H */ Modified: head/include/rpc/rpcent.h ============================================================================== --- head/include/rpc/rpcent.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/rpcent.h Sun Sep 2 22:23:23 2012 (r240062) @@ -45,9 +45,6 @@ /* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */ /* @(#)rpcent.h 1.1 88/12/06 SMI */ -#ifdef __cplusplus -extern "C" { -#endif struct rpcent { char *r_name; /* name of server for this rpc program */ @@ -67,8 +64,4 @@ extern void setrpcent(int); extern void endrpcent(void); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_CENT_H */ Modified: head/include/rpc/rpcsec_gss.h ============================================================================== --- head/include/rpc/rpcsec_gss.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/rpcsec_gss.h Sun Sep 2 22:23:23 2012 (r240062) @@ -29,10 +29,6 @@ #ifndef _RPCSEC_GSS_H #define _RPCSEC_GSS_H -#ifdef __cplusplus -extern "C" { -#endif - #include #ifndef MAX_GSS_MECH @@ -180,8 +176,4 @@ bool_t __rpc_gss_set_error(int rpc_gss_e __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPCSEC_GSS_H */ Modified: head/include/rpc/svc.h ============================================================================== --- head/include/rpc/svc.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/svc.h Sun Sep 2 22:23:23 2012 (r240062) @@ -65,10 +65,6 @@ * parameters, struct svc_req * and SVCXPRT *, defined below. */ -#ifdef __cplusplus -extern "C" { -#endif - /* * Service control requests */ @@ -471,9 +467,6 @@ int __rpc_get_local_uid(SVCXPRT *_transp __END_DECLS -#ifdef __cplusplus -} -#endif /* for backward compatibility */ #include Modified: head/include/rpc/svc_soc.h ============================================================================== --- head/include/rpc/svc_soc.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/svc_soc.h Sun Sep 2 22:23:23 2012 (r240062) @@ -49,10 +49,6 @@ * with TS-RPC */ -#ifdef __cplusplus -extern "C" { -#endif - /* * Approved way of getting address of caller */ @@ -117,8 +113,4 @@ __BEGIN_DECLS extern SVCXPRT *svcfd_create(int, u_int, u_int); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_SVC_SOC_H */ Modified: head/include/rpc/xdr.h ============================================================================== --- head/include/rpc/xdr.h Sun Sep 2 21:44:24 2012 (r240061) +++ head/include/rpc/xdr.h Sun Sep 2 22:23:23 2012 (r240062) @@ -43,10 +43,6 @@ #define _RPC_XDR_H #include -#ifdef __cplusplus -extern "C" { -#endif - /* * XDR provides a conventional way for converting between C data * types and an external bit-string representation. Library supplied @@ -370,8 +366,4 @@ extern bool_t xdrrec_eof(XDR *); extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int); __END_DECLS -#ifdef __cplusplus -} -#endif - #endif /* !_RPC_XDR_H */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 00:05:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32E65106564A; Mon, 3 Sep 2012 00:05:22 +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 1D4178FC08; Mon, 3 Sep 2012 00:05:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8305Lj7089998; Mon, 3 Sep 2012 00:05:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8305LTo089995; Mon, 3 Sep 2012 00:05:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209030005.q8305LTo089995@svn.freebsd.org> From: Glen Barber Date: Mon, 3 Sep 2012 00:05: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: r240063 - in head/cddl/contrib/opensolaris/cmd: zfs zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 00:05:22 -0000 Author: gjb (doc,ports committer) Date: Mon Sep 3 00:05:21 2012 New Revision: 240063 URL: http://svn.freebsd.org/changeset/base/240063 Log: Add myself to copyright sections, per CDDL license. Requested by: mm Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Sep 2 22:23:23 2012 (r240062) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Sep 3 00:05:21 2012 (r240063) @@ -22,6 +22,7 @@ .\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek +.\" Copyright (c) 2012, Glen Barber .\" .\" $FreeBSD$ .\" Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Sep 2 22:23:23 2012 (r240062) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Sep 3 00:05:21 2012 (r240063) @@ -21,6 +21,7 @@ .\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Justin T. Gibbs .\" Copyright (c) 2012 by Delphix. All Rights Reserved. +.\" Copyright (c) 2012, Glen Barber .\" .\" $FreeBSD$ .\" From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 02:32:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F419106564A; Mon, 3 Sep 2012 02:32:01 +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 6AD9B8FC18; Mon, 3 Sep 2012 02:32:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q832W1cb005868; Mon, 3 Sep 2012 02:32:01 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q832W13t005866; Mon, 3 Sep 2012 02:32:01 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209030232.q832W13t005866@svn.freebsd.org> From: Alan Cox Date: Mon, 3 Sep 2012 02:32: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: r240065 - head/sys/dev/gxemul/disk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 02:32:01 -0000 Author: alc Date: Mon Sep 3 02:32:00 2012 New Revision: 240065 URL: http://svn.freebsd.org/changeset/base/240065 Log: Correct an error in gxemul_disk_write(). It was issuing the command to read from rather than write to the emulated disk. Reviewed by: jmallett Modified: head/sys/dev/gxemul/disk/gxemul_disk.c Modified: head/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- head/sys/dev/gxemul/disk/gxemul_disk.c Mon Sep 3 02:25:20 2012 (r240064) +++ head/sys/dev/gxemul/disk/gxemul_disk.c Mon Sep 3 02:32:00 2012 (r240065) @@ -286,7 +286,7 @@ gxemul_disk_write(unsigned diskid, const dst = GXEMUL_DISK_DEV_FUNCTION(GXEMUL_DISK_DEV_BLOCK); memcpy((void *)(uintptr_t)dst, buf, GXEMUL_DISK_DEV_BLOCKSIZE); - GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_START, GXEMUL_DISK_DEV_START_READ); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_START, GXEMUL_DISK_DEV_START_WRITE); switch (GXEMUL_DISK_DEV_READ(GXEMUL_DISK_DEV_STATUS)) { case GXEMUL_DISK_DEV_STATUS_FAILURE: return (EIO); From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 07:02:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFC4F1065691 for ; Mon, 3 Sep 2012 07:02:39 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 24A588FC1D for ; Mon, 3 Sep 2012 07:02:38 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so2826421lbb.13 for ; Mon, 03 Sep 2012 00:02:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=oX0L5tNG7IAzgeAIJkL2J9me8i7Wn1CkYVegx6TxtBc=; b=OJSniWCKuZ6vi12NnseX232aYwBvB7g3FGOPupXup96QSFPUl98c/n2p8hMleSukI+ tHlVI8P6EpDq2+bVn+LcCCNF1icnOhwlFd2cGkgzMCHAmoxXNxpG01dewI+TKXOHOgqc /sjhfYkPdbAyhGKdU4LpJiIM9SQ+FaLzR9lKwGnfYMuopDS8fLTmK+pAQgBk4ZeGo513 zvbXqWt04yyV5AWZz/2ISE1rofWq8NqCmK+AqRmHRfewLPOlGH/89I5RiVRXx+Wu5MIO 4o1/SJtFvT8qzh+mRA9mwylP2K2842N4kyvnQZeu+CGSsP/bGyou73PwYptKzz/q4hu3 BM7Q== Received: by 10.112.103.167 with SMTP id fx7mr2508969lbb.44.1346655757724; Mon, 03 Sep 2012 00:02:37 -0700 (PDT) Received: from zont-osx.local (ppp95-165-143-86.pppoe.spdop.ru. [95.165.143.86]) by mx.google.com with ESMTPS id hg4sm12659134lab.11.2012.09.03.00.02.36 (version=SSLv3 cipher=OTHER); Mon, 03 Sep 2012 00:02:36 -0700 (PDT) Sender: Andrey Zonov Message-ID: <50445609.8070902@FreeBSD.org> Date: Mon, 03 Sep 2012 11:02:33 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Garrett Cooper References: <201209021739.q82Hd3CE042578@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1DE189EBF5C3297B1F032688" X-Gm-Message-State: ALoCoQkb9ERSqwbgqNQrNQtFAIuRDZ8tPhuCyJ7i+o0xKqyrpNgGFRuYvnkoLyViWamZhwWefy2n Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240026 - 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: Mon, 03 Sep 2012 07:02:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1DE189EBF5C3297B1F032688 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 9/3/12 1:20 AM, Garrett Cooper wrote: > On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper wro= te: >> On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov wrote= : >>> Author: zont >>> Date: Sun Sep 2 17:39:02 2012 >>> New Revision: 240026 >>> URL: http://svn.freebsd.org/changeset/base/240026 >>> >>> Log: >>> - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern= =2Emaxssiz >>> and kern.sgrowsiz sysctls writable. >>> >>> Approved by: kib (mentor) >>> >>> Modified: >>> head/sys/kern/subr_param.c >=20 > ... >=20 >> >> Please add some basic sanity checking to init_param1 -- there's >> absolutely nothing preventing me from passing in values <=3D 0 or othe= r >=20 > Correction: values =3D=3D 0 with little effort (missed the part where i= t > was using TUNABLE_ULONG_FETCH). You could get negative values though > if you overflow the value passed in -- in part because the getenv* > functions in kern_environment.c don't check for/handle overflow > gracefully .. I had a patch out for this a while ago that never made > it in. >=20 >> non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values.= >> Thanks, >> -Garrett I thought of sanity checking here, but there weren't for tunables and I did't want to add any "magic numbers" in this code. I don't think that we should check for multiple of PAGE_SIZE, may be only for sgrowsiz and even not checking, just rounding up. If you have those "magic numbers" I would love to add it. --=20 Andrey Zonov --------------enig1DE189EBF5C3297B1F032688 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQRFYLAAoJEBWLemxX/CvT6WAH/RjhZHIPQpHNIMa0hu7i1K6e 5DVNt1MmnBEomlRDYXHKIrYrAienvaoqyyXKjYVVGm3Vmw3Hs6rwNEg+aP2SbF1U mTDqHJdViWoil1K2EjAGMtnRleBUkDe+XyjHKLgyf+gu60br1O09ND77GdVxj0nh cP8SenPUoQs/V+4DEn8Sn9oZDdq3LZQgntJGaxPUs1dfGrDBCdsk4yWUE0blD+f+ Du3kkKUwBh9iJ0cLX46hgYcRhVNBCxejjsPUqpJxbW0QBML3FEejbXtx0bUlETpu pk27Y837KBQETt9ODja5rcF1fw1kGaSLnmkPBr30qaZSYf/wdrRIz2OYHrGk81E= =eRXG -----END PGP SIGNATURE----- --------------enig1DE189EBF5C3297B1F032688-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 07:18:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A762106564A; Mon, 3 Sep 2012 07:18:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1228FC12; Mon, 3 Sep 2012 07:18:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q837IPLS040723; Mon, 3 Sep 2012 07:18:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q837IPuh040721; Mon, 3 Sep 2012 07:18:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209030718.q837IPuh040721@svn.freebsd.org> From: Dimitry Andric Date: Mon, 3 Sep 2012 07:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240066 - stable/9/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 07:18:25 -0000 Author: dim Date: Mon Sep 3 07:18:24 2012 New Revision: 240066 URL: http://svn.freebsd.org/changeset/base/240066 Log: MFC r239715: Add libc++ and libcxxrt related files to OptionalObsoleteFiles.inc. Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Sep 3 02:32:00 2012 (r240065) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Mon Sep 3 07:18:24 2012 (r240066) @@ -2695,6 +2695,121 @@ OLD_FILES+=usr/share/man/man8/verify_krb # to be filled in #.endif +.if ${MK_LIBCPLUSPLUS} == no +OLD_LIBS+=lib/libcxxrt.so.1 +OLD_FILES+=usr/lib/libc++.a +OLD_FILES+=usr/lib/libc++_p.a +OLD_FILES+=usr/lib/libc++.so +OLD_LIBS+=usr/lib/libc++.so.1 +OLD_FILES+=usr/lib/libcxxrt.a +OLD_FILES+=usr/lib/libcxxrt.so +OLD_FILES+=usr/lib/libcxxrt_p.a +OLD_FILES+=usr/include/c++/v1/__bit_reference +OLD_FILES+=usr/include/c++/v1/__config +OLD_FILES+=usr/include/c++/v1/__debug +OLD_FILES+=usr/include/c++/v1/__functional_03 +OLD_FILES+=usr/include/c++/v1/__functional_base +OLD_FILES+=usr/include/c++/v1/__functional_base_03 +OLD_FILES+=usr/include/c++/v1/__hash_table +OLD_FILES+=usr/include/c++/v1/__locale +OLD_FILES+=usr/include/c++/v1/__mutex_base +OLD_FILES+=usr/include/c++/v1/__split_buffer +OLD_FILES+=usr/include/c++/v1/__sso_allocator +OLD_FILES+=usr/include/c++/v1/__std_stream +OLD_FILES+=usr/include/c++/v1/__tree +OLD_FILES+=usr/include/c++/v1/__tuple +OLD_FILES+=usr/include/c++/v1/__tuple_03 +OLD_FILES+=usr/include/c++/v1/__undef_min_max +OLD_FILES+=usr/include/c++/v1/algorithm +OLD_FILES+=usr/include/c++/v1/array +OLD_FILES+=usr/include/c++/v1/atomic +OLD_FILES+=usr/include/c++/v1/bitset +OLD_FILES+=usr/include/c++/v1/cassert +OLD_FILES+=usr/include/c++/v1/ccomplex +OLD_FILES+=usr/include/c++/v1/cctype +OLD_FILES+=usr/include/c++/v1/cerrno +OLD_FILES+=usr/include/c++/v1/cfenv +OLD_FILES+=usr/include/c++/v1/cfloat +OLD_FILES+=usr/include/c++/v1/chrono +OLD_FILES+=usr/include/c++/v1/cinttypes +OLD_FILES+=usr/include/c++/v1/ciso646 +OLD_FILES+=usr/include/c++/v1/climits +OLD_FILES+=usr/include/c++/v1/clocale +OLD_FILES+=usr/include/c++/v1/cmath +OLD_FILES+=usr/include/c++/v1/codecvt +OLD_FILES+=usr/include/c++/v1/complex +OLD_FILES+=usr/include/c++/v1/complex.h +OLD_FILES+=usr/include/c++/v1/condition_variable +OLD_FILES+=usr/include/c++/v1/csetjmp +OLD_FILES+=usr/include/c++/v1/csignal +OLD_FILES+=usr/include/c++/v1/cstdarg +OLD_FILES+=usr/include/c++/v1/cstdbool +OLD_FILES+=usr/include/c++/v1/cstddef +OLD_FILES+=usr/include/c++/v1/cstdint +OLD_FILES+=usr/include/c++/v1/cstdio +OLD_FILES+=usr/include/c++/v1/cstdlib +OLD_FILES+=usr/include/c++/v1/cstring +OLD_FILES+=usr/include/c++/v1/ctgmath +OLD_FILES+=usr/include/c++/v1/ctime +OLD_FILES+=usr/include/c++/v1/cwchar +OLD_FILES+=usr/include/c++/v1/cwctype +OLD_FILES+=usr/include/c++/v1/cxxabi.h +OLD_FILES+=usr/include/c++/v1/deque +OLD_FILES+=usr/include/c++/v1/exception +OLD_FILES+=usr/include/c++/v1/ext/__hash +OLD_FILES+=usr/include/c++/v1/ext/hash_map +OLD_FILES+=usr/include/c++/v1/ext/hash_set +OLD_FILES+=usr/include/c++/v1/forward_list +OLD_FILES+=usr/include/c++/v1/fstream +OLD_FILES+=usr/include/c++/v1/functional +OLD_FILES+=usr/include/c++/v1/future +OLD_FILES+=usr/include/c++/v1/initializer_list +OLD_FILES+=usr/include/c++/v1/iomanip +OLD_FILES+=usr/include/c++/v1/ios +OLD_FILES+=usr/include/c++/v1/iosfwd +OLD_FILES+=usr/include/c++/v1/iostream +OLD_FILES+=usr/include/c++/v1/istream +OLD_FILES+=usr/include/c++/v1/iterator +OLD_FILES+=usr/include/c++/v1/limits +OLD_FILES+=usr/include/c++/v1/list +OLD_FILES+=usr/include/c++/v1/locale +OLD_FILES+=usr/include/c++/v1/map +OLD_FILES+=usr/include/c++/v1/memory +OLD_FILES+=usr/include/c++/v1/mutex +OLD_FILES+=usr/include/c++/v1/new +OLD_FILES+=usr/include/c++/v1/numeric +OLD_FILES+=usr/include/c++/v1/ostream +OLD_FILES+=usr/include/c++/v1/queue +OLD_FILES+=usr/include/c++/v1/random +OLD_FILES+=usr/include/c++/v1/ratio +OLD_FILES+=usr/include/c++/v1/regex +OLD_FILES+=usr/include/c++/v1/scoped_allocator +OLD_FILES+=usr/include/c++/v1/set +OLD_FILES+=usr/include/c++/v1/sstream +OLD_FILES+=usr/include/c++/v1/stack +OLD_FILES+=usr/include/c++/v1/stdexcept +OLD_FILES+=usr/include/c++/v1/streambuf +OLD_FILES+=usr/include/c++/v1/string +OLD_FILES+=usr/include/c++/v1/strstream +OLD_FILES+=usr/include/c++/v1/system_error +OLD_FILES+=usr/include/c++/v1/tgmath.h +OLD_FILES+=usr/include/c++/v1/thread +OLD_FILES+=usr/include/c++/v1/tuple +OLD_FILES+=usr/include/c++/v1/type_traits +OLD_FILES+=usr/include/c++/v1/typeindex +OLD_FILES+=usr/include/c++/v1/typeinfo +OLD_FILES+=usr/include/c++/v1/unordered_map +OLD_FILES+=usr/include/c++/v1/unordered_set +OLD_FILES+=usr/include/c++/v1/unwind-arm.h +OLD_FILES+=usr/include/c++/v1/unwind-itanium.h +OLD_FILES+=usr/include/c++/v1/unwind.h +OLD_FILES+=usr/include/c++/v1/utility +OLD_FILES+=usr/include/c++/v1/valarray +OLD_FILES+=usr/include/c++/v1/vector +OLD_DIRS+=usr/include/c++/v1/ext +OLD_DIRS+=usr/include/c++/v1 +.endif + #.if ${MK_LIBTHR} == no # to be filled in #.endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 07:31:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52615106566C; Mon, 3 Sep 2012 07:31:41 +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 C0D7B8FC08; Mon, 3 Sep 2012 07:31:40 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q837VjUw029667; Mon, 3 Sep 2012 10:31:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q837VX7N031076; Mon, 3 Sep 2012 10:31:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q837VXcD031075; Mon, 3 Sep 2012 10:31:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Sep 2012 10:31:33 +0300 From: Konstantin Belousov To: "Pedro F. Giffuni" Message-ID: <20120903073133.GB33100@deviant.kiev.zoral.com.ua> References: <201209022104.q82L4eru068961@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RzVoCur9CYlE2OzC" Content-Disposition: inline In-Reply-To: <201209022104.q82L4eru068961@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 07:31:41 -0000 --RzVoCur9CYlE2OzC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 02, 2012 at 09:04:40PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Sep 2 21:04:40 2012 > New Revision: 240060 > URL: http://svn.freebsd.org/changeset/base/240060 >=20 > Log: > Fix RPC headers for C++ > =20 > C++ mangling will cause trouble with variables like __rpc_xdr > in xdr.h so rename this to XDR. Which troubles ? Although not very useful due to many other namespace pollution problems in the rpc headers, __rpc_xdr is in the implementation-reserved namespace, while XDR is not. --RzVoCur9CYlE2OzC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBEXNUACgkQC3+MBN1Mb4iMjwCfag464pP60T/2LuGzyTG2XEIU T8oAn0yq4d7OKnirD+dzHyO5q/TKPUz1 =e34s -----END PGP SIGNATURE----- --RzVoCur9CYlE2OzC-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 08:52:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9417E106564A; Mon, 3 Sep 2012 08:52:06 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 656258FC1B; Mon, 3 Sep 2012 08:52:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q838q6Z5053407; Mon, 3 Sep 2012 08:52:06 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q838q6lC053405; Mon, 3 Sep 2012 08:52:06 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201209030852.q838q6lC053405@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 3 Sep 2012 08:52: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: r240067 - 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: Mon, 03 Sep 2012 08:52:06 -0000 Author: ray Date: Mon Sep 3 08:52:05 2012 New Revision: 240067 URL: http://svn.freebsd.org/changeset/base/240067 Log: Add kern.hintmode sysctl variable to show current state of hints: 0 - loader hints in environment only; 1 - static hints only 2 - fallback mode (Dynamic KENV with fallback to kernel environment) Add kern.hintmode write handler, accept only value 2. That will switch static KENV to dynamic. So it will be possible to change device hints. Approved by: adrian (mentor) Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Mon Sep 3 07:18:24 2012 (r240066) +++ head/sys/kern/subr_hints.c Mon Sep 3 08:52:05 2012 (r240067) @@ -29,8 +29,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #include /* @@ -42,6 +44,81 @@ static int use_kenv; static char *hintp; /* + * Define kern.hintmode sysctl, which only accept value 2, that cause to + * switch from Static KENV mode to Dynamic KENV. So systems that have hints + * compiled into kernel will be able to see/modify KENV (and hints too). + */ + +static int +sysctl_hintmode(SYSCTL_HANDLER_ARGS) +{ + int error, i, from_kenv, value, eqidx; + const char *cp; + char *line, *eq; + + from_kenv = 0; + cp = kern_envp; + value = hintmode; + + /* Fetch candidate for new hintmode value */ + error = sysctl_handle_int(oidp, &value, 0, req); + if (error || !req->newptr) + return (error); + + if (value != 2) + /* Only accept swithing to hintmode 2 */ + return (EINVAL); + + /* Migrate from static to dynamic hints */ + switch (hintmode) { + case 0: + if (dynamic_kenv) + /* Already here */ + hintmode = value; /* XXX: Need we switch or not ? */ + return (0); + from_kenv = 1; + cp = kern_envp; + break; + case 1: + cp = static_hints; + break; + case 2: + /* Nothing to do, hintmode already 2 */ + return (0); + } + + while (cp) { + i = strlen(cp); + if (i == 0) + break; + if (from_kenv) { + if (strncmp(cp, "hint.", 5) != 0) + /* kenv can have not only hints */ + continue; + } + eq = strchr(cp, '='); + if (!eq) + /* Bad hint value */ + continue; + eqidx = eq - cp; + + line = malloc(i+1, M_TEMP, M_WAITOK); + strcpy(line, cp); + line[eqidx] = '\0'; + setenv(line, line + eqidx + 1); + free(line, M_TEMP); + cp += i + 1; + } + + hintmode = value; + use_kenv = 1; + return (0); +} + +SYSCTL_PROC(_kern, OID_AUTO, hintmode, CTLTYPE_INT|CTLFLAG_RW, + &hintmode, 0, sysctl_hintmode, "I", "Get/set current hintmode"); + +/* * Evil wildcarding resource string lookup. * This walks the supplied env string table and returns a match. * The start point can be remembered for incremental searches. From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:05:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 545411065673; Mon, 3 Sep 2012 09:05:14 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1120F8FC16; Mon, 3 Sep 2012 09:05:13 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so7690202pbb.13 for ; Mon, 03 Sep 2012 02:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=3cSlDRen1/L+5dF+Ed2uRAci+Rz5/7ZWHYXBjSO0KSI=; b=SP0JpPA9upyRNft3GHp+2BDqqdjT/ZjNLlI8RuyRCvonqqmXJHnNHj+rhxzpJZZFbR vfevFjJZCNnRuWUzCvsxnU+Ibnn2U76ezVgTwlzJLSingGZhUvgsATJFoqmyKi/wFyGs HRQSzTTa4kz/9WH652pXT1iDk+YqmDDIPpQIMy0y2s4Bvl/+bvUuR87ZRt4B5/6qzlg8 uo2EgziNlqvO3tbRlL8RSwUPbGUI35ol+GoaTFu73wUFyYh/QvQZ9PwaJh1kBmt1DFfd xUMk+aYwLIHJG5JVg0xXIJn64TRygkvNOKCKd4bnf/B/7AUxvBpG1RxvYXCJFrK2IYPG vKpw== Received: by 10.66.74.3 with SMTP id p3mr32539115pav.49.1346663113455; Mon, 03 Sep 2012 02:05:13 -0700 (PDT) Received: from fuji-wireless.local (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id gf8sm9505941pbc.52.2012.09.03.02.05.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 02:05:12 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <201209030852.q838q6lC053405@svn.freebsd.org> Date: Mon, 3 Sep 2012 02:05:15 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201209030852.q838q6lC053405@svn.freebsd.org> To: Aleksandr Rybalko X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 09:05:14 -0000 On Sep 3, 2012, at 1:52 AM, Aleksandr Rybalko wrote: > Author: ray > Date: Mon Sep 3 08:52:05 2012 > New Revision: 240067 > URL: http://svn.freebsd.org/changeset/base/240067 > > Log: > Add kern.hintmode sysctl variable to show current state of hints: > 0 - loader hints in environment only; > 1 - static hints only > 2 - fallback mode (Dynamic KENV with fallback to kernel environment) > Add kern.hintmode write handler, accept only value 2. That will switch > static KENV to dynamic. So it will be possible to change device hints. ... > + /* Migrate from static to dynamic hints */ > + switch (hintmode) { > + case 0: > + if (dynamic_kenv) > + /* Already here */ > + hintmode = value; /* XXX: Need we switch or not ? */ > + return (0); ^^^^ typo (missing braces)? ^^^^ Also, don't you need extra glue for jails? -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:21:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8692106566B; Mon, 3 Sep 2012 09:21:55 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 900DC8FC19; Mon, 3 Sep 2012 09:21:55 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) by smtp.dlink.ua (Postfix) with SMTP id 705EDC4935; Mon, 3 Sep 2012 12:21:54 +0300 (EEST) Date: Mon, 3 Sep 2012 12:23:52 +0300 From: Aleksandr Rybalko To: Garrett Cooper Message-Id: <20120903122352.951b4253.ray@freebsd.org> In-Reply-To: References: <201209030852.q838q6lC053405@svn.freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 09:21:56 -0000 On Mon, 3 Sep 2012 02:05:15 -0700 Garrett Cooper wrote: >> On Sep 3, 2012, at 1:52 AM, Aleksandr Rybalko wrote: >> >> > Author: ray >> > Date: Mon Sep 3 08:52:05 2012 >> > New Revision: 240067 >> > URL: http://svn.freebsd.org/changeset/base/240067 >> > >> > Log: >> > Add kern.hintmode sysctl variable to show current state of hints: >> > 0 - loader hints in environment only; >> > 1 - static hints only >> > 2 - fallback mode (Dynamic KENV with fallback to kernel >> > environment) Add kern.hintmode write handler, accept only value 2. >> > That will switch static KENV to dynamic. So it will be possible to >> > change device hints. >> >> ... >> >> > + /* Migrate from static to dynamic hints */ >> > + switch (hintmode) { >> > + case 0: >> > + if (dynamic_kenv) >> > + /* Already here */ >> > + hintmode = value; /* XXX: Need we switch >> > or not ? */ >> > + return (0); >> >> ^^^^ typo (missing braces)? ^^^^ Ohhh, yeah, testing now. Thank you! >> >> Also, don't you need extra glue for jails? Why, jails uses separate hints/kenv? >> >> -Garrett Thanks. -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:26:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75121065675; Mon, 3 Sep 2012 09:26:56 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7A898FC15; Mon, 3 Sep 2012 09:26:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q839Quxn057759; Mon, 3 Sep 2012 09:26:56 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q839Qut7057757; Mon, 3 Sep 2012 09:26:56 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209030926.q839Qut7057757@svn.freebsd.org> From: Andrey Zonov Date: Mon, 3 Sep 2012 09:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240068 - 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: Mon, 03 Sep 2012 09:26:57 -0000 Author: zont Date: Mon Sep 3 09:26:56 2012 New Revision: 240068 URL: http://svn.freebsd.org/changeset/base/240068 Log: - Mark some sysctls with CTLFLAG_TUN flag instead of CTLFLAG_RDTUN. Pointed out by: avg Approved by: kib (mentor) MFC after: 1 week Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Mon Sep 3 08:52:05 2012 (r240067) +++ head/sys/kern/subr_param.c Mon Sep 3 09:26:56 2012 (r240068) @@ -119,18 +119,18 @@ SYSCTL_LONG(_kern, OID_AUTO, maxswzone, "Maximum memory for swap metadata"); SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, &maxbcache, 0, "Maximum value of vfs.maxbufspace"); -SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxtsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RW | CTLFLAG_TUN, &maxtsiz, 0, "Maximum text size"); -SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dfldsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RW | CTLFLAG_TUN, &dfldsiz, 0, "Initial data size limit"); -SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxdsiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RW | CTLFLAG_TUN, &maxdsiz, 0, "Maximum data size"); -SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dflssiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RW | CTLFLAG_TUN, &dflssiz, 0, "Initial stack size limit"); -SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxssiz, 0, +SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RW | CTLFLAG_TUN, &maxssiz, 0, "Maximum stack size"); -SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &sgrowsiz, - 0, "Amount to grow stack on a stack fault"); +SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RW | CTLFLAG_TUN, &sgrowsiz, 0, + "Amount to grow stack on a stack fault"); SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, NULL, 0, sysctl_kern_vm_guest, "A", "Virtual machine guest detected? (none|generic|xen)"); From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:32:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C1021065675 for ; Mon, 3 Sep 2012 09:32:15 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD888FC12 for ; Mon, 3 Sep 2012 09:32:14 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so2917892lbb.13 for ; Mon, 03 Sep 2012 02:32:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=of/oc5y1FVArsHRTW2NqcTYhHWkALlddvkfxRuFWIZ0=; b=MGaVqPV8A7ovNQ2XhTyIxIieIdNAjpybzdzn4JemytL0czU4Y08MDkdD6SM8gDOno2 hdBGGr9o6Ldaw2Ec1ElcOdOikYZB/RL7B095BM1gjtl9bwXMjx8tLy4SPry6qGF8OZ5X U1rXtLE17bQroyVd0NwPwXg/XRJVhY5vqUYouUGiEYsGLGXR9PNWI6xAQteCxLYrQvzU l146XqaA5yYmzfNsW35IkAZQaqhUKRRbwPYmC/kemj2liAjj0+axEBV/ZkcOwQbEMy2e LkSv/atUrmklgbz800zJ2cxrNY67H3nRoZ1BlwFYqJYxvMVHOL+2gESFhCGcOsAKWJ2p M8PA== Received: by 10.112.99.37 with SMTP id en5mr5285841lbb.25.1346664733538; Mon, 03 Sep 2012 02:32:13 -0700 (PDT) Received: from dhcp170-234-red.yandex.net (dhcp170-234-red.yandex.net. [95.108.170.234]) by mx.google.com with ESMTPS id lv13sm12998592lab.8.2012.09.03.02.32.12 (version=SSLv3 cipher=OTHER); Mon, 03 Sep 2012 02:32:12 -0700 (PDT) Sender: Andrey Zonov Message-ID: <50447918.9070601@FreeBSD.org> Date: Mon, 03 Sep 2012 13:32:08 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Andriy Gapon References: <201209021739.q82Hd3CE042578@svn.freebsd.org> <5043AD9C.1060508@FreeBSD.org> In-Reply-To: <5043AD9C.1060508@FreeBSD.org> X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig52BDC908A4C7A32F13EF3DB8" X-Gm-Message-State: ALoCoQmD/lKIGWEj1ZEpTxvX0/Vt2n2V+nv0Xnyov459bvzKRmp4K6Ty81mkCPtbV7b51n4/YhtA Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r240026 - 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: Mon, 03 Sep 2012 09:32:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig52BDC908A4C7A32F13EF3DB8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 9/2/12 11:03 PM, Andriy Gapon wrote: > on 02/09/2012 20:39 Andrey Zonov said the following: >> CTLFLAG_RDTUN | CTLFLAG_RW >=20 > This combination looks like nonsense to me (because of "RD"). >=20 > CTLFLAG_RDTUN Advisory flag that a system tunable also exists for th= is > variable; however, the run-time variable is read-only.= >=20 > Probably you meant CTLFLAG_RW | CTLFLAG_TUN >=20 Yes, thanks for pointing that out. --=20 Andrey Zonov --------------enig52BDC908A4C7A32F13EF3DB8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQRHkbAAoJEBWLemxX/CvTq+gH/0oUyW17t32sFqCm0yQVfKMl FhDFJthictnFyncCwpRXY6BuL9z9BSHKQlih1xXaBSC5QN809rO+nSMeLOg27fJe TThCRcw6zDw6Jd6vr86Ms2NvGOQn7DquHei08gmpMfmCNFFCYB8sQrrKeKBx8HJq eG2EIzgMXl63x5xuEGqYr8raHvdD4jFOPelGk3GSvm8XoAL3kfZUJ8SSsRa74aTr Yn+PKHkI6HKNZUzBfi0aTuF1QSvfNzK9/28yo4qUCpB3fpC+5tNkUqDyAJb9eYbp zoXEHNYDdgrBksZKrz2pUa4/PNOR+2qGrcVtgpeg8wkpu0eMiTkxDRPaoOrxkIg= =TqgX -----END PGP SIGNATURE----- --------------enig52BDC908A4C7A32F13EF3DB8-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:34:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C731065677; Mon, 3 Sep 2012 09:34:47 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4E88FC1B; Mon, 3 Sep 2012 09:34:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q839YlDo058910; Mon, 3 Sep 2012 09:34:47 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q839YljR058908; Mon, 3 Sep 2012 09:34:47 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209030934.q839YljR058908@svn.freebsd.org> From: Andrey Zonov Date: Mon, 3 Sep 2012 09:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240069 - 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: Mon, 03 Sep 2012 09:34:47 -0000 Author: zont Date: Mon Sep 3 09:34:46 2012 New Revision: 240069 URL: http://svn.freebsd.org/changeset/base/240069 Log: - After r240026 sgrowsiz should be used in a safer maner. Approved by: kib (mentor) MCF after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Sep 3 09:26:56 2012 (r240068) +++ head/sys/vm/vm_map.c Mon Sep 3 09:34:46 2012 (r240069) @@ -3245,7 +3245,7 @@ vm_map_stack(vm_map_t map, vm_offset_t a { vm_map_entry_t new_entry, prev_entry; vm_offset_t bot, top; - vm_size_t init_ssize; + vm_size_t growsize, init_ssize; int orient, rv; rlim_t vmemlim; @@ -3264,7 +3264,8 @@ vm_map_stack(vm_map_t map, vm_offset_t a addrbos + max_ssize < addrbos) return (KERN_NO_SPACE); - init_ssize = (max_ssize < sgrowsiz) ? max_ssize : sgrowsiz; + growsize = sgrowsiz; + init_ssize = (max_ssize < growsize) ? max_ssize : growsize; PROC_LOCK(curthread->td_proc); vmemlim = lim_cur(curthread->td_proc, RLIMIT_VMEM); @@ -3357,6 +3358,7 @@ vm_map_growstack(struct proc *p, vm_offs struct vmspace *vm = p->p_vmspace; vm_map_t map = &vm->vm_map; vm_offset_t end; + vm_size_t growsize; size_t grow_amount, max_grow; rlim_t stacklim, vmemlim; int is_procstack, rv; @@ -3476,8 +3478,9 @@ Retry: PROC_UNLOCK(p); #endif - /* Round up the grow amount modulo SGROWSIZ */ - grow_amount = roundup (grow_amount, sgrowsiz); + /* Round up the grow amount modulo sgrowsiz */ + growsize = sgrowsiz; + grow_amount = roundup(grow_amount, growsize); if (grow_amount > stack_entry->avail_ssize) grow_amount = stack_entry->avail_ssize; if (is_procstack && (ctob(vm->vm_ssize) + grow_amount > stacklim)) { From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:46:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FA5B1065670; Mon, 3 Sep 2012 09:46:47 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AE718FC15; Mon, 3 Sep 2012 09:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q839klsf060464; Mon, 3 Sep 2012 09:46:47 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q839klx0060462; Mon, 3 Sep 2012 09:46:47 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201209030946.q839klx0060462@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 3 Sep 2012 09:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240070 - 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: Mon, 03 Sep 2012 09:46:47 -0000 Author: ray Date: Mon Sep 3 09:46:46 2012 New Revision: 240070 URL: http://svn.freebsd.org/changeset/base/240070 Log: Add missing braces. Approved by: bschmidt (while mentor offline) Pointed by: gcooper Pointy hat to: ray Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Mon Sep 3 09:34:46 2012 (r240069) +++ head/sys/kern/subr_hints.c Mon Sep 3 09:46:46 2012 (r240070) @@ -72,10 +72,11 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) /* Migrate from static to dynamic hints */ switch (hintmode) { case 0: - if (dynamic_kenv) + if (dynamic_kenv) { /* Already here */ hintmode = value; /* XXX: Need we switch or not ? */ return (0); + } from_kenv = 1; cp = kern_envp; break; From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 09:49:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A365106564A; Mon, 3 Sep 2012 09:49:13 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id F119D8FC0C; Mon, 3 Sep 2012 09:49:12 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) by smtp.dlink.ua (Postfix) with SMTP id 918B7C4936; Mon, 3 Sep 2012 12:49:11 +0300 (EEST) Date: Mon, 3 Sep 2012 12:51:10 +0300 From: Aleksandr Rybalko To: Garrett Cooper Message-Id: <20120903125110.4420a12c.ray@freebsd.org> In-Reply-To: References: <201209030852.q838q6lC053405@svn.freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 09:49:13 -0000 On Mon, 3 Sep 2012 02:05:15 -0700 Garrett Cooper wrote: >> On Sep 3, 2012, at 1:52 AM, Aleksandr Rybalko wrote: >> >> > Author: ray >> > Date: Mon Sep 3 08:52:05 2012 >> > New Revision: 240067 >> > URL: http://svn.freebsd.org/changeset/base/240067 >> > >> > Log: >> > Add kern.hintmode sysctl variable to show current state of hints: >> > 0 - loader hints in environment only; >> > 1 - static hints only >> > 2 - fallback mode (Dynamic KENV with fallback to kernel >> > environment) Add kern.hintmode write handler, accept only value 2. >> > That will switch static KENV to dynamic. So it will be possible to >> > change device hints. >> >> ... >> >> > + /* Migrate from static to dynamic hints */ >> > + switch (hintmode) { >> > + case 0: >> > + if (dynamic_kenv) >> > + /* Already here */ >> > + hintmode = value; /* XXX: Need we switch >> > or not ? */ >> > + return (0); >> >> ^^^^ typo (missing braces)? ^^^^ Fixed. >> >> Also, don't you need extra glue for jails? >> >> -Garrett Thanks Garrett! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 10:08:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13F741065673; Mon, 3 Sep 2012 10:08:21 +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 F314B8FC0A; Mon, 3 Sep 2012 10:08:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83A8KV2063385; Mon, 3 Sep 2012 10:08:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83A8KYn063383; Mon, 3 Sep 2012 10:08:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209031008.q83A8KYn063383@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 3 Sep 2012 10:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240071 - 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, 03 Sep 2012 10:08:21 -0000 Author: glebius Date: Mon Sep 3 10:08:20 2012 New Revision: 240071 URL: http://svn.freebsd.org/changeset/base/240071 Log: Change bridge(4) to use if_transmit for forwarding packets to underlying interfaces instead of queueing. Tested by: ray Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Sep 3 09:46:46 2012 (r240070) +++ head/sys/net/if_bridge.c Mon Sep 3 10:08:20 2012 (r240071) @@ -245,11 +245,12 @@ static void bridge_ifdetach(void *arg __ static void bridge_init(void *); static void bridge_dummynet(struct mbuf *, struct ifnet *); static void bridge_stop(struct ifnet *, int); -static void bridge_start(struct ifnet *); +static int bridge_transmit(struct ifnet *, struct mbuf *); +static void bridge_qflush(struct ifnet *); static struct mbuf *bridge_input(struct ifnet *, struct mbuf *); static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); -static void bridge_enqueue(struct bridge_softc *, struct ifnet *, +static int bridge_enqueue(struct bridge_softc *, struct ifnet *, struct mbuf *); static void bridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int); @@ -600,12 +601,10 @@ bridge_clone_create(struct if_clone *ifc if_initname(ifp, ifc->ifc_name, unit); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = bridge_ioctl; - ifp->if_start = bridge_start; + ifp->if_transmit = bridge_transmit; + ifp->if_qflush = bridge_qflush; ifp->if_init = bridge_init; ifp->if_type = IFT_BRIDGE; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; - IFQ_SET_READY(&ifp->if_snd); /* * Generate an ethernet address with a locally administered address. @@ -1780,7 +1779,7 @@ bridge_stop(struct ifnet *ifp, int disab * Enqueue a packet on a bridge member interface. * */ -static void +static int bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m) { int len, err = 0; @@ -1823,6 +1822,8 @@ bridge_enqueue(struct bridge_softc *sc, if (mflags & M_MCAST) sc->sc_ifp->if_omcasts++; } + + return (err); } /* @@ -1981,44 +1982,43 @@ sendunicast: } /* - * bridge_start: + * bridge_transmit: * - * Start output on a bridge. + * Do output on a bridge. * */ -static void -bridge_start(struct ifnet *ifp) +static int +bridge_transmit(struct ifnet *ifp, struct mbuf *m) { struct bridge_softc *sc; - struct mbuf *m; - struct ether_header *eh; - struct ifnet *dst_if; + int error = 0; sc = ifp->if_softc; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - for (;;) { - IFQ_DEQUEUE(&ifp->if_snd, m); - if (m == 0) - break; - ETHER_BPF_MTAP(ifp, m); + ETHER_BPF_MTAP(ifp, m); + + + BRIDGE_LOCK(sc); + if ((m->m_flags & (M_BCAST|M_MCAST)) == 0) { + struct ether_header *eh; + struct ifnet *dst_if; eh = mtod(m, struct ether_header *); - dst_if = NULL; + dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1); + BRIDGE_UNLOCK(sc); + error = bridge_enqueue(sc, dst_if, m); + } else + bridge_broadcast(sc, ifp, m, 0); - BRIDGE_LOCK(sc); - if ((m->m_flags & (M_BCAST|M_MCAST)) == 0) { - dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1); - } + return (error); +} - if (dst_if == NULL) - bridge_broadcast(sc, ifp, m, 0); - else { - BRIDGE_UNLOCK(sc); - bridge_enqueue(sc, dst_if, m); - } - } - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; +/* + * The ifp->if_qflush entry point for if_bridge(4) is no-op. + */ +static void +bridge_qflush(struct ifnet *ifp __unused) +{ } /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 14:13:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CF7A1065670 for ; Mon, 3 Sep 2012 14:13:25 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm28-vm0.bullet.mail.sp2.yahoo.com (nm28-vm0.bullet.mail.sp2.yahoo.com [98.139.91.234]) by mx1.freebsd.org (Postfix) with SMTP id 4FE4B8FC14 for ; Mon, 3 Sep 2012 14:13:25 +0000 (UTC) Received: from [98.139.91.63] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 03 Sep 2012 14:13:19 -0000 Received: from [98.139.91.1] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 03 Sep 2012 14:13:19 -0000 Received: from [127.0.0.1] by omp1001.mail.sp2.yahoo.com with NNFMP; 03 Sep 2012 14:13:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 466132.57333.bm@omp1001.mail.sp2.yahoo.com Received: (qmail 67716 invoked by uid 60001); 3 Sep 2012 14:13:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346681599; bh=7Lc9wwkmTki92z01Qz6aAKuaXI1Mo1pU32zD2qq7E8E=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2N4ysIQc2Z5V1MxbyxxPN2wdJZgKKZBbIHclx5qWIeucNy84NzJLMVVli8lLifcCUOExqyoeW2IiKbULHvX3prX3eLK8SOeW0WOVGyVSBw1AnoFaEHiyYENSyiTXFzqZYmCtwSGFpXvcU5LIM2Bn/ViCZD0CpCF2in1XyUkxa+c= X-YMail-OSG: pe9h61wVM1n2FcrsA.NJVGLcD9g1eV4n4DxESpt1Wm_4aP2 DY97.bNts1O4sU7h8eCByINb0YSagQfqA73ghs6OTOnkWAeCN4WzMA5X.6si zC3w4FuCQ37zpm3qzVVJk7Me2EuFGPcBhiAoF3ifWXoMIz7cJmuM.9iW.S1o QQIG93FCXplak739OICcrlwwT_dRipmIFKqVJODeC5wFJYVy6E1U3.ARUgcZ A7yQgLN4znIVgMjdyoRdcQa2IZBtNYAy9g3vN.x24vE0Nn3nnW17vuAh6aYS LFhNyFcxjVt5gLIJ_wbDcCYxDA4_blsnkP3qleCebLqly3QXLaOYOIpNMaW_ 3a5hqyhTp4SON_RaPncAG23y9Dl6G6YPbeCITIsJNR2E2YQ4uwWYDpn8ds9k 5b.nKDJb4VGQKxy0oDlBw3WnaPpIX5BQhmD89h3LR_gvqdgNlQfi1rr1jAwj lwsSYpjy4bH3hgdAPnxEFM_iOhNyxstQ.dUsKMkXOikOh2vQ6UM6NIIqlzPs G1x1aQ6qn5m0JifqVptekMyN9r17Uv2EyoOGEBcMvTYFKtIvSg9rT80NeJbf IACOfx3ftrZosN56b_5HRwSK_EbWlJw-- Received: from [200.118.157.7] by web113502.mail.gq1.yahoo.com via HTTP; Mon, 03 Sep 2012 07:13:19 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.121.416 Message-ID: <1346681599.92069.YahooMailClassic@web113502.mail.gq1.yahoo.com> Date: Mon, 3 Sep 2012 07:13:19 -0700 (PDT) From: Pedro Giffuni To: Konstantin Belousov In-Reply-To: <20120903073133.GB33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2012 14:13:25 -0000 Hello, Sorry for the brevity but I can inly anser on a mobile device right now ... --- Lun 3/9/12, Konstantin Belousov ha scritto: > Da: Konstantin Belousov > Oggetto: Re: svn commit: r240060 - in head: include/rpc sys/rpc > A: "Pedro F. Giffuni" > Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@fre= ebsd.org > Data: Luned=EC 3 settembre 2012, 02:31 > On Sun, Sep 02, 2012 at 09:04:40PM > +0000, Pedro F. Giffuni wrote: > > Author: pfg > > Date: Sun Sep=A0 2 21:04:40 2012 > > New Revision: 240060 > > URL: http://svn.freebsd.org/changeset/base/240060 > >=20 > > Log: > >=A0=A0=A0Fix RPC headers for C++ > >=A0=A0=A0 > >=A0=A0=A0C++ mangling will cause trouble with > variables like __rpc_xdr > >=A0=A0=A0in xdr.h so rename this to XDR. > Which troubles ? > =20 PR 137443 > Although not very useful due to many other namespace > pollution problems > in the rpc headers, __rpc_xdr is in the > implementation-reserved namespace, > while XDR is not. >=20 The forced reference here is {Open}Solaris: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/rpc/xdr.= h OpenGrok found no reference to __rpc_xdr in OpenSolaris/illumos. Cheers, Pedro. From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 14:16:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E45901065670; Mon, 3 Sep 2012 14:16:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B56FC8FC08; Mon, 3 Sep 2012 14:16:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83EGGAG095571; Mon, 3 Sep 2012 14:16:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83EGGlK095569; Mon, 3 Sep 2012 14:16:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209031416.q83EGGlK095569@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 3 Sep 2012 14:16: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: r240072 - head/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 14:16:17 -0000 Author: glebius Date: Mon Sep 3 14:16:16 2012 New Revision: 240072 URL: http://svn.freebsd.org/changeset/base/240072 Log: Explicitly document all variables in the net.link.ether.inet MIB. Modified: head/usr.sbin/arp/arp.4 Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Mon Sep 3 10:08:20 2012 (r240071) +++ head/usr.sbin/arp/arp.4 Mon Sep 3 14:16:16 2012 (r240072) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 28, 2007 +.Dd September 3, 2012 .Dt ARP 4 .Os .Sh NAME @@ -119,20 +119,53 @@ branch of the .Xr sysctl 3 MIB. -.Bl -tag -width "useloopback" +.Bl -tag -width "log_arp_permanent_modify" +.It Va log_arp_movements +Should the kernel log movements of IP addresses from one hardware +address to an other. +See +.Sx DIAGNOSTICS +below. +Turned on by default. +.It Va log_arp_permanent_modify +Should the kernel log attempts of remote host on network to modify a +permanent ARP entry. +See +.Sx DIAGNOSTICS +below. +Turned on by default. +.It Va log_arp_wrong_iface +Should the kernel log attempts to insert an ARP entry on an interface +when the IP network the address belongs to is connected to an other +interface. +See +.Sx DIAGNOSTICS +below. +Turned on by default. .It Va max_age How long an ARP entry is held in the cache until it needs to be refreshed. +Default is 1200 seconds. +.It Va maxhold +How many packets hold in the per-entry output queue while the entry +is being resolved. +Default is one packet. .It Va maxtries Number of retransmits before host is considered down and error is returned. +Default is 5 tries. +.It Va proxyall +Enables ARP proxying for all hosts on net. +Turned off by default. .It Va useloopback If an ARP entry is added for local address, force the traffic to go through the loopback interface. -.It Va proxyall -Enables ARP proxying for all hosts on net. +Turned on by default. +.It Va wait +Lifetime of an incomplete ARP entry. +Default is 20 seconds. .El .Sh DIAGNOSTICS .Bl -diag -.It "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" +.It "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d on %s!" ARP has discovered another host on the local network which responds to mapping requests for its own Internet address with a different Ethernet address, generally indicating that two hosts are attempting to use the From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 14:29:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A5BB1065675; Mon, 3 Sep 2012 14:29:29 +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 CE48F8FC14; Mon, 3 Sep 2012 14:29:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83ETST6097183; Mon, 3 Sep 2012 14:29:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83ETSDs097180; Mon, 3 Sep 2012 14:29:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209031429.q83ETSDs097180@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 3 Sep 2012 14:29: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: r240073 - in head: sys/netinet usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 14:29:29 -0000 Author: glebius Date: Mon Sep 3 14:29:28 2012 New Revision: 240073 URL: http://svn.freebsd.org/changeset/base/240073 Log: Provide a sysctl switch that allows to install ARP entries with multicast bit set. FreeBSD refuses to install such entries since 9.0, and this broke installations running Microsoft NLB, which are violating standards. Tested by: Tarasov Oleg Modified: head/sys/netinet/if_ether.c head/usr.sbin/arp/arp.4 Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Sep 3 14:16:16 2012 (r240072) +++ head/sys/netinet/if_ether.c Mon Sep 3 14:29:28 2012 (r240073) @@ -496,6 +496,7 @@ arpintr(struct mbuf *m) static int log_arp_wrong_iface = 1; static int log_arp_movements = 1; static int log_arp_permanent_modify = 1; +static int allow_multicast = 0; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, @@ -506,7 +507,8 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUT SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_permanent_modify, CTLFLAG_RW, &log_arp_permanent_modify, 0, "log arp replies from MACs different than the one in the permanent arp entry"); - +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, allow_multicast, CTLFLAG_RW, + &allow_multicast, 0, "accept multicast addresses"); static void in_arpinput(struct mbuf *m) @@ -551,8 +553,8 @@ in_arpinput(struct mbuf *m) return; } - if (ETHER_IS_MULTICAST(ar_sha(ah))) { - log(LOG_NOTICE, "in_arp: %*D is multicast\n", + if (allow_multicast == 0 && ETHER_IS_MULTICAST(ar_sha(ah))) { + log(LOG_NOTICE, "arp: %*D is multicast\n", ifp->if_addrlen, (u_char *)ar_sha(ah), ":"); return; } Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Mon Sep 3 14:16:16 2012 (r240072) +++ head/usr.sbin/arp/arp.4 Mon Sep 3 14:29:28 2012 (r240073) @@ -120,6 +120,12 @@ of the .Xr sysctl 3 MIB. .Bl -tag -width "log_arp_permanent_modify" +.It Va allow_multicast +Should the kernel install ARP entries with multicast bit set in +the hardware address. +Installing such entries is RFC 1812 violation, but some prorietary +load balancing techniques require routers on network to do so. +Turned off by default. .It Va log_arp_movements Should the kernel log movements of IP addresses from one hardware address to an other. @@ -203,6 +209,11 @@ entry in the local ARP table. This error will only be logged if the sysctl .Va net.link.ether.inet.log_arp_permanent_modify is set to 1, which is the system's default behaviour. +.It "arp: %x:%x:%x:%x:%x:%x is multicast" +Kernel refused to install an entry with multicast hardware address. +If you really want such addresses being installed, set the sysctl +.Va net.link.ether.inet.allow_multicast +to a positive value. .El .Sh SEE ALSO .Xr inet 4 , From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 14:41:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1740F106566B; Mon, 3 Sep 2012 14:41:05 +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 8A76B8FC16; Mon, 3 Sep 2012 14:41:03 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q83Ef2CQ061691; Mon, 3 Sep 2012 17:41:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q83EeoVs033620; Mon, 3 Sep 2012 17:40:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q83Eeoai033619; Mon, 3 Sep 2012 17:40:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Sep 2012 17:40:50 +0300 From: Konstantin Belousov To: Pedro Giffuni Message-ID: <20120903144050.GN33100@deviant.kiev.zoral.com.ua> References: <20120903073133.GB33100@deviant.kiev.zoral.com.ua> <1346681599.92069.YahooMailClassic@web113502.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BfpcaheOxHyW4lRg" Content-Disposition: inline In-Reply-To: <1346681599.92069.YahooMailClassic@web113502.mail.gq1.yahoo.com> 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 14:41:05 -0000 --BfpcaheOxHyW4lRg Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 03, 2012 at 07:13:19AM -0700, Pedro Giffuni wrote: > Hello, >=20 > Sorry for the brevity but I can inly anser on a mobile device > right now ... >=20 > --- Lun 3/9/12, Konstantin Belousov ha scritto: >=20 > > Da: Konstantin Belousov > > Oggetto: Re: svn commit: r240060 - in head: include/rpc sys/rpc > > A: "Pedro F. Giffuni" > > Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@f= reebsd.org > > Data: Luned? 3 settembre 2012, 02:31 > > On Sun, Sep 02, 2012 at 09:04:40PM > > +0000, Pedro F. Giffuni wrote: > > > Author: pfg > > > Date: Sun Sep=9A 2 21:04:40 2012 > > > New Revision: 240060 > > > URL: http://svn.freebsd.org/changeset/base/240060 > > >=20 > > > Log: > > >=9A=9A=9AFix RPC headers for C++ > > >=9A=9A=9A > > >=9A=9A=9AC++ mangling will cause trouble with > > variables like __rpc_xdr > > >=9A=9A=9Ain xdr.h so rename this to XDR. > > Which troubles ? > > > =20 > PR 137443 =46rom the PR, I fail to see what is the problem in our headers, and why the issue is not in some third-party C++ code. It is definitely has nothing to do with C++ name mangling. >=20 > > Although not very useful due to many other namespace > > pollution problems > > in the rpc headers, __rpc_xdr is in the > > implementation-reserved namespace, > > while XDR is not. > >=20 >=20 > The forced reference here is {Open}Solaris: >=20 > http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/rpc/xd= r.h >=20 > OpenGrok found no reference to __rpc_xdr > in OpenSolaris/illumos. I see, Solaris does typedef struct XDR { ... } XDR; and we now use the same trick. So my objections, if any, were against the commit message and not the actual code change then. Thanks. --BfpcaheOxHyW4lRg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBEwXIACgkQC3+MBN1Mb4j61gCgiweJgcQqiX2TBPu+ZTFXHF6b K00AoNQWrqMSIQWySdAC2Vbb0x1LDuuv =xCph -----END PGP SIGNATURE----- --BfpcaheOxHyW4lRg-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 15:22:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DB54106566C; Mon, 3 Sep 2012 15:22:03 +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 5EC3D8FC14; Mon, 3 Sep 2012 15:22:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83FM37a003454; Mon, 3 Sep 2012 15:22:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83FM3sr003451; Mon, 3 Sep 2012 15:22:03 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209031522.q83FM3sr003451@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 3 Sep 2012 15: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: r240074 - 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, 03 Sep 2012 15:22:03 -0000 Author: hselasky Date: Mon Sep 3 15:22:02 2012 New Revision: 240074 URL: http://svn.freebsd.org/changeset/base/240074 Log: Add more DWC OTG register definitions. Submitted by: Nick Hudson Modified: head/sys/dev/usb/controller/dwc_otgreg.h Modified: head/sys/dev/usb/controller/dwc_otgreg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otgreg.h Mon Sep 3 14:29:28 2012 (r240073) +++ head/sys/dev/usb/controller/dwc_otgreg.h Mon Sep 3 15:22:02 2012 (r240074) @@ -451,10 +451,21 @@ #define DIEPTXFN_INEPNTXFSTADDR_SHIFT 0 #define DIEPTXFN_INEPNTXFSTADDR_MASK 0x0000ffff +#define HCFG_MODECHANGERDY (1<<31) +#define HCFG_PERSCHEDENABLE (1<<26) +#define HCFG_FLENTRIES_SHIFT 24 +#define HCFG_FLENTRIES_MASK 0x03000000 +#define HCFG_FLENTRIES_8 (0) +#define HCFG_FLENTRIES_16 (1) +#define HCFG_FLENTRIES_32 (2) +#define HCFG_FLENTRIES_64 (3) +#define HCFG_MULTISEGDMA (1<<23) +#define HCFG_32KHZSUSPEND (1<<7) #define HCFG_FSLSSUPP (1<<2) #define HCFG_FSLSPCLKSEL_SHIFT 0 #define HCFG_FSLSPCLKSEL_MASK 0x00000003 +#define HFIR_RELOADCTRL (1<<16) #define HFIR_FRINT_SHIFT 0 #define HFIR_FRINT_MASK 0x0000ffff @@ -463,8 +474,15 @@ #define HFNUM_FRNUM_SHIFT 0 #define HFNUM_FRNUM_MASK 0x0000ffff -#define HPTXSTS_PTXQTOP_SHIFT 24 -#define HPTXSTS_PTXQTOP_MASK 0xff000000 +#define HPTXSTS_ODD (1<<31) +#define HPTXSTS_CHAN_SHIFT 27 +#define HPTXSTS_CHAN_MASK 0x78000000 +#define HPTXSTS_TOKEN_SHIFT 25 +#define HPTXSTS_TOKEN_MASK 0x06000000 +#define HPTXSTS_TOKEN_ZL 0 +#define HPTXSTS_TOKEN_PING 1 +#define HPTXSTS_TOKEN_DISABLE 2 +#define HPTXSTS_TERMINATE (1<<24) #define HPTXSTS_PTXQSPCAVAIL_SHIFT 16 #define HPTXSTS_PTXQSPCAVAIL_MASK 0x00ff0000 #define HPTXSTS_PTXFSPCAVAIL_SHIFT 0 @@ -517,7 +535,7 @@ #define HCCHAR_MPS_MASK 0x000007ff #define HCSPLT_SPLTENA (1<<31) -#define HCSPLT_COMPSPLT (1<<16) +#define HCSPLT_COMPSPLT (1<<16) #define HCSPLT_XACTPOS_SHIFT 14 #define HCSPLT_XACTPOS_MASK 0x0000c000 #define HCSPLT_HUBADDR_SHIFT 7 From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 16:09:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DD68106566C; Mon, 3 Sep 2012 16:09:14 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2C88FC1F; Mon, 3 Sep 2012 16:09:14 +0000 (UTC) Received: by dadr6 with SMTP id r6so3600389dad.13 for ; Mon, 03 Sep 2012 09:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3caLdzpx6pRAHe34ZsIYxBPNiBwIUcVQ36gZ58UG1kI=; b=d2F0zBD0+vGln+vPrbp68fshsQhmTZYbxWetRLjEaNBJDGrwdKOY78D/tCeu9O2Exp 5rm4DLIwwKl7Bee6xr+zoraFSlkBVI1aKDiyFgzd/CNXKtFv3mtYkLXR3845D1SMDIGe 8wUtIwn3gBVfCvQloNnrqVnXt7QyM1YgZthBjucb4rCLaOaikT81b9sr5lsXyKrfcoEZ bTL3DKm1d1g/zUMvY0DkgnBebVDlz5D8CA1V/wqIO682UG6fHEaFLZKItW7NkTX0c//u VHwCpS6ZCotGSrjMiuSsRywTfJxekjZIsGo/PBiW/EvSswng+tyysTtItnTyrVNmc3TH 4z4g== MIME-Version: 1.0 Received: by 10.66.76.135 with SMTP id k7mr35101594paw.2.1346688548199; Mon, 03 Sep 2012 09:09:08 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.13.170 with HTTP; Mon, 3 Sep 2012 09:09:08 -0700 (PDT) In-Reply-To: <201209030852.q838q6lC053405@svn.freebsd.org> References: <201209030852.q838q6lC053405@svn.freebsd.org> Date: Mon, 3 Sep 2012 09:09:08 -0700 X-Google-Sender-Auth: LOZjx1uEPjZJyO_eZVBeneSJwlA Message-ID: From: mdf@FreeBSD.org To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 16:09:14 -0000 On Mon, Sep 3, 2012 at 1:52 AM, Aleksandr Rybalko wrote: > Author: ray > Date: Mon Sep 3 08:52:05 2012 > New Revision: 240067 > URL: http://svn.freebsd.org/changeset/base/240067 > > Log: > Add kern.hintmode sysctl variable to show current state of hints: > 0 - loader hints in environment only; > 1 - static hints only > 2 - fallback mode (Dynamic KENV with fallback to kernel environment) > Add kern.hintmode write handler, accept only value 2. That will switch > static KENV to dynamic. So it will be possible to change device hints. > > Approved by: adrian (mentor) > > Modified: > head/sys/kern/subr_hints.c > > Modified: head/sys/kern/subr_hints.c > ============================================================================== > --- head/sys/kern/subr_hints.c Mon Sep 3 07:18:24 2012 (r240066) > +++ head/sys/kern/subr_hints.c Mon Sep 3 08:52:05 2012 (r240067) > @@ -29,8 +29,10 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > +#include Putting on my style-nazi hat. sysctl comes before systm alphabetically. > #include > > /* > @@ -42,6 +44,81 @@ static int use_kenv; > static char *hintp; > > /* > + * Define kern.hintmode sysctl, which only accept value 2, that cause to > + * switch from Static KENV mode to Dynamic KENV. So systems that have hints > + * compiled into kernel will be able to see/modify KENV (and hints too). > + */ > + > +static int > +sysctl_hintmode(SYSCTL_HANDLER_ARGS) > +{ > + int error, i, from_kenv, value, eqidx; > + const char *cp; > + char *line, *eq; These are not sorted properly; pointers come before scalars, and within the group they should be sorted alphabetically; e.g. "eqidx" comes before all the other ints. > + > + from_kenv = 0; > + cp = kern_envp; > + value = hintmode; > + > + /* Fetch candidate for new hintmode value */ > + error = sysctl_handle_int(oidp, &value, 0, req); > + if (error || !req->newptr) This may be copying existing code, but style(9) explicitly forbids using '!' except on boolean expressions. Since req->newptr is a pointer, an explicit comparison to NULL should be made. This error is repeated later. Thanks, matthew > + return (error); > + > + if (value != 2) > + /* Only accept swithing to hintmode 2 */ > + return (EINVAL); > + > + /* Migrate from static to dynamic hints */ > + switch (hintmode) { > + case 0: > + if (dynamic_kenv) > + /* Already here */ > + hintmode = value; /* XXX: Need we switch or not ? */ > + return (0); > + from_kenv = 1; > + cp = kern_envp; > + break; > + case 1: > + cp = static_hints; > + break; > + case 2: > + /* Nothing to do, hintmode already 2 */ > + return (0); > + } > + > + while (cp) { > + i = strlen(cp); > + if (i == 0) > + break; > + if (from_kenv) { > + if (strncmp(cp, "hint.", 5) != 0) > + /* kenv can have not only hints */ > + continue; > + } > + eq = strchr(cp, '='); > + if (!eq) > + /* Bad hint value */ > + continue; > + eqidx = eq - cp; > + > + line = malloc(i+1, M_TEMP, M_WAITOK); > + strcpy(line, cp); > + line[eqidx] = '\0'; > + setenv(line, line + eqidx + 1); > + free(line, M_TEMP); > + cp += i + 1; > + } > + > + hintmode = value; > + use_kenv = 1; > + return (0); > +} > + > +SYSCTL_PROC(_kern, OID_AUTO, hintmode, CTLTYPE_INT|CTLFLAG_RW, > + &hintmode, 0, sysctl_hintmode, "I", "Get/set current hintmode"); > + > +/* > * Evil wildcarding resource string lookup. > * This walks the supplied env string table and returns a match. > * The start point can be remembered for incremental searches. From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 16:51:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A4B4106564A; Mon, 3 Sep 2012 16:51:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31F158FC16; Mon, 3 Sep 2012 16:51:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83Gpgae014209; Mon, 3 Sep 2012 16:51:42 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83GpfHi014195; Mon, 3 Sep 2012 16:51:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209031651.q83GpfHi014195@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 3 Sep 2012 16:51: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: r240075 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/lib/libssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 16:51:42 -0000 Author: des Date: Mon Sep 3 16:51:41 2012 New Revision: 240075 URL: http://svn.freebsd.org/changeset/base/240075 Log: Upgrade OpenSSH to 6.1p1. Deleted: head/crypto/openssh/version.c Modified: head/crypto/openssh/ChangeLog head/crypto/openssh/INSTALL head/crypto/openssh/LICENCE head/crypto/openssh/PROTOCOL.certkeys head/crypto/openssh/PROTOCOL.mux head/crypto/openssh/README head/crypto/openssh/addrmatch.c head/crypto/openssh/audit-bsm.c head/crypto/openssh/auth-krb5.c head/crypto/openssh/auth-options.c head/crypto/openssh/auth-passwd.c head/crypto/openssh/auth.c head/crypto/openssh/auth2-pubkey.c head/crypto/openssh/auth2.c head/crypto/openssh/authfile.c head/crypto/openssh/channels.c head/crypto/openssh/channels.h head/crypto/openssh/clientloop.c head/crypto/openssh/clientloop.h head/crypto/openssh/compat.c head/crypto/openssh/compat.h head/crypto/openssh/config.h.in head/crypto/openssh/defines.h head/crypto/openssh/dh.c head/crypto/openssh/dns.c head/crypto/openssh/dns.h head/crypto/openssh/entropy.c head/crypto/openssh/entropy.h head/crypto/openssh/jpake.c head/crypto/openssh/kex.c head/crypto/openssh/key.c head/crypto/openssh/key.h head/crypto/openssh/mac.c head/crypto/openssh/misc.c head/crypto/openssh/moduli head/crypto/openssh/moduli.c head/crypto/openssh/monitor.c head/crypto/openssh/mux.c head/crypto/openssh/myproposal.h head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c head/crypto/openssh/openbsd-compat/bsd-cygwin_util.h head/crypto/openssh/openbsd-compat/bsd-misc.h head/crypto/openssh/openbsd-compat/getcwd.c head/crypto/openssh/openbsd-compat/getgrouplist.c head/crypto/openssh/openbsd-compat/getrrsetbyname.c head/crypto/openssh/openbsd-compat/glob.c head/crypto/openssh/openbsd-compat/inet_ntop.c head/crypto/openssh/openbsd-compat/mktemp.c head/crypto/openssh/openbsd-compat/openbsd-compat.h head/crypto/openssh/openbsd-compat/openssl-compat.h head/crypto/openssh/openbsd-compat/port-linux.c head/crypto/openssh/openbsd-compat/setenv.c head/crypto/openssh/openbsd-compat/sha2.c head/crypto/openssh/openbsd-compat/sha2.h head/crypto/openssh/openbsd-compat/strlcpy.c head/crypto/openssh/packet.c head/crypto/openssh/packet.h head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/roaming.h head/crypto/openssh/roaming_client.c head/crypto/openssh/roaming_common.c head/crypto/openssh/sandbox-rlimit.c head/crypto/openssh/sandbox-systrace.c head/crypto/openssh/scp.1 head/crypto/openssh/scp.c head/crypto/openssh/servconf.c head/crypto/openssh/servconf.h head/crypto/openssh/serverloop.c head/crypto/openssh/session.c head/crypto/openssh/sftp-client.c head/crypto/openssh/sftp-glob.c head/crypto/openssh/sftp.1 head/crypto/openssh/sftp.c head/crypto/openssh/ssh-add.1 head/crypto/openssh/ssh-add.c head/crypto/openssh/ssh-ecdsa.c head/crypto/openssh/ssh-keygen.1 head/crypto/openssh/ssh-keygen.c head/crypto/openssh/ssh-pkcs11-client.c head/crypto/openssh/ssh-pkcs11-helper.c head/crypto/openssh/ssh.1 head/crypto/openssh/ssh.c head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/ssh_namespace.h head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.8 head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/umac.c head/crypto/openssh/version.h head/secure/lib/libssh/Makefile Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/ChangeLog Mon Sep 3 16:51:41 2012 (r240075) @@ -1,3 +1,629 @@ +20120828 + - (djm) Release openssh-6.1 + +20120828 + - (dtucker) [openbsd-compat/bsd-cygwin_util.h] define WIN32_LEAN_AND_MEAN + for compatibility with future mingw-w64 headers. Patch from vinschen at + redhat com. + +20120822 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Update version numbers + +20120731 + - (djm) OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2012/07/06 06:38:03 + [ssh-keygen.c] + missing full stop in usage(); + - djm@cvs.openbsd.org 2012/07/10 02:19:15 + [servconf.c servconf.h sshd.c sshd_config] + Turn on systrace sandboxing of pre-auth sshd by default for new installs + by shipping a config that overrides the current UsePrivilegeSeparation=yes + default. Make it easier to flip the default in the future by adding too. + prodded markus@ feedback dtucker@ "get it in" deraadt@ + - dtucker@cvs.openbsd.org 2012/07/13 01:35:21 + [servconf.c] + handle long comments in config files better. bz#2025, ok markus + - markus@cvs.openbsd.org 2012/07/22 18:19:21 + [version.h] + openssh 6.1 + +20120720 + - (dtucker) Import regened moduli file. + +20120706 + - (djm) [sandbox-seccomp-filter.c] fallback to rlimit if seccomp filter is + not available. Allows use of sshd compiled on host with a filter-capable + kernel on hosts that lack the support. bz#2011 ok dtucker@ + - (djm) [configure.ac] Recursively expand $(bindir) to ensure it has no + unexpanded $(prefix) embedded. bz#2007 patch from nix-corp AT + esperi.org.uk; ok dtucker@ +- (djm) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/07/06 00:41:59 + [moduli.c ssh-keygen.1 ssh-keygen.c] + Add options to specify starting line number and number of lines to process + when screening moduli candidates. This allows processing of different + parts of a candidate moduli file in parallel. man page help jmc@, ok djm@ + - djm@cvs.openbsd.org 2012/07/06 01:37:21 + [mux.c] + fix memory leak of passed-in environment variables and connection + context when new session message is malformed; bz#2003 from Bert.Wesarg + AT googlemail.com + - djm@cvs.openbsd.org 2012/07/06 01:47:38 + [ssh.c] + move setting of tty_flag to after config parsing so RequestTTY options + are correctly picked up. bz#1995 patch from przemoc AT gmail.com; + ok dtucker@ + +20120704 + - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] Add setlinebuf for + platforms that don't have it. "looks good" tim@ + +20120703 + - (dtucker) [configure.ac] Detect platforms that can't use select(2) with + setrlimit(RLIMIT_NOFILE, rl_zero) and disable the rlimit sandbox on those. + - (dtucker) [configure.ac sandbox-rlimit.c] Test whether or not + setrlimit(RLIMIT_FSIZE, rl_zero) and skip it if it's not supported. Its + benefit is minor, so it's not worth disabling the sandbox if it doesn't + work. + +20120702 +- (dtucker) OpenBSD CVS Sync + - naddy@cvs.openbsd.org 2012/06/29 13:57:25 + [ssh_config.5 sshd_config.5] + match the documented MAC order of preference to the actual one; + ok dtucker@ + - markus@cvs.openbsd.org 2012/06/30 14:35:09 + [sandbox-systrace.c sshd.c] + fix a during the load of the sandbox policies (child can still make + the read-syscall and wait forever for systrace-answers) by replacing + the read/write synchronisation with SIGSTOP/SIGCONT; + report and help hshoexer@; ok djm@, dtucker@ + - dtucker@cvs.openbsd.org 2012/07/02 08:50:03 + [ssh.c] + set interactive ToS for forwarded X11 sessions. ok djm@ + - dtucker@cvs.openbsd.org 2012/07/02 12:13:26 + [ssh-pkcs11-helper.c sftp-client.c] + fix a couple of "assigned but not used" warnings. ok markus@ + - dtucker@cvs.openbsd.org 2012/07/02 14:37:06 + [regress/connect-privsep.sh] + remove exit from end of test since it prevents reporting failure + - (dtucker) [regress/reexec.sh regress/sftp-cmds.sh regress/test-exec.sh] + Move cygwin detection to test-exec and use to skip reexec test on cygwin. + - (dtucker) [regress/test-exec.sh] Correct uname for cygwin/w2k. + +20120629 + - OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/06/21 00:16:07 + [addrmatch.c] + fix strlcpy truncation check. from carsten at debian org, ok markus + - dtucker@cvs.openbsd.org 2012/06/22 12:30:26 + [monitor.c sshconnect2.c] + remove dead code following 'for (;;)' loops. + From Steve.McClellan at radisys com, ok markus@ + - dtucker@cvs.openbsd.org 2012/06/22 14:36:33 + [sftp.c] + Remove unused variable leftover from tab-completion changes. + From Steve.McClellan at radisys com, ok markus@ + - dtucker@cvs.openbsd.org 2012/06/26 11:02:30 + [sandbox-systrace.c] + Add mquery to the list of allowed syscalls for "UsePrivilegeSeparation + sandbox" since malloc now uses it. From johnw.mail at gmail com. + - dtucker@cvs.openbsd.org 2012/06/28 05:07:45 + [mac.c myproposal.h ssh_config.5 sshd_config.5] + Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed + from draft6 of the spec and will not be in the RFC when published. Patch + from mdb at juniper net via bz#2023, ok markus. + - naddy@cvs.openbsd.org 2012/06/29 13:57:25 + [ssh_config.5 sshd_config.5] + match the documented MAC order of preference to the actual one; ok dtucker@ + - dtucker@cvs.openbsd.org 2012/05/13 01:42:32 + [regress/addrmatch.sh] + Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests + to match. Feedback and ok djm@ markus@. + - djm@cvs.openbsd.org 2012/06/01 00:47:35 + [regress/multiplex.sh regress/forwarding.sh] + append to rather than truncate test log; bz#2013 from openssh AT + roumenpetrov.info + - djm@cvs.openbsd.org 2012/06/01 00:52:52 + [regress/sftp-cmds.sh] + don't delete .* on cleanup due to unintended env expansion; pointed out in + bz#2014 by openssh AT roumenpetrov.info + - dtucker@cvs.openbsd.org 2012/06/26 12:06:59 + [regress/connect-privsep.sh] + test sandbox with every malloc option + - dtucker@cvs.openbsd.org 2012/06/28 05:07:45 + [regress/try-ciphers.sh regress/cipher-speed.sh] + Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs since they were removed + from draft6 of the spec and will not be in the RFC when published. Patch + from mdb at juniper net via bz#2023, ok markus. + - (dtucker) [myproposal.h] Remove trailing backslash to fix compile error. + - (dtucker) [key.c] ifdef out sha256 key types on platforms that don't have + the required functions in libcrypto. + +20120628 + - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null + pointer deref in the client when built with LDNS and using DNSSEC with a + CNAME. Patch from gregdlg+mr at hochet info. + +20120622 + - (dtucker) [contrib/cygwin/ssh-host-config] Ensure that user sshd runs as + can logon as a service. Patch from vinschen at redhat com. + +20120620 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/12/02 00:41:56 + [mux.c] + fix bz#1948: ssh -f doesn't fork for multiplexed connection. + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/04 23:16:12 + [mux.c] + revert: + > revision 1.32 + > date: 2011/12/02 00:41:56; author: djm; state: Exp; lines: +4 -1 + > fix bz#1948: ssh -f doesn't fork for multiplexed connection. + > ok dtucker@ + it interacts badly with ControlPersist + - djm@cvs.openbsd.org 2012/01/07 21:11:36 + [mux.c] + fix double-free in new session handler + NB. Id sync only + - djm@cvs.openbsd.org 2012/05/23 03:28:28 + [dns.c dns.h key.c key.h ssh-keygen.c] + add support for RFC6594 SSHFP DNS records for ECDSA key types. + patch from bugzilla-m67 AT nulld.me in bz#1978; ok + tweak markus@ + - djm@cvs.openbsd.org 2012/06/01 00:49:35 + [PROTOCOL.mux] + correct types of port numbers (integers, not strings); bz#2004 from + bert.wesarg AT googlemail.com + - djm@cvs.openbsd.org 2012/06/01 01:01:22 + [mux.c] + fix memory leak when mux socket creation fails; bz#2002 from bert.wesarg + AT googlemail.com + - dtucker@cvs.openbsd.org 2012/06/18 11:43:53 + [jpake.c] + correct sizeof usage. patch from saw at online.de, ok deraadt + - dtucker@cvs.openbsd.org 2012/06/18 11:49:58 + [ssh_config.5] + RSA instead of DSA twice. From Steve.McClellan at radisys com + - dtucker@cvs.openbsd.org 2012/06/18 12:07:07 + [ssh.1 sshd.8] + Remove mention of 'three' key files since there are now four. From + Steve.McClellan at radisys com. + - dtucker@cvs.openbsd.org 2012/06/18 12:17:18 + [ssh.1] + Clarify description of -W. Noted by Steve.McClellan at radisys com, + ok jmc + - markus@cvs.openbsd.org 2012/06/19 18:25:28 + [servconf.c servconf.h sshd_config.5] + sshd_config: extend Match to allow AcceptEnv and {Allow,Deny}{Users,Groups} + this allows 'Match LocalPort 1022' combined with 'AllowUser bauer' + ok djm@ (back in March) + - jmc@cvs.openbsd.org 2012/06/19 21:35:54 + [sshd_config.5] + tweak previous; ok markus + - djm@cvs.openbsd.org 2012/06/20 04:42:58 + [clientloop.c serverloop.c] + initialise accept() backoff timer to avoid EINVAL from select(2) in + rekeying + +20120519 + - (dtucker) [configure.ac] bz#2010: fix non-portable shell construct. Patch + from cjwatson at debian org. + - (dtucker) [configure.ac contrib/Makefile] bz#1996: use AC_PATH_TOOL to find + pkg-config so it does the right thing when cross-compiling. Patch from + cjwatson at debian org. +- (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2012/05/13 01:42:32 + [servconf.h servconf.c sshd.8 sshd.c auth.c sshd_config.5] + Add "Match LocalAddress" and "Match LocalPort" to sshd and adjust tests + to match. Feedback and ok djm@ markus@. + - dtucker@cvs.openbsd.org 2012/05/19 06:30:30 + [sshd_config.5] + Document PermitOpen none. bz#2001, patch from Loganaden Velvindron + +20120504 + - (dtucker) [configure.ac] Include rather than + to fix building on some plaforms. Fom bowman at math utah edu and + des at des no. + +20120427 + - (dtucker) [regress/addrmatch.sh] skip tests when running on a non-ipv6 + platform rather than exiting early, so that we still clean up and return + success or failure to test-exec.sh + +20120426 + - (djm) [auth-passwd.c] Handle crypt() returning NULL; from Paul Wouters + via Niels + - (djm) [auth-krb5.c] Save errno across calls that might modify it; + ok dtucker@ + +20120423 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/04/23 08:18:17 + [channels.c] + fix function proto/source mismatch + +20120422 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/02/29 11:21:26 + [ssh-keygen.c] + allow conversion of RSA1 keys to public PEM and PKCS8; "nice" markus@ + - guenther@cvs.openbsd.org 2012/03/15 03:10:27 + [session.c] + root should always be excluded from the test for /etc/nologin instead + of having it always enforced even when marked as ignorenologin. This + regressed when the logic was incompletely flipped around in rev 1.251 + ok halex@ millert@ + - djm@cvs.openbsd.org 2012/03/28 07:23:22 + [PROTOCOL.certkeys] + explain certificate extensions/crit split rationale. Mention requirement + that each appear at most once per cert. + - dtucker@cvs.openbsd.org 2012/03/29 23:54:36 + [channels.c channels.h servconf.c] + Add PermitOpen none option based on patch from Loganaden Velvindron + (bz #1949). ok djm@ + - djm@cvs.openbsd.org 2012/04/11 13:16:19 + [channels.c channels.h clientloop.c serverloop.c] + don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a + while; ok deraadt@ markus@ + - djm@cvs.openbsd.org 2012/04/11 13:17:54 + [auth.c] + Support "none" as an argument for AuthorizedPrincipalsFile to indicate + no file should be read. + - djm@cvs.openbsd.org 2012/04/11 13:26:40 + [sshd.c] + don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for a + while; ok deraadt@ markus@ + - djm@cvs.openbsd.org 2012/04/11 13:34:17 + [ssh-keyscan.1 ssh-keyscan.c] + now that sshd defaults to offering ECDSA keys, ssh-keyscan should also + look for them by default; bz#1971 + - djm@cvs.openbsd.org 2012/04/12 02:42:32 + [servconf.c servconf.h sshd.c sshd_config sshd_config.5] + VersionAddendum option to allow server operators to append some arbitrary + text to the SSH-... banner; ok deraadt@ "don't care" markus@ + - djm@cvs.openbsd.org 2012/04/12 02:43:55 + [sshd_config sshd_config.5] + mention AuthorizedPrincipalsFile=none default + - djm@cvs.openbsd.org 2012/04/20 03:24:23 + [sftp.c] + setlinebuf(3) is more readable than setvbuf(.., _IOLBF, ...) + - jmc@cvs.openbsd.org 2012/04/20 16:26:22 + [ssh.1] + use "brackets" instead of "braces", for consistency; + +20120420 + - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Update for release 6.0 + - (djm) [README] Update URL to release notes. + - (djm) Release openssh-6.0 + +20120419 + - (djm) [configure.ac] Fix compilation error on FreeBSD, whose libutil + contains openpty() but not login() + +20120404 + - (djm) [Makefile.in configure.ac sandbox-seccomp-filter.c] Add sandbox + mode for Linux's new seccomp filter; patch from Will Drewry; feedback + and ok dtucker@ + +20120330 + - (dtucker) [contrib/redhat/openssh.spec] Bug #1992: remove now-gone WARNING + file from spec file. From crighter at nuclioss com. + - (djm) [entropy.c] bz#1991: relax OpenSSL version test to allow running + openssh binaries on a newer fix release than they were compiled on. + with and ok dtucker@ + - (djm) [openbsd-compat/bsd-cygwin_util.h] #undef _WIN32 to avoid incorrect + assumptions when building on Cygwin; patch from Corinna Vinschen + +20120309 + - (djm) [openbsd-compat/port-linux.c] bz#1960: fix crash on SELinux + systems where sshd is run in te wrong context. Patch from Sven + Vermeulen; ok dtucker@ + - (djm) [packet.c] bz#1963: Fix IPQoS not being set on non-mapped v4-in-v6 + addressed connections. ok dtucker@ + +20120224 + - (dtucker) [audit-bsm.c configure.ac] bug #1968: enable workarounds for BSM + audit breakage in Solaris 11. Patch from Magnus Johansson. + +20120215 + - (tim) [openbsd-compat/bsd-misc.h sshd.c] Fix conflicting return type for + unsetenv due to rev 1.14 change to setenv.c. Cast unsetenv to void in sshd.c + ok dtucker@ + - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN so + it actually works. + - (tim) [regress/keytype.sh] stderr redirection needs to be inside back quote + to work. Spotted by Angel Gonzalez + +20120214 + - (djm) [openbsd-compat/bsd-cygwin_util.c] Add PROGRAMFILES to list of + preserved Cygwin environment variables; from Corinna Vinschen + +20120211 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2012/01/05 00:16:56 + [monitor.c] + memleak on error path + - djm@cvs.openbsd.org 2012/01/07 21:11:36 + [mux.c] + fix double-free in new session handler + - miod@cvs.openbsd.org 2012/01/08 13:17:11 + [ssh-ecdsa.c] + Fix memory leak in ssh_ecdsa_verify(); from Loganaden Velvindron, + ok markus@ + - miod@cvs.openbsd.org 2012/01/16 20:34:09 + [ssh-pkcs11-client.c] + Fix a memory leak in pkcs11_rsa_private_encrypt(), reported by Jan Klemkow. + While there, be sure to buffer_clear() between send_msg() and recv_msg(). + ok markus@ + - dtucker@cvs.openbsd.org 2012/01/18 21:46:43 + [clientloop.c] + Ensure that $DISPLAY contains only valid characters before using it to + extract xauth data so that it can't be used to play local shell + metacharacter games. Report from r00t_ati at ihteam.net, ok markus. + - markus@cvs.openbsd.org 2012/01/25 19:26:43 + [packet.c] + do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying; + ok dtucker@, djm@ + - markus@cvs.openbsd.org 2012/01/25 19:36:31 + [authfile.c] + memleak in key_load_file(); from Jan Klemkow + - markus@cvs.openbsd.org 2012/01/25 19:40:09 + [packet.c packet.h] + packet_read_poll() is not used anymore. + - markus@cvs.openbsd.org 2012/02/09 20:00:18 + [version.h] + move from 6.0-beta to 6.0 + +20120206 + - (djm) [ssh-keygen.c] Don't fail in do_gen_all_hostkeys on platforms + that don't support ECC. Patch from Phil Oleson + +20111219 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/12/02 00:41:56 + [mux.c] + fix bz#1948: ssh -f doesn't fork for multiplexed connection. + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/02 00:43:57 + [mac.c] + fix bz#1934: newer OpenSSL versions will require HMAC_CTX_Init before + HMAC_init (this change in policy seems insane to me) + ok dtucker@ + - djm@cvs.openbsd.org 2011/12/04 23:16:12 + [mux.c] + revert: + > revision 1.32 + > date: 2011/12/02 00:41:56; author: djm; state: Exp; lines: +4 -1 + > fix bz#1948: ssh -f doesn't fork for multiplexed connection. + > ok dtucker@ + it interacts badly with ControlPersist + - djm@cvs.openbsd.org 2011/12/07 05:44:38 + [auth2.c dh.c packet.c roaming.h roaming_client.c roaming_common.c] + fix some harmless and/or unreachable int overflows; + reported Xi Wang, ok markus@ + +20111125 + - OpenBSD CVS Sync + - oga@cvs.openbsd.org 2011/11/16 12:24:28 + [sftp.c] + Don't leak list in complete_cmd_parse if there are no commands found. + Discovered when I was ``borrowing'' this code for something else. + ok djm@ + +20111121 + - (dtucker) [configure.ac] Set _FORTIFY_SOURCE. ok djm@ + +20111104 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/10/18 05:15:28 + [ssh.c] + ssh(1): skip attempting to create ~/.ssh when -F is passed; ok markus@ + - djm@cvs.openbsd.org 2011/10/18 23:37:42 + [ssh-add.c] + add -k to usage(); reminded by jmc@ + - djm@cvs.openbsd.org 2011/10/19 00:06:10 + [moduli.c] + s/tmpfile/tmp/ to make this -Wshadow clean + - djm@cvs.openbsd.org 2011/10/19 10:39:48 + [umac.c] + typo in comment; patch from Michael W. Bombardieri + - djm@cvs.openbsd.org 2011/10/24 02:10:46 + [ssh.c] + bz#1943: unbreak stdio forwarding when ControlPersist is in user - ssh + was incorrectly requesting the forward in both the control master and + slave. skip requesting it in the master to fix. ok markus@ + - djm@cvs.openbsd.org 2011/10/24 02:13:13 + [session.c] + bz#1859: send tty break to pty master instead of (probably already + closed) slave side; "looks good" markus@ + - dtucker@cvs.openbsd.org 011/11/04 00:09:39 + [moduli] + regenerated moduli file; ok deraadt + - (dtucker) [INSTALL LICENCE configure.ac openbsd-compat/Makefile.in + openbsd-compat/getrrsetbyname-ldns.c openbsd-compat/getrrsetbyname.c] + bz 1320: Add optional support for LDNS, a BSD licensed DNS resolver library + which supports DNSSEC. Patch from Simon Vallet (svallet at genoscope cns fr) + with some rework from myself and djm. ok djm. + +20111025 + - (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file + fails. Patch from Corinna Vinschen. + +20111018 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/10/04 14:17:32 + [sftp-glob.c] + silence error spam for "ls */foo" in directory with files; bz#1683 + - dtucker@cvs.openbsd.org 2011/10/16 11:02:46 + [moduli.c ssh-keygen.1 ssh-keygen.c] + Add optional checkpoints for moduli screening. feedback & ok deraadt + - jmc@cvs.openbsd.org 2011/10/16 15:02:41 + [ssh-keygen.c] + put -K in the right place (usage()); + - stsp@cvs.openbsd.org 2011/10/16 15:51:39 + [moduli.c] + add missing includes to unbreak tree; fix from rpointel + - djm@cvs.openbsd.org 2011/10/18 04:58:26 + [auth-options.c key.c] + remove explict search for \0 in packet strings, this job is now done + implicitly by buffer_get_cstring; ok markus + - djm@cvs.openbsd.org 2011/10/18 05:00:48 + [ssh-add.1 ssh-add.c] + new "ssh-add -k" option to load plain keys (skipping certificates); + "looks ok" markus@ + +20111001 + - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2011/09/23 00:22:04 + [channels.c auth-options.c servconf.c channels.h sshd.8] + Add wildcard support to PermitOpen, allowing things like "PermitOpen + localhost:*". bz #1857, ok djm markus. + - markus@cvs.openbsd.org 2011/09/23 07:45:05 + [mux.c readconf.h channels.h compat.h compat.c ssh.c readconf.c channels.c + version.h] + unbreak remote portforwarding with dynamic allocated listen ports: + 1) send the actual listen port in the open message (instead of 0). + this allows multiple forwardings with a dynamic listen port + 2) update the matching permit-open entry, so we can identify where + to connect to + report: den at skbkontur.ru and P. Szczygielski + feedback and ok djm@ + - djm@cvs.openbsd.org 2011/09/25 05:44:47 + [auth2-pubkey.c] + improve the AuthorizedPrincipalsFile debug log message to include + file and line number + - dtucker@cvs.openbsd.org 2011/09/30 00:47:37 + [sshd.c] + don't attempt privsep cleanup when not using privsep; ok markus@ + - djm@cvs.openbsd.org 2011/09/30 21:22:49 + [sshd.c] + fix inverted test that caused logspam; spotted by henning@ + +20110929 + - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch + from des AT des.no + - (dtucker) [configure.ac openbsd-compat/Makefile.in + openbsd-compat/strnlen.c] Add strnlen to the compat library. + +20110923 + - (djm) [openbsd-compat/getcwd.c] Remove OpenBSD rcsid marker since we no + longer want to sync this file (OpenBSD uses a __getcwd syscall now, we + want this longhand version) + - (djm) [openbsd-compat/getgrouplist.c] Remove OpenBSD rcsid marker: the + upstream version is YPified and we don't want this + - (djm) [openbsd-compat/mktemp.c] forklift upgrade to -current version. + The file was totally rewritten between what we had in tree and -current. + - (djm) [openbsd-compat/sha2.c openbsd-compat/sha2.h] Remove OpenBSD rcsid + marker. The upstream API has changed (function and structure names) + enough to put it out of sync with other providers of this interface. + - (djm) [openbsd-compat/setenv.c] Forklift upgrade, including inclusion + of static __findenv() function from upstream setenv.c + - OpenBSD CVS Sync + - millert@cvs.openbsd.org 2006/05/05 15:27:38 + [openbsd-compat/strlcpy.c] + Convert do {} while loop -> while {} for clarity. No binary change + on most architectures. From Oliver Smith. OK deraadt@ and henning@ + - tobias@cvs.openbsd.org 2007/10/21 11:09:30 + [openbsd-compat/mktemp.c] + Comment fix about time consumption of _gettemp. + FreeBSD did this in revision 1.20. + OK deraadt@, krw@ + - deraadt@cvs.openbsd.org 2008/07/22 21:47:45 + [openbsd-compat/mktemp.c] + use arc4random_uniform(); ok djm millert + - millert@cvs.openbsd.org 2008/08/21 16:54:44 + [openbsd-compat/mktemp.c] + Remove useless code, the kernel will set errno appropriately if an + element in the path does not exist. OK deraadt@ pvalchev@ + - otto@cvs.openbsd.org 2008/12/09 19:38:38 + [openbsd-compat/inet_ntop.c] + fix inet_ntop(3) prototype; ok millert@ libc to be bumbed very soon + +20110922 + - OpenBSD CVS Sync + - pyr@cvs.openbsd.org 2011/05/12 07:15:10 + [openbsd-compat/glob.c] + When the max number of items for a directory has reached GLOB_LIMIT_READDIR + an error is returned but closedir() is not called. + spotted and fix provided by Frank Denis obsd-tech@pureftpd.org + ok otto@, millert@ + - stsp@cvs.openbsd.org 2011/09/20 10:18:46 + [glob.c] + In glob(3), limit recursion during matching attempts. Similar to + fnmatch fix. Also collapse consecutive '*' (from NetBSD). + ok miod deraadt + - djm@cvs.openbsd.org 2011/09/22 06:27:29 + [glob.c] + fix GLOB_KEEPSTAT without GLOB_NOSORT; the implicit sort was being + applied only to the gl_pathv vector and not the corresponding gl_statv + array. reported in OpenSSH bz#1935; feedback and okay matthew@ + - djm@cvs.openbsd.org 2011/08/26 01:45:15 + [ssh.1] + Add some missing ssh_config(5) options that can be used in ssh(1)'s + -o argument. Patch from duclare AT guu.fi + - djm@cvs.openbsd.org 2011/09/05 05:56:13 + [scp.1 sftp.1] + mention ControlPersist and KbdInteractiveAuthentication in the -o + verbiage in these pages too (prompted by jmc@) + - djm@cvs.openbsd.org 2011/09/05 05:59:08 + [misc.c] + fix typo in IPQoS parsing: there is no "AF14" class, but there is + an "AF21" class. Spotted by giesen AT snickers.org; ok markus stevesk + - jmc@cvs.openbsd.org 2011/09/05 07:01:44 + [scp.1] + knock out a useless Ns; + - deraadt@cvs.openbsd.org 2011/09/07 02:18:31 + [ssh-keygen.1] + typo (they vs the) found by Lawrence Teo + - djm@cvs.openbsd.org 2011/09/09 00:43:00 + [ssh_config.5 sshd_config.5] + fix typo in IPQoS parsing: there is no "AF14" class, but there is + an "AF21" class. Spotted by giesen AT snickers.org; ok markus stevesk + - djm@cvs.openbsd.org 2011/09/09 00:44:07 + [PROTOCOL.mux] + MUX_C_CLOSE_FWD includes forward type in message (though it isn't + implemented anyway) + - djm@cvs.openbsd.org 2011/09/09 22:37:01 + [scp.c] + suppress adding '--' to remote commandlines when the first argument + does not start with '-'. saves breakage on some difficult-to-upgrade + embedded/router platforms; feedback & ok dtucker ok markus + - djm@cvs.openbsd.org 2011/09/09 22:38:21 + [sshd.c] + kill the preauth privsep child on fatal errors in the monitor; + ok markus@ + - djm@cvs.openbsd.org 2011/09/09 22:46:44 + [channels.c channels.h clientloop.h mux.c ssh.c] + support for cancelling local and remote port forwards via the multiplex + socket. Use ssh -O cancel -L xx:xx:xx -R yy:yy:yy user@host" to request + the cancellation of the specified forwardings; ok markus@ + - markus@cvs.openbsd.org 2011/09/10 22:26:34 + [channels.c channels.h clientloop.c ssh.1] + support cancellation of local/dynamic forwardings from ~C commandline; + ok & feedback djm@ + - okan@cvs.openbsd.org 2011/09/11 06:59:05 + [ssh.1] + document new -O cancel command; ok djm@ + - markus@cvs.openbsd.org 2011/09/11 16:07:26 + [sftp-client.c] + fix leaks in do_hardlink() and do_readlink(); bz#1921 + from Loganaden Velvindron + - markus@cvs.openbsd.org 2011/09/12 08:46:15 + [sftp-client.c] + fix leak in do_lsreaddir(); ok djm + - djm@cvs.openbsd.org 2011/09/22 06:29:03 + [sftp.c] + don't let remote_glob() implicitly sort its results in do_globbed_ls() - + in all likelihood, they will be resorted anyway + +20110909 + - (dtucker) [entropy.h] Bug #1932: remove old definition of init_rng. From + Colin Watson. + 20110906 - (djm) [README version.h] Correct version - (djm) [contrib/redhat/openssh.spec] Correct restorcon => restorecon Modified: head/crypto/openssh/INSTALL ============================================================================== --- head/crypto/openssh/INSTALL Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/INSTALL Mon Sep 3 16:51:41 2012 (r240075) @@ -80,6 +80,12 @@ these multi-platform ports: http://www.thrysoee.dk/editline/ http://sourceforge.net/projects/libedit/ +LDNS: + +LDNS is a DNS BSD-licensed resolver library which supports DNSSEC. + +http://nlnetlabs.nl/projects/ldns/ + Autoconf: If you modify configure.ac or configure doesn't exist (eg if you checked @@ -260,4 +266,4 @@ Please refer to the "reporting bugs" sec http://www.openssh.com/ -$Id: INSTALL,v 1.86 2011/05/05 03:48:37 djm Exp $ +$Id: INSTALL,v 1.87 2011/11/04 00:25:25 dtucker Exp $ Modified: head/crypto/openssh/LICENCE ============================================================================== --- head/crypto/openssh/LICENCE Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/LICENCE Mon Sep 3 16:51:41 2012 (r240075) @@ -207,6 +207,7 @@ OpenSSH contains no GPL code. The SCO Group Daniel Walsh Red Hat, Inc + Simon Vallet / Genoscope * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/crypto/openssh/PROTOCOL.certkeys ============================================================================== --- head/crypto/openssh/PROTOCOL.certkeys Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/PROTOCOL.certkeys Mon Sep 3 16:51:41 2012 (r240075) @@ -162,6 +162,13 @@ extensions is a set of zero or more opti are not critical, and an implementation that encounters one that it does not recognise may safely ignore it. +Generally, critical options are used to control features that restrict +access where extensions are used to enable features that grant access. +This ensures that certificates containing unknown restrictions do not +inadvertently grant access while allowing new protocol features to be +enabled via extensions without breaking certificates' backwards +compatibility. + The reserved field is currently unused and is ignored in this version of the protocol. @@ -189,7 +196,7 @@ is a sequence of zero or more tuples: string data Options must be lexically ordered by "name" if they appear in the -sequence. +sequence. Each named option may only appear once in a certificate. The name field identifies the option and the data field encodes option-specific information (see below). All options are @@ -220,7 +227,9 @@ Extensions The extensions section of the certificate specifies zero or more non-critical certificate extensions. The encoding and ordering of -extensions in this field is identical to that of the critical options. +extensions in this field is identical to that of the critical options, +as is the requirement that each name appear only once. + If an implementation does not recognise an extension, then it should ignore it. @@ -253,4 +262,4 @@ permit-user-rc empty Fl of this script will not be permitted if this option is not present. -$OpenBSD: PROTOCOL.certkeys,v 1.8 2010/08/31 11:54:45 djm Exp $ +$OpenBSD: PROTOCOL.certkeys,v 1.9 2012/03/28 07:23:22 djm Exp $ Modified: head/crypto/openssh/PROTOCOL.mux ============================================================================== --- head/crypto/openssh/PROTOCOL.mux Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/PROTOCOL.mux Mon Sep 3 16:51:41 2012 (r240075) @@ -110,9 +110,9 @@ A client may request the master to estab uint32 request id uint32 forwarding type string listen host - string listen port + uint32 listen port string connect host - string connect port + uint32 connect port forwarding type may be MUX_FWD_LOCAL, MUX_FWD_REMOTE, MUX_FWD_DYNAMIC. @@ -133,10 +133,11 @@ A client may request the master to close uint32 MUX_C_CLOSE_FWD uint32 request id + uint32 forwarding type string listen host - string listen port + uint32 listen port string connect host - string connect port + uint32 connect port A server may reply with a MUX_S_OK, a MUX_S_PERMISSION_DENIED or a MUX_S_FAILURE. @@ -218,4 +219,4 @@ XXX inject packet (what about replies) XXX server->client error/warning notifications XXX send signals via mux -$OpenBSD: PROTOCOL.mux,v 1.7 2011/05/08 12:52:01 djm Exp $ +$OpenBSD: PROTOCOL.mux,v 1.9 2012/06/01 00:49:35 djm Exp $ Modified: head/crypto/openssh/README ============================================================================== --- head/crypto/openssh/README Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/README Mon Sep 3 16:51:41 2012 (r240075) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-5.9 for the release notes. +See http://www.openssh.com/txt/release-6.1 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.77.2.2 2011/09/06 23:11:20 djm Exp $ +$Id: README,v 1.81 2012/08/22 11:57:13 djm Exp $ Modified: head/crypto/openssh/addrmatch.c ============================================================================== --- head/crypto/openssh/addrmatch.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/addrmatch.c Mon Sep 3 16:51:41 2012 (r240075) @@ -1,4 +1,4 @@ -/* $OpenBSD: addrmatch.c,v 1.5 2010/02/26 20:29:54 djm Exp $ */ +/* $OpenBSD: addrmatch.c,v 1.6 2012/06/21 00:16:07 dtucker Exp $ */ /* * Copyright (c) 2004-2008 Damien Miller @@ -318,7 +318,7 @@ addr_pton_cidr(const char *p, struct xad char addrbuf[64], *mp, *cp; /* Don't modify argument */ - if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) > sizeof(addrbuf)) + if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) >= sizeof(addrbuf)) return -1; if ((mp = strchr(addrbuf, '/')) != NULL) { Modified: head/crypto/openssh/audit-bsm.c ============================================================================== --- head/crypto/openssh/audit-bsm.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/audit-bsm.c Mon Sep 3 16:51:41 2012 (r240075) @@ -1,4 +1,4 @@ -/* $Id: audit-bsm.c,v 1.7 2011/01/17 10:15:29 dtucker Exp $ */ +/* $Id: audit-bsm.c,v 1.8 2012/02/23 23:40:43 dtucker Exp $ */ /* * TODO @@ -45,6 +45,10 @@ #include #include +#ifdef BROKEN_BSM_API +#include +#endif + #include "ssh.h" #include "log.h" #include "key.h" @@ -114,6 +118,12 @@ extern int aug_daemon_session(void); extern Authctxt *the_authctxt; static AuditInfoTermID ssh_bsm_tid; +#ifdef BROKEN_BSM_API +/* For some reason this constant is no longer defined + in Solaris 11. */ +#define BSM_TEXTBUFSZ 256 +#endif + /* Below is the low-level BSM interface code */ /* @@ -161,6 +171,65 @@ aug_get_machine(char *host, u_int32_t *a } #endif +#ifdef BROKEN_BSM_API +/* + In Solaris 11 the audit daemon has been moved to SMF. In the process + they simply dropped getacna() from the API, since it read from a now + non-existent config file. This function re-implements getacna() to + read from the SMF repository instead. + */ +int +getacna(char *auditstring, int len) +{ + scf_handle_t *handle = NULL; + scf_property_t *property = NULL; + scf_value_t *value = NULL; + int ret = 0; + + handle = scf_handle_create(SCF_VERSION); + if (handle == NULL) + return -2; /* The man page for getacna on Solaris 10 states + we should return -2 in case of error and set + errno to indicate the error. We don't bother + with errno here, though, since the only use + of this function below doesn't check for errors + anyway. + */ + + ret = scf_handle_bind(handle); + if (ret == -1) + return -2; + + property = scf_property_create(handle); + if (property == NULL) + return -2; + + ret = scf_handle_decode_fmri(handle, + "svc:/system/auditd:default/:properties/preselection/naflags", + NULL, NULL, NULL, NULL, property, 0); + if (ret == -1) + return -2; + + value = scf_value_create(handle); + if (value == NULL) + return -2; + + ret = scf_property_get_value(property, value); + if (ret == -1) + return -2; + + ret = scf_value_get_astring(value, auditstring, len); + if (ret == -1) + return -2; + + scf_value_destroy(value); + scf_property_destroy(property); + scf_handle_destroy(handle); + + return 0; +} +#endif + /* * Check if the specified event is selected (enabled) for auditing. * Returns 1 if the event is selected, 0 if not and -1 on failure. @@ -213,7 +282,15 @@ bsm_audit_record(int typ, char *string, (void) au_write(ad, au_to_text(string)); (void) au_write(ad, AUToReturnFunc(typ, rc)); +#ifdef BROKEN_BSM_API + /* The last argument is the event modifier flags. For + some seemingly undocumented reason it was added in + Solaris 11. */ + rc = au_close(ad, AU_TO_WRITE, event_no, 0); +#else rc = au_close(ad, AU_TO_WRITE, event_no); +#endif + if (rc < 0) error("BSM audit: %s failed to write \"%s\" record: %s", __func__, string, strerror(errno)); Modified: head/crypto/openssh/auth-krb5.c ============================================================================== --- head/crypto/openssh/auth-krb5.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/auth-krb5.c Mon Sep 3 16:51:41 2012 (r240075) @@ -226,7 +226,7 @@ krb5_cleanup_proc(Authctxt *authctxt) #ifndef HEIMDAL krb5_error_code ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) { - int tmpfd, ret; + int tmpfd, ret, oerrno; char ccname[40]; mode_t old_umask; @@ -237,16 +237,18 @@ ssh_krb5_cc_gen(krb5_context ctx, krb5_c old_umask = umask(0177); tmpfd = mkstemp(ccname + strlen("FILE:")); + oerrno = errno; umask(old_umask); if (tmpfd == -1) { - logit("mkstemp(): %.100s", strerror(errno)); - return errno; + logit("mkstemp(): %.100s", strerror(oerrno)); + return oerrno; } if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) { - logit("fchmod(): %.100s", strerror(errno)); + oerrno = errno; + logit("fchmod(): %.100s", strerror(oerrno)); close(tmpfd); - return errno; + return oerrno; } close(tmpfd); Modified: head/crypto/openssh/auth-options.c ============================================================================== --- head/crypto/openssh/auth-options.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/auth-options.c Mon Sep 3 16:51:41 2012 (r240075) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.54 2010/12/24 21:41:48 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.56 2011/10/18 04:58:26 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -341,7 +341,7 @@ auth_parse_options(struct passwd *pw, ch goto bad_option; } host = cleanhostname(host); - if (p == NULL || (port = a2port(p)) <= 0) { + if (p == NULL || (port = permitopen_port(p)) < 0) { debug("%.100s, line %lu: Bad permitopen port " "<%.100s>", file, linenum, p ? p : ""); auth_debug_add("%.100s, line %lu: " @@ -452,10 +452,6 @@ parse_option_list(u_char *optblob, size_ buffer_append(&data, data_blob, dlen); debug3("found certificate option \"%.100s\" len %u", name, dlen); - if (strlen(name) != nlen) { - error("Certificate constraint name contains \\0"); - goto out; - } found = 0; if ((which & OPTIONS_EXTENSIONS) != 0) { if (strcmp(name, "permit-X11-forwarding") == 0) { @@ -485,11 +481,6 @@ parse_option_list(u_char *optblob, size_ "corrupt", name); goto out; } - if (strlen(command) != clen) { - error("force-command constraint " - "contains \\0"); - goto out; - } if (*cert_forced_command != NULL) { error("Certificate has multiple " "force-command options"); @@ -506,11 +497,6 @@ parse_option_list(u_char *optblob, size_ "\"%s\" corrupt", name); goto out; } - if (strlen(allowed) != clen) { - error("source-address constraint " - "contains \\0"); - goto out; - } if ((*cert_source_address_done)++) { error("Certificate has multiple " "source-address options"); Modified: head/crypto/openssh/auth-passwd.c ============================================================================== --- head/crypto/openssh/auth-passwd.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/auth-passwd.c Mon Sep 3 16:51:41 2012 (r240075) @@ -209,6 +209,7 @@ sys_auth_passwd(Authctxt *authctxt, cons * Authentication is accepted if the encrypted passwords * are identical. */ - return (strcmp(encrypted_password, pw_password) == 0); + return encrypted_password != NULL && + strcmp(encrypted_password, pw_password) == 0; } #endif Modified: head/crypto/openssh/auth.c ============================================================================== --- head/crypto/openssh/auth.c Mon Sep 3 15:22:02 2012 (r240074) +++ head/crypto/openssh/auth.c Mon Sep 3 16:51:41 2012 (r240075) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ +/* $OpenBSD: auth.c,v 1.96 2012/05/13 01:42:32 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -358,7 +358,8 @@ expand_authorized_keys(const char *filen char * authorized_principals_file(struct passwd *pw) { - if (options.authorized_principals_file == NULL) + if (options.authorized_principals_file == NULL || + strcasecmp(options.authorized_principals_file, "none") == 0) return NULL; return expand_authorized_keys(options.authorized_principals_file, pw); } @@ -545,9 +546,10 @@ getpwnamallow(const char *user) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 17:02:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24ACB106566C; Mon, 3 Sep 2012 17:02:15 +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 72ED18FC12; Mon, 3 Sep 2012 17:02:13 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q83H2L1X072905; Mon, 3 Sep 2012 20:02:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q83H287p034303; Mon, 3 Sep 2012 20:02:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q83H28TT034302; Mon, 3 Sep 2012 20:02:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 3 Sep 2012 20:02:08 +0300 From: Konstantin Belousov To: mdf@freebsd.org Message-ID: <20120903170208.GQ33100@deviant.kiev.zoral.com.ua> References: <201209030852.q838q6lC053405@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xLhNcw00gEcfFoIE" Content-Disposition: inline In-Reply-To: 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 17:02:15 -0000 --xLhNcw00gEcfFoIE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 03, 2012 at 09:09:08AM -0700, mdf@freebsd.org wrote: > On Mon, Sep 3, 2012 at 1:52 AM, Aleksandr Rybalko wrote: > > Author: ray > > Date: Mon Sep 3 08:52:05 2012 > > New Revision: 240067 > > URL: http://svn.freebsd.org/changeset/base/240067 > > > > Log: > > Add kern.hintmode sysctl variable to show current state of hints: > > 0 - loader hints in environment only; > > 1 - static hints only > > 2 - fallback mode (Dynamic KENV with fallback to kernel environment) > > Add kern.hintmode write handler, accept only value 2. That will switch > > static KENV to dynamic. So it will be possible to change device hints. > > > > Approved by: adrian (mentor) > > > > Modified: > > head/sys/kern/subr_hints.c > > > > Modified: head/sys/kern/subr_hints.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/kern/subr_hints.c Mon Sep 3 07:18:24 2012 (r24006= 6) > > +++ head/sys/kern/subr_hints.c Mon Sep 3 08:52:05 2012 (r24006= 7) > > @@ -29,8 +29,10 @@ __FBSDID("$FreeBSD$"); > > > > #include > > #include > > +#include > > #include > > #include > > +#include >=20 > Putting on my style-nazi hat. sysctl comes before systm alphabetically. Systm.h is very special, it normally comes as the second item in the include list, right after param.h. --xLhNcw00gEcfFoIE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBE4o8ACgkQC3+MBN1Mb4iZlACg6lqUQVLihrkHcVsiKwpshl49 5oQAn3HCfbwiU3OQiIKc3gdFP7uF77OS =niOP -----END PGP SIGNATURE----- --xLhNcw00gEcfFoIE-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 17:26:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2D331065674; Mon, 3 Sep 2012 17:26:20 +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 AD2428FC18; Mon, 3 Sep 2012 17:26:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83HQKc7018373; Mon, 3 Sep 2012 17:26:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83HQKWJ018371; Mon, 3 Sep 2012 17:26:20 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209031726.q83HQKWJ018371@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 3 Sep 2012 17:26: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: r240076 - head/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 17:26:20 -0000 Author: trasz Date: Mon Sep 3 17:26:20 2012 New Revision: 240076 URL: http://svn.freebsd.org/changeset/base/240076 Log: Fix compact form of "synchronize" permission in setfacl(1) manual page - it should be "s", not "S". PR: docs/162380 MFC after: 2 weeks Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 ============================================================================== --- head/bin/setfacl/setfacl.1 Mon Sep 3 16:51:41 2012 (r240075) +++ head/bin/setfacl/setfacl.1 Mon Sep 3 17:26:20 2012 (r240076) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2011 +.Dd September 2, 2012 .Dt SETFACL 1 .Os .Sh NAME @@ -337,7 +337,7 @@ read_acl write_acl .It o write_owner -.It S +.It s synchronize .El .Pp From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 18:17:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFE8F106567A; Mon, 3 Sep 2012 18:17:21 +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 9AF8D8FC1D; Mon, 3 Sep 2012 18:17:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83IHLkj024104; Mon, 3 Sep 2012 18:17:21 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83IHL47024102; Mon, 3 Sep 2012 18:17:21 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209031817.q83IHL47024102@svn.freebsd.org> From: Glen Barber Date: Mon, 3 Sep 2012 18:17: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: r240077 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2012 18:17:21 -0000 Author: gjb (doc,ports committer) Date: Mon Sep 3 18:17:21 2012 New Revision: 240077 URL: http://svn.freebsd.org/changeset/base/240077 Log: Fix 'distributeworld' target when WITHOUT_GAMES is set. Reviewed by: des Approved by: des MFC after: 3 days X-MFC-To: 9-only Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Sep 3 17:26:20 2012 (r240076) +++ head/Makefile.inc1 Mon Sep 3 18:17:21 2012 (r240077) @@ -636,7 +636,10 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod # # Non-base distributions produced by the base system -EXTRA_DISTRIBUTIONS= doc games +EXTRA_DISTRIBUTIONS= doc +.if ${MK_GAMES} != "no" +EXTRA_DISTRIBUTIONS+= games +.endif .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 18:21:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F8E3106564A; Mon, 3 Sep 2012 18:21:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id 13EEE8FC18; Mon, 3 Sep 2012 18:21:04 +0000 (UTC) Received: from glenbarber.us (75.97.141.105.res-cmts.sewb.ptd.net [75.97.141.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id 1F19923F645; Mon, 3 Sep 2012 14:21:02 -0400 (EDT) Date: Mon, 3 Sep 2012 14:21:01 -0400 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120903182101.GC1290@glenbarber.us> References: <201209031817.q83IHL47024102@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WfZ7S8PLGjBY9Voh" Content-Disposition: inline In-Reply-To: <201209031817.q83IHL47024102@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r240077 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2012 18:21:04 -0000 --WfZ7S8PLGjBY9Voh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 03, 2012 at 06:17:21PM +0000, Glen Barber wrote: > Author: gjb (doc,ports committer) > Date: Mon Sep 3 18:17:21 2012 > New Revision: 240077 > URL: http://svn.freebsd.org/changeset/base/240077 >=20 > Log: > Fix 'distributeworld' target when WITHOUT_GAMES is set. > =20 > Reviewed by: des Also reviewed by gcooper on -hackers. Glen --WfZ7S8PLGjBY9Voh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQRPUNAAoJEFJPDDeguUajTa4IAKCEQjmMI30L9aco3B/KWbq4 njVc/QvYcZExcxvjinOJWmy2VR6zzGtGt6dTDAlE+dk9ZhD2iErpLONvBlKDSw/U 5ixsDfBLoI122IsVv/pu3FXMos3sYArlnFjkHom2cmNUDNcvoe2lz6j3UsWyqX1T lNPzbvSZWoi5Cl8prxpGHnnIieFp9C/VIxgw+7xtfpZt6hfvkRaBL2kMTxNQHhqo O+IK7K+aFvnaQCNkKP3av+pKjeuJbYRph8BlQuN2PRMyDCcTgbGEzOVli1f/wkMi h/oYETLN3INfiN/qfEWzc/VAJVgGhsOvnFrBFdhcYZs2FfDatpFPz1gYXfujC5k= =9Wqy -----END PGP SIGNATURE----- --WfZ7S8PLGjBY9Voh-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 19:17:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EBC8106566C; Mon, 3 Sep 2012 19:17:26 +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 88E528FC1A; Mon, 3 Sep 2012 19:17:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q83JHQg3031237; Mon, 3 Sep 2012 19:17:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q83JHQWw031235; Mon, 3 Sep 2012 19:17:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209031917.q83JHQWw031235@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 3 Sep 2012 19:17: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: r240078 - head/sys/dev/sound/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 03 Sep 2012 19:17:26 -0000 Author: hselasky Date: Mon Sep 3 19:17:25 2012 New Revision: 240078 URL: http://svn.freebsd.org/changeset/base/240078 Log: Add required USB AUDIO v2.0 structure definitions. PR: misc/171254 Modified: head/sys/dev/sound/usb/uaudioreg.h Modified: head/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- head/sys/dev/sound/usb/uaudioreg.h Mon Sep 3 18:17:21 2012 (r240077) +++ head/sys/dev/sound/usb/uaudioreg.h Mon Sep 3 19:17:25 2012 (r240078) @@ -31,8 +31,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define UAUDIO_VERSION 0x100 +#ifndef _UAUDIOREG_H_ +#define _UAUDIOREG_H_ +#define UAUDIO_VERSION 0x0100 +#define UAUDIO_VERSION_20 0x0200 + +#define UAUDIO_PROTOCOL_20 0x20 + +#define UDESC_CS_UNDEFINED 0x20 +#define UDESC_CS_DEVICE 0x21 #define UDESC_CS_CONFIG 0x22 #define UDESC_CS_STRING 0x23 #define UDESC_CS_INTERFACE 0x24 @@ -46,6 +54,14 @@ #define UDESCSUB_AC_FEATURE 6 #define UDESCSUB_AC_PROCESSING 7 #define UDESCSUB_AC_EXTENSION 8 +/* ==== USB audio 2.0 ==== */ +#define UDESCSUB_AC_EFFECT 7 +#define UDESCSUB_AC_PROCESSING_V2 8 +#define UDESCSUB_AC_EXTENSION_V2 9 +#define UDESCSUB_AC_CLOCK_SRC 10 +#define UDESCSUB_AC_CLOCK_SEL 11 +#define UDESCSUB_AC_CLOCK_MUL 12 +#define UDESCSUB_AC_SAMPLE_RT 13 /* These macros check if the endpoint descriptor has additional fields */ #define UEP_MINSIZE 7 @@ -250,6 +266,7 @@ struct usb_audio_extension_unit_0 { uByte baSourceId[0]; /* [bNrInPins] */ /* struct usb_audio_extension_unit_1 */ } __packed; + struct usb_audio_extension_unit_1 { uByte bNrChannels; uWord wChannelConfig; @@ -348,6 +365,13 @@ struct usb_audio_extension_unit_1 { #define DELAY_CONTROL 0x08 #define BASS_BOOST_CONTROL 0x09 #define LOUDNESS_CONTROL 0x0a +/* ==== USB audio 2.0 ==== */ +#define INPUT_GAIN_CONTROL 0x0b +#define INPUT_GAIN_PAD_CONTROL 0x0c +#define PHASE_INVERTER_CONTROL 0x0d +#define UNDERFLOW_CONTROL 0x0e +#define OVERFLOW_CONTROL 0x0f +#define LATENCY_CONTROL 0x10 #define FU_MASK(u) (1 << ((u)-1)) @@ -356,6 +380,9 @@ struct usb_audio_extension_unit_1 { #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 +/* ==== USB audio 2.0 ==== */ +#define FORMAT_ENCODER 3 +#define FORMAT_DECODER 4 #define UA_FMT_PCM 1 #define UA_FMT_PCM8 2 @@ -402,3 +429,369 @@ struct usb_audio_extension_unit_1 { #define DR_THRESHOLD_CONTROL 4 #define DR_ATTACK_TIME_CONTROL 5 #define DR_RELEASE_TIME_CONTROL 6 + +/*------------------------------------------------------------------------* + * USB audio v2.0 definitions + *------------------------------------------------------------------------*/ + +struct usb_audio20_as_iface_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bTerminalLink; + uByte bmControls; + uByte bFormatType; + uDWord bmFormats; + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; +} __packed; + +struct usb_audio20_encoder_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bEncoderID; + uByte bEncoder; + uDWord bmControls; + uByte iParam1; + uByte iParam2; + uByte iParam3; + uByte iParam4; + uByte iParam5; + uByte iParam6; + uByte iParam7; + uByte iParam8; + uByte iEncoder; +} __packed; + +struct usb_audio20_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bmAttributes; +#define UA20_MPS_ONLY 0x80 + uByte bmControls; +#define UA20_PITCH_CONTROL_MASK 0x03 +#define UA20_DATA_OVERRUN_MASK 0x0C +#define UA20_DATA_UNDERRUN_MASK 0x30 + uByte bLockDelayUnits; + uWord wLockDelay; +} __packed; + +struct usb_audio20_feedback_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bEndpointAddress; + uByte bmAttributes; + uWord wMaxPacketSize; + uByte bInterval; +} __packed; + +#define UA20_GET_CUR 0x81 +#define UA20_SET_CUR 0x01 +#define UA20_GET_RANGE 0x82 +#define UA20_SET_RANGE 0x02 +#define UA20_GET_MEM 0x83 +#define UA20_SET_MEM 0x03 + +struct usb_audio20_cur1_parameter { + uByte bCur; +} __packed; + +struct usb_audio20_ctl1_range_sub { + uByte bMIN; + uByte bMAX; + uByte bRES; +} __packed; + +struct usb_audio20_ctl1_range { + uWord wNumSubRanges; + struct usb_audio20_ctl1_range_sub sub[1]; +} __packed; + +struct usb_audio20_cur2_parameter { + uWord wCur; +} __packed; + +struct usb_audio20_ctl2_range_sub { + uWord wMIN; + uWord wMAX; + uWord wRES; +} __packed; + +struct usb_audio20_ctl2_range { + uWord wNumSubRanges; + struct usb_audio20_ctl2_range_sub sub[1]; +} __packed; + +struct usb_audio20_cur4_parameter { + uDWord dCur; +} __packed; + +struct usb_audio20_ctl4_range_sub { + uDWord dMIN; + uDWord dMAX; + uDWord dRES; +} __packed; + +struct usb_audio20_ctl4_range { + uWord wNumSubRanges; + struct usb_audio20_ctl4_range_sub sub[1]; +} __packed; + +struct usb_audio20_cc_cluster_descriptor { + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; +} __packed; + +struct usb_audio20_streaming_type1_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bFormatType; + uByte bSubslotSize; + uByte bBitResolution; +} __packed; + +#define UA20_EERROR_NONE 0 +#define UA20_EERROR_MEMORY 1 +#define UA20_EERROR_BANDWIDTH 2 +#define UA20_EERROR_CPU 3 +#define UA20_EERROR_FORMATFR_ER 4 +#define UA20_EERROR_FORMATFR_SM 5 +#define UA20_EERROR_FORMATFR_LG 6 +#define UA20_EERROR_DATAFORMAT 7 +#define UA20_EERROR_NUMCHANNELS 8 +#define UA20_EERROR_SAMPLERATE 9 +#define UA20_EERROR_BITRATE 10 +#define UA20_EERROR_PARAM 11 +#define UA20_EERROR_NREADY 12 +#define UA20_EERROR_BUSY 13 + +struct usb_audio20_cc_alt_setting { + uByte bControlSize; + uDWord bmValidAltSettings; +} __packed; + +struct usb_audio20_interrupt_message { + uByte bInfo; + uByte bAttribute; + uDWord wValue; + uDWord wIndex; +} __packed; + +/* UDESCSUB_AC_CLOCK_SRC */ +struct usb_audio20_clock_source_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bClockId; + uByte bmAttributes; + uByte bmControls; + uByte bAssocTerminal; + uByte iClockSource; +} __packed; + +/* UDESCSUB_AC_CLOCK_SEL */ +struct usb_audio20_clock_selector_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bClockId; + uByte bNrInPins; +} __packed; + +/* UDESCSUB_AC_CLOCK_MUL */ +struct usb_audio20_clock_multiplier_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bClockId; + uByte bCSourceId; + uByte bmControls; + uByte iClockMultiplier; +} __packed; + +/* UDESCSUB_AC_INPUT */ +struct usb_audio20_input_terminal { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bTerminalId; + uWord wTerminalType; + uByte bAssocTerminal; + uByte bCSourceId; + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iCHannelNames; + uWord bmControls; + uByte iTerminal; +} __packed; + +/* UDESCSUB_AC_OUTPUT */ +struct usb_audio20_output_terminal { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bTerminalId; + uWord wTerminalType; + uByte bAssocTerminal; + uByte bSourceId; + uByte bCSourceId; + uWord bmControls; + uByte iTerminal; +} __packed; + +/* UDESCSUB_AC_MIXER */ +struct usb_audio20_mixer_unit_0 { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uByte bNrInPins; + uByte baSourceId[0]; + /* struct usb_audio20_mixer_unit_1 */ +} __packed; + +struct usb_audio20_mixer_unit_1 { + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; + uByte bmControls[0]; + /* uByte iMixer; */ +} __packed; + +/* UDESCSUB_AC_SELECTOR */ +struct usb_audio20_selector_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uByte bNrInPins; + uByte baSourceId[0]; + /* uByte iSelector; */ +} __packed; + +/* UDESCSUB_AC_FEATURE */ +struct usb_audio20_feature_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uByte bSourceId; + uDWord bmaControls[0]; + /* uByte iFeature; */ +} __packed; + +/* UDESCSUB_AC_SAMPLE_RT */ +struct usb_audio20_sample_rate_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uByte bSourceId; + uByte bSourceInId; + uByte bSourceOutId; + uByte iSrc; +} __packed; + +/* UDESCSUB_AC_EFFECT */ +struct usb_audio20_effect_unit { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uWord wEffectType; + uByte bSourceId; + uDWord bmaControls[0]; + uByte iEffects; +} __packed; + +/* UDESCSUB_AC_PROCESSING_V2 */ +struct usb_audio20_processing_unit_0 { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uWord wProcessType; + uByte bNrInPins; + uByte baSourceId[0]; /* [bNrInPins] */ +} __packed; + +struct usb_audio20_processing_unit_1 { + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; + uWord bmControls; + uByte iProcessing; +} __packed; + +/* UDESCSUB_AC_EXTENSION_V2 */ +struct usb_audio20_extension_unit_0 { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bUnitId; + uWord wExtensionCode; + uByte bNrInPins; + uByte baSourceId[0]; +} __packed; + +struct usb_audio20_extension_unit_1 { + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; + uByte bmControls; + uByte iExtension; +} __packed; + +struct usb_audio20_cluster { + uByte bNrChannels; + uDWord bmChannelConfig; + uByte iChannelNames; +} __packed; + +#define UA20_TF_UNDEFINED 0x00 +#define UA20_TF_DESKTOP_SPEAKER 0x01 +#define UA20_TF_HOME_THEATER 0x02 +#define UA20_TF_MICROPHONE 0x03 +#define UA20_TF_HEADSET 0x04 +#define UA20_TF_TELEPHONE 0x05 +#define UA20_TF_CONVERTER 0x06 +#define UA20_TF_SOUND_RECORDER 0x07 +#define UA20_TF_IO_BOX 0x08 +#define UA20_TF_MUSICAL_INSTRUMENT 0x09 +#define UA20_TF_PRO_AUDIO 0x0A +#define UA20_TF_AV 0x0B +#define UA20_TF_CONTROL_PANEL 0x0C +#define UA20_TF_OTHER 0xFF + +#define UA20_EP_GENERAL 0x01 + +#define UA20_CS_SAM_FREQ_CONTROL 0x01 +#define UA20_CS_CLOCK_VALID_CONTROL 0x02 + +#define UA20_TE_COPY_PROTECT_CONTROL 0x01 +#define UA20_TE_CONNECTOR_CONTROL 0x02 +#define UA20_TE_OVERLOAD_CONTROL 0x03 +#define UA20_TE_CLUSTER_CONTROL 0x04 +#define UA20_TE_UNDERFLOW_CONTROL 0x05 +#define UA20_TE_OVERFLOW_CONTROL 0x06 +#define UA20_TE_LATENCY_CONTROL 0x07 + +#define UA20_MU_MIXER_CONTROL 0x01 +#define UA20_MU_CLUSTER_CONTROL 0x02 +#define UA20_MU_UNDERFLOW_CONTROL 0x03 +#define UA20_MU_OVERFLOW_CONTROL 0x04 +#define UA20_MU_LATENCY_CONTROL 0x05 + +#define UA20_FMT_PCM (1U << 0) +#define UA20_FMT_PCM8 (1U << 1) +#define UA20_FMT_FLOAT (1U << 2) +#define UA20_FMT_ALAW (1U << 3) +#define UA20_FMT_MULAW (1U << 4) +#define UA20_FMT_RAW (1U << 31) + +#endif /* _UAUDIOREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 3 19:29:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8C71065679; Mon, 3 Sep 2012 19:29:12 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF298FC0A; Mon, 3 Sep 2012 19:29:11 +0000 (UTC) Received: by obbun3 with SMTP id un3so12668317obb.13 for ; Mon, 03 Sep 2012 12:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=956sGL9ZIOcIg6tFq3dmfkuXsoqQcDZVGplha3fgWbA=; b=P1NKQqUzQfPILegqY0bHxb5jwccPxS+TdrwL10qDepVLMlj/uYQk7WUMso2cPnWbOz sU9n1B0rFfSTrVjVeyalKYi3fW6HC6P9Mz+4M63G5qoZm/A0SEI4qi46xDx6DU4gkd+d pxNG0N40MpXCv8Tnuq3SMrSfZiwckZERNdcjziwAtyUNYhuyAX+SDqgctEY+PQiHfpO9 XIVnNOkP/AJPV3cAUPuebL9B/0eJYFvulPjjYi2snj/052RJQfIVPN/YhzUvdq/yRmGj /fRDSXgOmdmeatQXy41OH8wPYemgDXGst9Z71EruiSyW6wIms1eMaRl5ZtkaszncMf6u aeZQ== MIME-Version: 1.0 Received: by 10.60.29.164 with SMTP id l4mr15056278oeh.4.1346700545172; Mon, 03 Sep 2012 12:29:05 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Mon, 3 Sep 2012 12:29:05 -0700 (PDT) In-Reply-To: <20120903122352.951b4253.ray@freebsd.org> References: <201209030852.q838q6lC053405@svn.freebsd.org> <20120903122352.951b4253.ray@freebsd.org> Date: Mon, 3 Sep 2012 12:29:05 -0700 Message-ID: From: Garrett Cooper To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240067 - 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: Mon, 03 Sep 2012 19:29:12 -0000 On Mon, Sep 3, 2012 at 2:23 AM, Aleksandr Rybalko wrote: > On Mon, 3 Sep 2012 02:05:15 -0700 > Garrett Cooper wrote: > >>> On Sep 3, 2012, at 1:52 AM, Aleksandr Rybalko wrote: >>> >>> > Author: ray >>> > Date: Mon Sep 3 08:52:05 2012 >>> > New Revision: 240067 >>> > URL: http://svn.freebsd.org/changeset/base/240067 >>> > >>> > Log: >>> > Add kern.hintmode sysctl variable to show current state of hints: >>> > 0 - loader hints in environment only; >>> > 1 - static hints only >>> > 2 - fallback mode (Dynamic KENV with fallback to kernel >>> > environment) Add kern.hintmode write handler, accept only value 2. >>> > That will switch static KENV to dynamic. So it will be possible to >>> > change device hints. >>> >>> ... >>> >>> > + /* Migrate from static to dynamic hints */ >>> > + switch (hintmode) { >>> > + case 0: >>> > + if (dynamic_kenv) >>> > + /* Already here */ >>> > + hintmode = value; /* XXX: Need we switch >>> > or not ? */ >>> > + return (0); >>> >>> ^^^^ typo (missing braces)? ^^^^ > > Ohhh, yeah, testing now. > Thank you! > >>> >>> Also, don't you need extra glue for jails? > > Why, jails uses separate hints/kenv? I was wondering whether or not the tunables could be changed from the jail, thus allowing someone to affect the host system or if this memory space was effectively CoWed in some way, shape or form. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 00:51:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EEBD106567B for ; Tue, 4 Sep 2012 00:51:55 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm5-vm0.bullet.mail.sp2.yahoo.com (nm5-vm0.bullet.mail.sp2.yahoo.com [98.139.91.204]) by mx1.freebsd.org (Postfix) with SMTP id E139C8FC15 for ; Tue, 4 Sep 2012 00:51:54 +0000 (UTC) Received: from [72.30.22.92] by nm5.bullet.mail.sp2.yahoo.com with NNFMP; 04 Sep 2012 00:51:54 -0000 Received: from [98.139.91.22] by tm14.bullet.mail.sp2.yahoo.com with NNFMP; 04 Sep 2012 00:51:54 -0000 Received: from [127.0.0.1] by omp1022.mail.sp2.yahoo.com with NNFMP; 04 Sep 2012 00:51:54 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 772404.6275.bm@omp1022.mail.sp2.yahoo.com Received: (qmail 68930 invoked by uid 60001); 4 Sep 2012 00:51:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346719914; bh=VwzM9lplTDI7wEtvlN2fX9ep4Dq7we2DljWOo3g/NR0=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=En7SqWngZiJdTSZ2v1OgN3/yb49CcugRJ9KktRhlGKccOpMXrUADv4HkEn0qTdGw7MXN1tTlZnSWHt51xshx0A7Ts4VHmiUg8q4+3oufWQn2R6dZoZ2XQdTyXFpn7F7hHiOIRqS9G+KAV2NaNI5yUINCnbKVIw6m/ngZvPOHOGo= X-YMail-OSG: G9j.jJsVM1m1vstG8Jv2ZaVbA4XeRUdba6FUvJ8hEKbbRHB uon3HpGWj7MHN6Q0JRD26qrHaq6zjK89moxj03qPqq9YpsGVPONeqq.cZrgw NrYvklQGzxt00fAIo8SjEOvtmpbTCm_ucP0wKd6blmnQ53F621xJYRs4EvFf OEqNzW1Gobl9jyH.XULKcO8Q02RFrJSSAnAuoftLhzxsMn7xD9ut85tElIlW jG2c6KW3Xy3Ys9N6jE1cHeBML7qyqwCVb3_66g5wMZ_P3E1kETHvKNbwZEOg CktRuayl6uR63uCM5hr9V743GolACPUS9XxRp1VZzjwuZUiMBOslk2VF7oaD 0sZFjTYVCoQX64zTpr54g9_YjZeROszmNA347pM4LzYU5rCz2KR6Jh5o9plv o2HiYOuhByLloiFD.ps1iwDnh2tI5jCkmPba.lT8n.q.RicXCSUDbTlTehwj ooUlbKDbJos0Gn2KJBYNn01SJXZUr6NuX90wiuQxuMGltql3wSPBWrEjEo8f cYTleUbIC.US.jr7ePoiMWSXY6kx3WKl9tEkdOQkNky.QoU9IX8rRvWA5aPL 7yciWLjnxWIm5jnCfZrJUL.OlFbrg5WEE Received: from [200.118.157.7] by web113520.mail.gq1.yahoo.com via HTTP; Mon, 03 Sep 2012 17:51:53 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.121.416 References: <20120903073133.GB33100@deviant.kiev.zoral.com.ua> <1346681599.92069.YahooMailClassic@web113502.mail.gq1.yahoo.com> <20120903144050.GN33100@deviant.kiev.zoral.com.ua> Message-ID: <1346719913.68772.YahooMailNeo@web113520.mail.gq1.yahoo.com> Date: Mon, 3 Sep 2012 17:51:53 -0700 (PDT) From: Pedro Giffuni To: Konstantin Belousov In-Reply-To: <20120903144050.GN33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r240060 - in head: include/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pedro Giffuni List-Id: "SVN commit messages 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, 04 Sep 2012 00:51:55 -0000 ...=0A>________________________________=0A>=0A>From: Konstantin Belousov=0A= >=A0=0A>...=0A>=0A>>=A0 =0A>> PR 137443=0A>From the PR, I fail to see what = is the problem in our headers, and why=0A>the issue is not in some third-pa= rty C++ code.=0A>=0A>It is definitely has nothing to do with C++ name mangl= ing.=0A>=0A=A0=0AHmm.. yes, not a mangling issue but it is rather weird tha= t it happens on C++.=0ASalome is not a toy app.=0A=0A>> =0A>> > Although no= t very useful due to many other namespace=0A>> > pollution problems=0A>> > = in the rpc headers, __rpc_xdr is in the=0A>> > implementation-reserved name= space,=0A>> > while XDR is not.=0A>> > =0A>> =0A>> The forced reference her= e is {Open}Solaris:=0A>> =0A>> http://src.illumos.org/source/xref/illumos-g= ate/usr/src/uts/common/rpc/xdr.h=0A>> =0A>> OpenGrok found no reference to = __rpc_xdr=0A>> in OpenSolaris/illumos.=0A>I see, Solaris does=0A>=A0=A0=A0 = typedef struct XDR { ... } XDR;=0A>and we now use the same trick.=0A>=0A>So= my objections, if any, were against the commit message and not the actual= =0A>code change then.=0A>=0A=A0=0AQuite definitely :(=A0.. I mixed two diff= erent issues that I was trying to solve=0A(and one of them was not an issue= at all). I will do a better job when I=0AMFC.=0A=A0=0AThanks for checking = though: I do feel nervous when touching a standard=0Aheader=A0even if it's = just to follow a change from upstream!=0A=A0=0A=A0=0APedro. From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 05:15:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0731E106566B; Tue, 4 Sep 2012 05:15:55 +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 E47968FC14; Tue, 4 Sep 2012 05:15:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q845FsIW098567; Tue, 4 Sep 2012 05:15:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q845FsNZ098563; Tue, 4 Sep 2012 05:15:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209040515.q845FsNZ098563@svn.freebsd.org> From: Xin LI Date: Tue, 4 Sep 2012 05:15: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: r240079 - in head: share/man/man4 sys/dev/arcmsr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 05:15:55 -0000 Author: delphij Date: Tue Sep 4 05:15:54 2012 New Revision: 240079 URL: http://svn.freebsd.org/changeset/base/240079 Log: Update arcmsr(4) to vendor version 1.20.00.25. Many thanks to Areca for continuing to support FreeBSD. Submitted by: Ching-Lung Huang MFC after: 2 weeks Modified: head/share/man/man4/arcmsr.4 head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/share/man/man4/arcmsr.4 ============================================================================== --- head/share/man/man4/arcmsr.4 Mon Sep 3 19:17:25 2012 (r240078) +++ head/share/man/man4/arcmsr.4 Tue Sep 4 05:15:54 2012 (r240079) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25, 2010 +.Dd September 3, 2012 .Dt ARCMSR 4 .Os .Sh NAME @@ -98,10 +98,14 @@ ARC-1210 .It ARC-1212 .It +ARC-1213 +.It ARC-1220 .It ARC-1222 .It +ARC-1223 +.It ARC-1230 .It ARC-1231 @@ -133,6 +137,8 @@ ARC-1680 ARC-1681 .It ARC-1880 +.It +ARC-1882 .El .Sh FILES .Bl -tag -width ".Pa /dev/arcmsr?" -compact Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Mon Sep 3 19:17:25 2012 (r240078) +++ head/sys/dev/arcmsr/arcmsr.c Tue Sep 4 05:15:54 2012 (r240079) @@ -37,38 +37,43 @@ ************************************************************************** ** History ** -** REV# DATE NAME DESCRIPTION -** 1.00.00.00 03/31/2004 Erich Chen First release -** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error -** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support +** REV# DATE NAME DESCRIPTION +** 1.00.00.00 03/31/2004 Erich Chen First release +** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support ** clean unused function -** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, +** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, ** firmware version check ** and firmware update notify for hardware bug fix ** handling if none zero high part physical address ** of srb resource -** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy +** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy ** add iop message xfer ** with scsi pass-through command ** add new device id of sas raid adapters ** code fit for SPARC64 & PPC -** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report +** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report ** and cause g_vfs_done() read write error -** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x -** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x +** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x +** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x ** bus_dmamem_alloc() with BUS_DMA_ZERO -** 1.20.00.17 07/15/2010 Ching Huang Added support ARC1880 -** report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed, -** prevent cam_periph_error removing all LUN devices of one Target id -** for any one LUN device failed -** 1.20.00.18 10/14/2010 Ching Huang Fixed "inquiry data fails comparion at DV1 step" -** 10/25/2010 Ching Huang Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B -** 1.20.00.19 11/11/2010 Ching Huang Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0 -** 1.20.00.20 12/08/2010 Ching Huang Avoid calling atomic_set_int function -** 1.20.00.21 02/08/2011 Ching Huang Implement I/O request timeout -** 02/14/2011 Ching Huang Modified pktRequestCount -** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it -** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic +** 1.20.00.17 07/15/2010 Ching Huang Added support ARC1880 +** report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed, +** prevent cam_periph_error removing all LUN devices of one Target id +** for any one LUN device failed +** 1.20.00.18 10/14/2010 Ching Huang Fixed "inquiry data fails comparion at DV1 step" +** 10/25/2010 Ching Huang Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B +** 1.20.00.19 11/11/2010 Ching Huang Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0 +** 1.20.00.20 12/08/2010 Ching Huang Avoid calling atomic_set_int function +** 1.20.00.21 02/08/2011 Ching Huang Implement I/O request timeout +** 02/14/2011 Ching Huang Modified pktRequestCount +** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it +** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic +** 1.20.00.23 10/28/2011 Ching Huang Added TIMEOUT_DELAY in case of too many HDDs need to start +** 1.20.00.23 11/08/2011 Ching Huang Added report device transfer speed +** 1.20.00.23 01/30/2012 Ching Huang Fixed Request requeued and Retrying command +** 1.20.00.24 06/11/2012 Ching Huang Fixed return sense data condition +** 1.20.00.25 08/17/2012 Ching Huang Fixed hotplug device no function on type A adapter ****************************************************************************************** */ @@ -154,7 +159,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.22 2011-07-04" +#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.25 2012-08-17" #include #define SRB_SIZE ((sizeof(struct CommandControlBlock)+0x1f) & 0xffe0) #define ARCMSR_SRBS_POOL_SIZE (SRB_SIZE * ARCMSR_MAX_FREESRB_NUM) @@ -296,7 +301,7 @@ static struct cdevsw arcmsr_cdevsw = { if(acb==NULL) { return ENXIO; } - return 0; + return (0); } /* ************************************************************************** @@ -347,7 +352,7 @@ static struct cdevsw arcmsr_cdevsw = { if(acb==NULL) { return ENXIO; } - return(arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); + return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); } /* ********************************************************************** @@ -378,7 +383,7 @@ static u_int32_t arcmsr_disable_allintr( } break; } - return(intmask_org); + return (intmask_org); } /* ********************************************************************** @@ -411,7 +416,6 @@ static void arcmsr_enable_allintr( struc } break; } - return; } /* ********************************************************************** @@ -431,7 +435,7 @@ static u_int8_t arcmsr_hba_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ********************************************************************** @@ -452,7 +456,7 @@ static u_int8_t arcmsr_hbb_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ********************************************************************** @@ -472,7 +476,7 @@ static u_int8_t arcmsr_hbc_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ************************************************************************ @@ -490,7 +494,6 @@ static void arcmsr_flush_hba_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -509,7 +512,6 @@ static void arcmsr_flush_hbb_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -528,7 +530,6 @@ static void arcmsr_flush_hbc_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -550,7 +551,6 @@ static void arcmsr_flush_adapter_cache(s } break; } - return; } /* ******************************************************************************* @@ -596,7 +596,7 @@ static void arcmsr_async(void *cb_arg, u if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) { break; } - printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun); + // printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun); break; default: break; @@ -612,14 +612,13 @@ static void arcmsr_report_sense_info(str pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { memset(&pccb->csio.sense_data, 0, sizeof(pccb->csio.sense_data)); memcpy(&pccb->csio.sense_data, srb->arcmsr_cdb.SenseData, get_min(sizeof(struct SENSE_DATA), sizeof(pccb->csio.sense_data))); ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ pccb->ccb_h.status |= CAM_AUTOSNS_VALID; } - return; } /* ********************************************************************* @@ -631,7 +630,6 @@ static void arcmsr_abort_hba_allcmd(stru if(!arcmsr_hba_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -643,7 +641,6 @@ static void arcmsr_abort_hbb_allcmd(stru if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -656,7 +653,6 @@ static void arcmsr_abort_hbc_allcmd(stru if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -678,7 +674,6 @@ static void arcmsr_abort_allcmd(struct A } break; } - return; } /* ********************************************************************** @@ -716,7 +711,6 @@ static void arcmsr_srb_complete(struct C acb->pktReturnCount++; #endif xpt_done(pccb); - return; } /* ************************************************************************** @@ -768,7 +762,6 @@ static void arcmsr_report_srb_state(stru break; } } - return; } /* ************************************************************************** @@ -801,7 +794,6 @@ static void arcmsr_drain_donequeue(struc return; } arcmsr_report_srb_state(acb, srb, error); - return; } /* ************************************************************************** @@ -883,7 +875,6 @@ static void arcmsr_done4abort_postqueue( } break; } - return; } /* **************************************************************************** @@ -923,7 +914,6 @@ static void arcmsr_iop_reset(struct Adap acb->pktRequestCount = 0; acb->pktReturnCount = 0; #endif - return; } /* ********************************************************************** @@ -1011,7 +1001,6 @@ static void arcmsr_build_srb(struct Comm arcmsr_cdb->DataLength = 0; } srb->arc_cdb_size=arccdbsize; - return; } /* ************************************************************************** @@ -1072,7 +1061,6 @@ static void arcmsr_post_srb(struct Adapt } break; } - return; } /* ************************************************************************ @@ -1156,7 +1144,6 @@ static void arcmsr_iop_message_read(stru CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK); } } - return; } /* ************************************************************************** @@ -1221,7 +1208,6 @@ static void arcmsr_post_ioctldata2iop(st */ arcmsr_iop_message_wrote(acb); } - return; } /* ************************************************************************ @@ -1236,7 +1222,6 @@ static void arcmsr_stop_hba_bgrb(struct printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); } - return; } /* ************************************************************************ @@ -1251,7 +1236,6 @@ static void arcmsr_stop_hbb_bgrb(struct printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); } - return; } /* ************************************************************************ @@ -1265,7 +1249,6 @@ static void arcmsr_stop_hbc_bgrb(struct if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ************************************************************************ @@ -1287,7 +1270,6 @@ static void arcmsr_stop_adapter_bgrb(str } break; } - return; } /* ************************************************************************ @@ -1305,7 +1287,6 @@ static void arcmsr_poll(struct cam_sim * arcmsr_interrupt(acb); if( mutex == 0 ) ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock); - return; } /* ************************************************************************** @@ -1340,7 +1321,6 @@ static void arcmsr_iop2drv_data_wrote_ha } else { acb->acb_flags|=ACB_F_IOPDATA_OVERFLOW; } - return; } /* ************************************************************************** @@ -1383,7 +1363,6 @@ static void arcmsr_iop2drv_data_read_han if(acb->wqbuf_firstindex==acb->wqbuf_lastindex) { acb->acb_flags |= ACB_F_MESSAGE_WQBUFFER_CLEARED; } - return; } static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb) @@ -1417,7 +1396,6 @@ static void arcmsr_rescan_lun(struct Ada ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb; ccb->crcn.flags = CAM_FLAG_NONE; xpt_action(ccb); - return; } @@ -1488,6 +1466,7 @@ static void arcmsr_dr_handle(struct Adap } break; } + if(acb->acb_flags & ACB_F_BUS_HANG_ON) { acb->acb_flags &= ~ACB_F_BUS_HANG_ON; @@ -1592,7 +1571,6 @@ static void arcmsr_hba_doorbell_isr(stru if(outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_READ_OK) { arcmsr_iop2drv_data_read_handle(acb); } - return; } /* ************************************************************************** @@ -1620,7 +1598,6 @@ static void arcmsr_hbc_doorbell_isr(stru if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) { arcmsr_hbc_message_isr(acb); /* messenger of "driver to iop commands" */ } - return; } /* ************************************************************************** @@ -1644,7 +1621,6 @@ static void arcmsr_hba_postqueue_isr(str error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ - return; } /* ************************************************************************** @@ -1674,7 +1650,6 @@ static void arcmsr_hbb_postqueue_isr(str error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ - return; } /* ************************************************************************** @@ -1704,7 +1679,6 @@ static void arcmsr_hbc_postqueue_isr(str } throttling++; } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -1712,30 +1686,29 @@ static void arcmsr_hbc_postqueue_isr(str */ static void arcmsr_handle_hba_isr( struct AdapterControlBlock *acb) { - u_int32_t outbound_intstatus; + u_int32_t outbound_intStatus; /* ********************************************* ** check outbound intstatus ********************************************* */ - outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable; - if(!outbound_intstatus) { + outbound_intStatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable; + if(!outbound_intStatus) { /*it must be share irq*/ return; } - CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/ + CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intStatus);/*clear interrupt*/ /* MU doorbell interrupts*/ - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) { arcmsr_hba_doorbell_isr(acb); } /* MU post queue interrupts*/ - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) { arcmsr_hba_postqueue_isr(acb); } - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) { arcmsr_hba_message_isr(acb); } - return; } /* ********************************************************************** @@ -1771,7 +1744,6 @@ static void arcmsr_handle_hbb_isr( struc if(outbound_doorbell & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) { arcmsr_hbb_message_isr(acb); } - return; } /* ********************************************************************** @@ -1798,7 +1770,6 @@ static void arcmsr_handle_hbc_isr( struc if(host_interrupt_status & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) { arcmsr_hbc_postqueue_isr(acb); } - return; } /* ****************************************************************************** @@ -1821,7 +1792,6 @@ static void arcmsr_interrupt(struct Adap " unknow adapter type =%d\n", acb->pci_unit, acb->adapter_type); break; } - return; } /* ********************************************************************** @@ -1844,7 +1814,7 @@ static void arcmsr_polling_devmap(void* struct AdapterControlBlock *acb = (struct AdapterControlBlock *)arg; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: - CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); + CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); break; case ACB_ADAPTER_TYPE_B: @@ -2065,7 +2035,7 @@ u_int32_t arcmsr_iop_ioctlcmd(struct Ada break; } ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock); - return retvalue; + return (retvalue); } /* ************************************************************************** @@ -2191,7 +2161,7 @@ static int arcmsr_iop_message_xfer(struc if (wqbuf_lastindex != wqbuf_firstindex) { arcmsr_post_ioctldata2iop(acb); /* has error report sensedata */ - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ ((u_int8_t *)&pccb->csio.sense_data)[2] = 0x05; @@ -2221,7 +2191,7 @@ static int arcmsr_iop_message_xfer(struc } } else { /* has error report sensedata */ - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ ((u_int8_t *)&pccb->csio.sense_data)[2] = 0x05; @@ -2312,7 +2282,7 @@ static int arcmsr_iop_message_xfer(struc retvalue = ARCMSR_MESSAGE_FAIL; } message_out: - return retvalue; + return (retvalue); } /* ********************************************************************* @@ -2375,7 +2345,7 @@ static void arcmsr_execute_srb(void *arg arcmsr_srb_complete(srb, 0); return; } - if(acb->srboutstandingcount >= ARCMSR_MAX_OUTSTANDING_CMD) { + if(acb->srboutstandingcount > ARCMSR_MAX_OUTSTANDING_CMD) { xpt_freeze_simq(acb->psim, 1); pccb->ccb_h.status = CAM_REQUEUE_REQ; acb->acb_flags |= ACB_F_CAM_DEV_QFRZN; @@ -2388,10 +2358,9 @@ static void arcmsr_execute_srb(void *arg if (pccb->ccb_h.timeout != CAM_TIME_INFINITY) { arcmsr_callout_init(&srb->ccb_callout); - callout_reset(&srb->ccb_callout, (pccb->ccb_h.timeout * hz ) / 1000, arcmsr_srb_timeout, srb); + callout_reset(&srb->ccb_callout, ((pccb->ccb_h.timeout + (ARCMSR_TIMEOUT_DELAY * 1000)) * hz) / 1000, arcmsr_srb_timeout, srb); srb->srb_flags |= SRB_FLAG_TIMER_START; } - return; } /* ***************************************************************************************** @@ -2455,7 +2424,6 @@ static void arcmsr_bus_reset(struct Adap } arcmsr_iop_reset(acb); acb->acb_flags &= ~ACB_F_BUS_RESET; - return; } /* ************************************************************************** @@ -2607,10 +2575,24 @@ static void arcmsr_action(struct cam_sim strncpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); cpi->unit_number=cam_sim_unit(psim); #ifdef CAM_NEW_TRAN_CODE - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; + if(acb->adapter_bus_speed == ACB_BUS_SPEED_6G) + cpi->base_transfer_speed = 600000; + else + cpi->base_transfer_speed = 300000; + if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1680)) + { + cpi->transport = XPORT_SAS; + cpi->transport_version = 0; + cpi->protocol_version = SCSI_REV_SPC2; + } + else + { + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol_version = SCSI_REV_2; + } cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; #endif cpi->ccb_h.status |= CAM_REQ_CMP; xpt_done(pccb); @@ -2674,28 +2656,46 @@ static void arcmsr_action(struct cam_sim { struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; + struct ccb_trans_settings_sas *sas; scsi = &cts->proto_specific.scsi; - spi = &cts->xport_specific.spi; - cts->protocol = PROTO_SCSI; - cts->protocol_version = SCSI_REV_2; - cts->transport = XPORT_SPI; - cts->transport_version = 2; - spi->flags = CTS_SPI_FLAGS_DISC_ENB; - spi->sync_period=3; - spi->sync_offset=32; - spi->bus_width=MSG_EXT_WDTR_BUS_16_BIT; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; - spi->valid = CTS_SPI_VALID_DISC - | CTS_SPI_VALID_SYNC_RATE - | CTS_SPI_VALID_SYNC_OFFSET - | CTS_SPI_VALID_BUS_WIDTH; scsi->valid = CTS_SCSI_VALID_TQ; + cts->protocol = PROTO_SCSI; + + if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1680)) + { + cts->protocol_version = SCSI_REV_SPC2; + cts->transport_version = 0; + cts->transport = XPORT_SAS; + sas = &cts->xport_specific.sas; + sas->valid = CTS_SAS_VALID_SPEED; + if(acb->vendor_device_id == PCIDevVenIDARC1880) + sas->bitrate = 600000; + else if(acb->vendor_device_id == PCIDevVenIDARC1680) + sas->bitrate = 300000; + } + else + { + cts->protocol_version = SCSI_REV_2; + cts->transport_version = 2; + cts->transport = XPORT_SPI; + spi = &cts->xport_specific.spi; + spi->flags = CTS_SPI_FLAGS_DISC_ENB; + spi->sync_period=2; + spi->sync_offset=32; + spi->bus_width=MSG_EXT_WDTR_BUS_16_BIT; + spi->valid = CTS_SPI_VALID_DISC + | CTS_SPI_VALID_SYNC_RATE + | CTS_SPI_VALID_SYNC_OFFSET + | CTS_SPI_VALID_BUS_WIDTH; + } } #else { cts->flags=(CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB); - cts->sync_period=3; + cts->sync_period=2; cts->sync_offset=32; cts->bus_width=MSG_EXT_WDTR_BUS_16_BIT; cts->valid=CCB_TRANS_SYNC_RATE_VALID | @@ -2759,7 +2759,6 @@ static void arcmsr_action(struct cam_sim xpt_done(pccb); break; } - return; } /* ********************************************************************** @@ -2772,7 +2771,6 @@ static void arcmsr_start_hba_bgrb(struct if(!arcmsr_hba_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2785,7 +2783,6 @@ static void arcmsr_start_hbb_bgrb(struct if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf( "arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2799,7 +2796,6 @@ static void arcmsr_start_hbc_bgrb(struct if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2818,7 +2814,6 @@ static void arcmsr_start_adapter_bgrb(st arcmsr_start_hbc_bgrb(acb); break; } - return; } /* ********************************************************************** @@ -2873,7 +2868,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -2934,7 +2928,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -2985,7 +2978,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -3053,7 +3045,6 @@ static void arcmsr_get_hba_config(struct acb->firm_sdram_size=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3100,7 +3091,6 @@ static void arcmsr_get_hbb_config(struct acb->firm_sdram_size=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3148,7 +3138,6 @@ static void arcmsr_get_hbc_config(struct acb->firm_sdram_size =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3170,7 +3159,6 @@ static void arcmsr_get_firmware_spec(str } break; } - return; } /* ********************************************************************** @@ -3219,7 +3207,6 @@ static void arcmsr_wait_firmware_ready( } break; } - return; } /* ********************************************************************** @@ -3253,7 +3240,6 @@ static void arcmsr_clear_doorbell_queue_ } break; } - return; } /* ************************************************************************ @@ -3336,7 +3322,7 @@ static u_int32_t arcmsr_iop_confirm(stru } break; } - return TRUE; + return (TRUE); } /* ************************************************************************ @@ -3359,7 +3345,6 @@ static void arcmsr_enable_eoi_mode(struc } break; } - return; } /* ********************************************************************** @@ -3382,7 +3367,6 @@ static void arcmsr_iop_init(struct Adapt /* enable outbound Post Queue, outbound doorbell Interrupt */ arcmsr_enable_allintr(acb, intmask_org); acb->acb_flags |=ACB_F_IOP_INITED; - return; } /* ********************************************************************** @@ -3414,7 +3398,6 @@ static void arcmsr_map_free_srb(void *ar srb_tmp = (struct CommandControlBlock *)((unsigned long)srb_tmp+SRB_SIZE); } acb->vir2phy_offset=(unsigned long)srb_tmp-(unsigned long)srb_phyaddr; - return; } /* ************************************************************************ @@ -3433,7 +3416,6 @@ static void arcmsr_free_resource(struct bus_dma_tag_destroy(acb->srb_dmat); bus_dma_tag_destroy(acb->dm_segs_dmat); bus_dma_tag_destroy(acb->parent_dmat); - return; } /* ************************************************************************ @@ -3444,16 +3426,24 @@ static u_int32_t arcmsr_initialize(devic struct AdapterControlBlock *acb=device_get_softc(dev); u_int16_t pci_command; int i, j,max_coherent_size; - - switch (pci_get_devid(dev)) { - case PCIDevVenIDARC1880: { + u_int32_t vendor_dev_id; + + vendor_dev_id = pci_get_devid(dev); + acb->vendor_device_id = vendor_dev_id; + switch (vendor_dev_id) { + case PCIDevVenIDARC1880: + case PCIDevVenIDARC1882: + case PCIDevVenIDARC1213: + case PCIDevVenIDARC1223: { acb->adapter_type=ACB_ADAPTER_TYPE_C; + acb->adapter_bus_speed = ACB_BUS_SPEED_6G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE; } break; case PCIDevVenIDARC1200: case PCIDevVenIDARC1201: { acb->adapter_type=ACB_ADAPTER_TYPE_B; + acb->adapter_bus_speed = ACB_BUS_SPEED_3G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE+(sizeof(struct HBB_MessageUnit)); } break; @@ -3477,6 +3467,7 @@ static u_int32_t arcmsr_initialize(devic case PCIDevVenIDARC1680: case PCIDevVenIDARC1681: { acb->adapter_type=ACB_ADAPTER_TYPE_A; + acb->adapter_bus_speed = ACB_BUS_SPEED_3G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE; } break; @@ -3804,7 +3795,7 @@ static int arcmsr_attach(device_t dev) #endif arcmsr_callout_init(&acb->devmap_callout); callout_reset(&acb->devmap_callout, 60 * hz, arcmsr_polling_devmap, acb); - return 0; + return (0); } /* @@ -3851,6 +3842,9 @@ static int arcmsr_probe(device_t dev) type = "SAS 3G"; break; case PCIDevVenIDARC1880: + case PCIDevVenIDARC1882: + case PCIDevVenIDARC1213: + case PCIDevVenIDARC1223: type = "SAS 6G"; break; default: Modified: head/sys/dev/arcmsr/arcmsr.h ============================================================================== --- head/sys/dev/arcmsr/arcmsr.h Mon Sep 3 19:17:25 2012 (r240078) +++ head/sys/dev/arcmsr/arcmsr.h Tue Sep 4 05:15:54 2012 (r240079) @@ -52,6 +52,7 @@ #define ARCMSR_MAX_ADAPTER 4 #define ARCMSR_RELEASE_SIMQ_LEVEL 230 #define ARCMSR_MAX_HBB_POSTQUEUE 264 /* (ARCMSR_MAX_OUTSTANDING_CMD+8) */ +#define ARCMSR_TIMEOUT_DELAY 60 /* in sec */ /* ********************************************************************* */ @@ -97,6 +98,13 @@ #define PCI_DEVICE_ID_ARECA_1681 0x1681 /* Device ID */ #define PCI_DEVICE_ID_ARECA_1880 0x1880 /* Device ID */ +#define ARECA_SUB_DEV_ID_1880 0x1880 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1882 0x1882 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1212 0x1212 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1213 0x1213 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1222 0x1222 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1223 0x1223 /* Subsystem Device ID */ + #define PCIDevVenIDARC1110 0x111017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1120 0x112017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1130 0x113017D3 /* Vendor Device ID */ @@ -106,8 +114,10 @@ #define PCIDevVenIDARC1201 0x120117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1210 0x121017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1212 0x121217D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1213 0x121317D3 /* Vendor Device ID */ #define PCIDevVenIDARC1220 0x122017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1222 0x122217D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1223 0x122317D3 /* Vendor Device ID */ #define PCIDevVenIDARC1230 0x123017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1231 0x123117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1260 0x126017D3 /* Vendor Device ID */ @@ -119,6 +129,7 @@ #define PCIDevVenIDARC1680 0x168017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1681 0x168117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1880 0x188017D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1882 0x188217D3 /* Vendor Device ID */ #ifndef PCIR_BARS #define PCIR_BARS 0x10 @@ -830,6 +841,8 @@ struct AdapterControlBlock { u_int32_t pktRequestCount; u_int32_t pktReturnCount; #endif + u_int32_t vendor_device_id; + u_int32_t adapter_bus_speed; };/* HW_DEVICE_EXTENSION */ /* acb_flags */ #define ACB_F_SCSISTOPADAPTER 0x0001 @@ -848,6 +861,10 @@ struct AdapterControlBlock { /* devstate */ #define ARECA_RAID_GONE 0x55 #define ARECA_RAID_GOOD 0xaa +/* adapter_bus_speed */ +#define ACB_BUS_SPEED_3G 0 +#define ACB_BUS_SPEED_6G 1 +#define ACB_BUS_SPEED_12G 2 /* ********************************************************************* ** Message Unit structure From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 05:51:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C142106566C; Tue, 4 Sep 2012 05:51:51 +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 378768FC0A; Tue, 4 Sep 2012 05:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q845ppWD002894; Tue, 4 Sep 2012 05:51:51 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q845pp9m002892; Tue, 4 Sep 2012 05:51:51 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209040551.q845pp9m002892@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 4 Sep 2012 05:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240080 - head/lib/libprocstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 05:51:51 -0000 Author: trociny Date: Tue Sep 4 05:51:50 2012 New Revision: 240080 URL: http://svn.freebsd.org/changeset/base/240080 Log: Add __BEGIN_DECLS and __END_DECLS to make libprocstat more C++-friendly. Submitted by: Daniel Dettlaff MFC after: 1 week Modified: head/lib/libprocstat/libprocstat.h Modified: head/lib/libprocstat/libprocstat.h ============================================================================== --- head/lib/libprocstat/libprocstat.h Tue Sep 4 05:15:54 2012 (r240079) +++ head/lib/libprocstat/libprocstat.h Tue Sep 4 05:51:50 2012 (r240080) @@ -144,6 +144,7 @@ struct sockstat { STAILQ_HEAD(filestat_list, filestat); +__BEGIN_DECLS void procstat_close(struct procstat *procstat); void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p); void procstat_freefiles(struct procstat *procstat, @@ -164,5 +165,6 @@ int procstat_get_vnode_info(struct procs struct vnstat *vn, char *errbuf); struct procstat *procstat_open_sysctl(void); struct procstat *procstat_open_kvm(const char *nlistf, const char *memf); +__END_DECLS #endif /* !_LIBPROCSTAT_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 05:54:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D551106566C; Tue, 4 Sep 2012 05:54:44 +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 389EF8FC14; Tue, 4 Sep 2012 05:54:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q845siOa003252; Tue, 4 Sep 2012 05:54:44 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q845siwH003250; Tue, 4 Sep 2012 05:54:44 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209040554.q845siwH003250@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 4 Sep 2012 05:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240081 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 05:54:44 -0000 Author: trociny Date: Tue Sep 4 05:54:43 2012 New Revision: 240081 URL: http://svn.freebsd.org/changeset/base/240081 Log: Free memory allocated by procstat_getfiles(), which may make difference when procstat(1) is run with -a option. Submitted by: Daniel Dettlaff MFC after: 1 week Modified: head/usr.bin/procstat/procstat_files.c Modified: head/usr.bin/procstat/procstat_files.c ============================================================================== --- head/usr.bin/procstat/procstat_files.c Tue Sep 4 05:51:50 2012 (r240080) +++ head/usr.bin/procstat/procstat_files.c Tue Sep 4 05:54:43 2012 (r240081) @@ -476,4 +476,5 @@ procstat_files(struct procstat *procstat printf("\n"); } + procstat_freefiles(procstat, head); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 07:48:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D433D106564A; Tue, 4 Sep 2012 07:48:39 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 848868FC0A; Tue, 4 Sep 2012 07:48:39 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) by smtp.dlink.ua (Postfix) with SMTP id 931A3C493D; Tue, 4 Sep 2012 10:48:37 +0300 (EEST) Date: Tue, 4 Sep 2012 10:50:40 +0300 From: Aleksandr Rybalko To: Garrett Cooper Message-Id: <20120904105040.3340c748.ray@freebsd.org> In-Reply-To: References: <201209030852.q838q6lC053405@svn.freebsd.org> <20120903122352.951b4253.ray@freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240067 - 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, 04 Sep 2012 07:48:39 -0000 On Mon, 3 Sep 2012 12:29:05 -0700 Garrett Cooper wrote: >> On Mon, Sep 3, 2012 at 2:23 AM, Aleksandr Rybalko >> wrote: >> > On Mon, 3 Sep 2012 02:05:15 -0700 >> > Garrett Cooper wrote: >> > >> >>> On Sep 3, 2012, at 1:52 AM, Aleksandr Rybalko wrote: >> >>> >> >>> > Author: ray >> >>> > Date: Mon Sep 3 08:52:05 2012 >> >>> > New Revision: 240067 >> >>> > URL: http://svn.freebsd.org/changeset/base/240067 >> >>> > >> >>> > Log: >> >>> > Add kern.hintmode sysctl variable to show current state of >> >>> > hints: 0 - loader hints in environment only; >> >>> > 1 - static hints only >> >>> > 2 - fallback mode (Dynamic KENV with fallback to kernel >> >>> > environment) Add kern.hintmode write handler, accept only >> >>> > value 2. That will switch static KENV to dynamic. So it will >> >>> > be possible to change device hints. >> >>> >> >>> ... >> >>> >> >>> > + /* Migrate from static to dynamic hints */ >> >>> > + switch (hintmode) { >> >>> > + case 0: >> >>> > + if (dynamic_kenv) >> >>> > + /* Already here */ >> >>> > + hintmode = value; /* XXX: Need we switch >> >>> > or not ? */ >> >>> > + return (0); >> >>> >> >>> ^^^^ typo (missing braces)? ^^^^ >> > >> > Ohhh, yeah, testing now. >> > Thank you! >> > >> >>> >> >>> Also, don't you need extra glue for jails? >> > >> > Why, jails uses separate hints/kenv? >> >> I was wondering whether or not the tunables could be changed from the >> jail, thus allowing someone to affect the host system or if this >> memory space was effectively CoWed in some way, shape or form. Think after switch hints will be controlled by the same policy as before. Normal hints 0-16KB, so it will not be big memory waste. Handler allow to do it only one time: user set it to 2, handler copy env. Next time any just check, if 2, do nothing. You think better to add CTLFLAG_PRISON flag, to hide it from jails? >> >> Thanks! >> -Garrett Thank you Garrett! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 08:11:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3ED28106566C; Tue, 4 Sep 2012 08:11:26 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id E480D8FC0C; Tue, 4 Sep 2012 08:11:25 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 0249BC493C; Tue, 4 Sep 2012 11:11:20 +0300 (EEST) Date: Tue, 4 Sep 2012 11:13:22 +0300 From: Aleksandr Rybalko To: Konstantin Belousov Message-Id: <20120904111322.e54bf030.ray@dlink.ua> In-Reply-To: <20120903170208.GQ33100@deviant.kiev.zoral.com.ua> References: <201209030852.q838q6lC053405@svn.freebsd.org> <20120903170208.GQ33100@deviant.kiev.zoral.com.ua> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, mdf@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240067 - 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, 04 Sep 2012 08:11:26 -0000 On Mon, 3 Sep 2012 20:02:08 +0300 Konstantin Belousov wrote: >> On Mon, Sep 03, 2012 at 09:09:08AM -0700, mdf@freebsd.org wrote: >> > On Mon, Sep 3, 2012 at 1:52 AM, Aleksandr Rybalko >> > wrote: >> > > Author: ray >> > > Date: Mon Sep 3 08:52:05 2012 >> > > New Revision: 240067 >> > > URL: http://svn.freebsd.org/changeset/base/240067 >> > > >> > > Log: >> > > Add kern.hintmode sysctl variable to show current state of >> > > hints: 0 - loader hints in environment only; >> > > 1 - static hints only >> > > 2 - fallback mode (Dynamic KENV with fallback to kernel >> > > environment) Add kern.hintmode write handler, accept only value >> > > 2. That will switch static KENV to dynamic. So it will be >> > > possible to change device hints. >> > > >> > > Approved by: adrian (mentor) >> > > >> > > Modified: >> > > head/sys/kern/subr_hints.c >> > > >> > > Modified: head/sys/kern/subr_hints.c >> > > ============================================================================== >> > > --- head/sys/kern/subr_hints.c Mon Sep 3 07:18:24 2012 >> > > (r240066) +++ head/sys/kern/subr_hints.c Mon Sep 3 08:52:05 >> > > 2012 (r240067) @@ -29,8 +29,10 @@ __FBSDID("$FreeBSD$"); >> > > >> > > #include >> > > #include >> > > +#include >> > > #include >> > > #include >> > > +#include >> > >> > Putting on my style-nazi hat. sysctl comes before systm >> > alphabetically. >> Systm.h is very special, it normally comes as the second item in the >> include list, right after param.h. Just recheck, in that case there is indeed no requirement to swap sysctl.h and systm.h. Thanks Kostik! Will fix my style(9)ability :) WBW -- Alexandr Rybalko aka Alex RAY From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 09:03:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8292F106564A; Tue, 4 Sep 2012 09:03:18 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id B04D78FC19; Tue, 4 Sep 2012 09:03:17 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) by smtp.dlink.ua (Postfix) with SMTP id 34254C4950; Tue, 4 Sep 2012 12:03:11 +0300 (EEST) Date: Tue, 4 Sep 2012 12:05:13 +0300 From: Aleksandr Rybalko To: mdf@FreeBSD.org Message-Id: <20120904120513.62c7e6b2.ray@freebsd.org> In-Reply-To: References: <201209030852.q838q6lC053405@svn.freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240067 - 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, 04 Sep 2012 09:03:18 -0000 On Mon, 3 Sep 2012 09:09:08 -0700 mdf@FreeBSD.org wrote: >> On Mon, Sep 3, 2012 at 1:52 AM, Aleksandr Rybalko >> wrote: >> > Author: ray >> > Date: Mon Sep 3 08:52:05 2012 >> > New Revision: 240067 >> > URL: http://svn.freebsd.org/changeset/base/240067 >> > >> > Log: >> > Add kern.hintmode sysctl variable to show current state of hints: >> > 0 - loader hints in environment only; >> > 1 - static hints only >> > 2 - fallback mode (Dynamic KENV with fallback to kernel >> > environment) Add kern.hintmode write handler, accept only value 2. >> > That will switch static KENV to dynamic. So it will be possible to >> > change device hints. >> > >> > Approved by: adrian (mentor) >> > >> > Modified: >> > head/sys/kern/subr_hints.c >> > >> > Modified: head/sys/kern/subr_hints.c >> > ============================================================================== >> > --- head/sys/kern/subr_hints.c Mon Sep 3 07:18:24 2012 >> > (r240066) +++ head/sys/kern/subr_hints.c Mon Sep 3 08:52:05 >> > 2012 (r240067) @@ -29,8 +29,10 @@ __FBSDID("$FreeBSD$"); >> > >> > #include >> > #include >> > +#include >> > #include >> > #include >> > +#include >> >> Putting on my style-nazi hat. sysctl comes before systm >> alphabetically. >> >> > #include >> > >> > /* >> > @@ -42,6 +44,81 @@ static int use_kenv; >> > static char *hintp; >> > >> > /* >> > + * Define kern.hintmode sysctl, which only accept value 2, that >> > cause to >> > + * switch from Static KENV mode to Dynamic KENV. So systems that >> > have hints >> > + * compiled into kernel will be able to see/modify KENV (and >> > hints too). >> > + */ >> > + >> > +static int >> > +sysctl_hintmode(SYSCTL_HANDLER_ARGS) >> > +{ >> > + int error, i, from_kenv, value, eqidx; >> > + const char *cp; >> > + char *line, *eq; >> >> These are not sorted properly; pointers come before scalars, and >> within the group they should be sorted alphabetically; e.g. "eqidx" >> comes before all the other ints. >> >> > + >> > + from_kenv = 0; >> > + cp = kern_envp; >> > + value = hintmode; >> > + >> > + /* Fetch candidate for new hintmode value */ >> > + error = sysctl_handle_int(oidp, &value, 0, req); >> > + if (error || !req->newptr) >> >> This may be copying existing code, but style(9) explicitly forbids >> using '!' except on boolean expressions. Since req->newptr is a >> pointer, an explicit comparison to NULL should be made. This error >> is repeated later. >> >> Thanks, >> matthew >> >> > + return (error); >> > + >> > + if (value != 2) >> > + /* Only accept swithing to hintmode 2 */ >> > + return (EINVAL); >> > + >> > + /* Migrate from static to dynamic hints */ >> > + switch (hintmode) { >> > + case 0: >> > + if (dynamic_kenv) >> > + /* Already here */ >> > + hintmode = value; /* XXX: Need we switch >> > or not ? */ >> > + return (0); >> > + from_kenv = 1; >> > + cp = kern_envp; >> > + break; >> > + case 1: >> > + cp = static_hints; >> > + break; >> > + case 2: >> > + /* Nothing to do, hintmode already 2 */ >> > + return (0); >> > + } >> > + >> > + while (cp) { >> > + i = strlen(cp); >> > + if (i == 0) >> > + break; >> > + if (from_kenv) { >> > + if (strncmp(cp, "hint.", 5) != 0) >> > + /* kenv can have not only hints */ >> > + continue; >> > + } >> > + eq = strchr(cp, '='); >> > + if (!eq) >> > + /* Bad hint value */ >> > + continue; >> > + eqidx = eq - cp; >> > + >> > + line = malloc(i+1, M_TEMP, M_WAITOK); >> > + strcpy(line, cp); >> > + line[eqidx] = '\0'; >> > + setenv(line, line + eqidx + 1); >> > + free(line, M_TEMP); >> > + cp += i + 1; >> > + } >> > + >> > + hintmode = value; >> > + use_kenv = 1; >> > + return (0); >> > +} >> > + >> > +SYSCTL_PROC(_kern, OID_AUTO, hintmode, CTLTYPE_INT|CTLFLAG_RW, >> > + &hintmode, 0, sysctl_hintmode, "I", "Get/set current >> > hintmode"); + >> > +/* >> > * Evil wildcarding resource string lookup. >> > * This walks the supplied env string table and returns a match. >> > * The start point can be remembered for incremental searches. Think that one is last version :) http://people.freebsd.org/~ray/subr_hints.c.patch Thank you Matthew! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 10:56:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24C411065673; Tue, 4 Sep 2012 10:56:31 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5C78FC0C; Tue, 4 Sep 2012 10:56:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84AuUls042512; Tue, 4 Sep 2012 10:56:30 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84AuUCh042509; Tue, 4 Sep 2012 10:56:30 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201209041056.q84AuUCh042509@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 4 Sep 2012 10:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240082 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 10:56:31 -0000 Author: melifaro Date: Tue Sep 4 10:56:30 2012 New Revision: 240082 URL: http://svn.freebsd.org/changeset/base/240082 Log: Remove unneeded ipfw headers introduced in r213447 from Infiniband code. MFC after: 2 weeks Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Tue Sep 4 05:54:43 2012 (r240081) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h Tue Sep 4 10:56:30 2012 (r240082) @@ -67,8 +67,6 @@ #include #include #include -#include -#include #endif #ifdef INET6 #include From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 11:43:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA82D1065673; Tue, 4 Sep 2012 11:43:00 +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 D68BA8FC1E; Tue, 4 Sep 2012 11:43:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84Bh0BL048263; Tue, 4 Sep 2012 11:43:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Bh0MV048261; Tue, 4 Sep 2012 11:43:00 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209041143.q84Bh0MV048261@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 4 Sep 2012 11:43: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: r240083 - head/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 11:43:01 -0000 Author: trasz Date: Tue Sep 4 11:43:00 2012 New Revision: 240083 URL: http://svn.freebsd.org/changeset/base/240083 Log: Make setfacl(1) behave properly in situations like "setfacl -kd". MFC after: 1 month Modified: head/bin/setfacl/setfacl.c Modified: head/bin/setfacl/setfacl.c ============================================================================== --- head/bin/setfacl/setfacl.c Tue Sep 4 10:56:30 2012 (r240082) +++ head/bin/setfacl/setfacl.c Tue Sep 4 11:43:00 2012 (r240083) @@ -73,6 +73,7 @@ main(int argc, char *argv[]) { acl_t acl; acl_type_t acl_type; + acl_entry_t unused_entry; char filename[PATH_MAX]; int local_error, carried_error, ch, i, entry_number, ret; int h_flag; @@ -296,6 +297,20 @@ main(int argc, char *argv[]) } } + /* + * Don't try to set an empty default ACL; it will always fail. + * Use acl_delete_def_file(3) instead. + */ + if (acl_type == ACL_TYPE_DEFAULT && + acl_get_entry(acl, ACL_FIRST_ENTRY, &unused_entry) == 0) { + if (acl_delete_def_file(file->filename) == -1) { + warn("%s: acl_delete_def_file() failed", + file->filename); + carried_error++; + } + continue; + } + /* don't bother setting the ACL if something is broken */ if (local_error) { carried_error++; From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 11:50:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CAB3106564A; Tue, 4 Sep 2012 11:50:14 +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 57B2C8FC16; Tue, 4 Sep 2012 11:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84BoEPt049176; Tue, 4 Sep 2012 11:50:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84BoEqC049173; Tue, 4 Sep 2012 11:50:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209041150.q84BoEqC049173@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 4 Sep 2012 11:50: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: r240084 - head/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 11:50:14 -0000 Author: trasz Date: Tue Sep 4 11:50:13 2012 New Revision: 240084 URL: http://svn.freebsd.org/changeset/base/240084 Log: Make "setfacl -bd" an alias for "setfacl -k". Previously it would crash on assert. PR: bin/165807 MFC after: 1 month Modified: head/bin/setfacl/setfacl.c Modified: head/bin/setfacl/setfacl.c ============================================================================== --- head/bin/setfacl/setfacl.c Tue Sep 4 11:43:00 2012 (r240083) +++ head/bin/setfacl/setfacl.c Tue Sep 4 11:50:13 2012 (r240084) @@ -264,6 +264,17 @@ main(int argc, char *argv[]) need_mask = 1; break; case OP_REMOVE_EXT: + /* + * Don't try to call remove_ext() for empty + * default ACL. + */ + if (acl_type == ACL_TYPE_DEFAULT && + acl_get_entry(acl, ACL_FIRST_ENTRY, + &unused_entry) == 0) { + local_error += remove_default(&acl, + file->filename); + break; + } remove_ext(&acl, file->filename); need_mask = 0; break; From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 12:02:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA568106564A; Tue, 4 Sep 2012 12:02:23 +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 B5BB68FC16; Tue, 4 Sep 2012 12:02:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84C2Nxa050759; Tue, 4 Sep 2012 12:02:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84C2Nil050757; Tue, 4 Sep 2012 12:02:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209041202.q84C2Nil050757@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 4 Sep 2012 12:02: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: r240085 - head/bin/getfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 12:02:23 -0000 Author: trasz Date: Tue Sep 4 12:02:23 2012 New Revision: 240085 URL: http://svn.freebsd.org/changeset/base/240085 Log: In getfacl(1) manual page, mention where to read about the ACL syntax. PR submitter suggested adding it to acl(3) instead, but I don't think pointing ordinary users at section 3 is a good idea. PR: docs/162380 MFC after: 1 month Modified: head/bin/getfacl/getfacl.1 Modified: head/bin/getfacl/getfacl.1 ============================================================================== --- head/bin/getfacl/getfacl.1 Tue Sep 4 11:50:13 2012 (r240084) +++ head/bin/getfacl/getfacl.1 Tue Sep 4 12:02:23 2012 (r240085) @@ -97,6 +97,10 @@ then reads a list of pathnames, each terminated by one newline character, from the standard input. .El +.Pp +For an explanation of the ACL syntax, see the +.Xr setfacl 1 +manual page. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 12:07:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 076491065674; Tue, 4 Sep 2012 12:07:34 +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 E46F78FC0C; Tue, 4 Sep 2012 12:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84C7XCk051371; Tue, 4 Sep 2012 12:07:33 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84C7Xl4051365; Tue, 4 Sep 2012 12:07:33 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209041207.q84C7Xl4051365@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 4 Sep 2012 12:07: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: r240086 - in head: share/man/man9 sys/conf sys/libkern sys/net 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, 04 Sep 2012 12:07:34 -0000 Author: glebius Date: Tue Sep 4 12:07:33 2012 New Revision: 240086 URL: http://svn.freebsd.org/changeset/base/240086 Log: - Move jenkins.h to jenkins_hash.c - Provide missing function that can do hashing of arbitrary sized buffer. - Refetch lookup3.c and do only minimal edits to it, so that diff between our jenkins_hash.c and lookup3.c is minimal. - Add declarations for jenkins_hash(), jenkins_hash32() to sys/hash.h. - Document these functions in hash(9) Obtained from: http://burtleburtle.net/bob/c/lookup3.c Added: head/sys/libkern/jenkins_hash.c - copied, changed from r240081, head/sys/libkern/jenkins.h Deleted: head/sys/libkern/jenkins.h Modified: head/share/man/man9/hash.9 head/sys/conf/files head/sys/net/flowtable.c head/sys/sys/hash.h Modified: head/share/man/man9/hash.9 ============================================================================== --- head/share/man/man9/hash.9 Tue Sep 4 12:02:23 2012 (r240085) +++ head/share/man/man9/hash.9 Tue Sep 4 12:07:33 2012 (r240086) @@ -26,7 +26,7 @@ .\" $OpenBSD: hash.9,v 1.5 2003/04/17 05:08:39 jmc Exp $ .\" $FreeBSD$ .\" -.Dd April 3, 2007 +.Dd September 4, 2012 .Dt HASH 9 .Os .Sh NAME @@ -36,7 +36,9 @@ .Nm hash32_str , .Nm hash32_strn , .Nm hash32_stre , -.Nm hash32_strne +.Nm hash32_strne , +.Nm jenkins_hash32 , +.Nm jenkins_hash .Nd general kernel hashing functions .Sh SYNOPSIS .In sys/hash.h @@ -50,6 +52,10 @@ .Fn hash32_stre "const void *buf" "int end" "const char **ep" "uint32_t hash" .Ft uint32_t .Fn hash32_strne "const void *buf" "size_t len" "int end" "const char **ep" "uint32_t hash" +.Ft uint32_t +.Fn jenkins_hash "const void *buf" "size_t len" "uint32_t hash" +.Ft uint32_t +.Fn jenkins_hash32 "const uint32_t *buf" "size_t count" "uint32_t hash" .Sh DESCRIPTION The .Fn hash32 @@ -107,6 +113,23 @@ is not .Dv NULL , it is set to the point in the buffer at which the hash function terminated hashing. +.Pp +The +.Fn jenkins_hash +function has same semantics as the +.Fn hash32_buf , +but provides more advanced hashing algorithm with better distribution. +.Pp +The +.Fn jenkins_hash32 +uses same hashing algorithm as the +.Fn jenkins_hash +function, but works only on +.Ft uint32_t +sized arrays, thus is simplier and faster. +It accepts an array of +.Ft uint32_t +values in its first argument and size of this array in the second argument. .Sh RETURN VALUES The .Fn hash32 @@ -150,12 +173,24 @@ be revisited. .Sh HISTORY The .Nm -functions were first committed to +functions first appeared in .Nx 1.6 . -The -.Ox -versions were written and massaged for -.Ox 2.3 -by Tobias Weingartner, -and finally committed for -.Ox 3.2 . +The current implementation of +.Nm hash32 +functions was first committed to +.Ox 3.2 , +and later imported to +.Fx 6.1 . +The +.Nm jenkins_hash +functions were added in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm hash32 +functions were written by +.An Tobias Weingartner . +The +.Nm jenkins_hash +functions was written by +Bob Jenkins . Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 4 12:02:23 2012 (r240085) +++ head/sys/conf/files Tue Sep 4 12:07:33 2012 (r240086) @@ -2797,6 +2797,7 @@ libkern/inet_aton.c standard libkern/inet_ntoa.c standard libkern/inet_ntop.c standard libkern/inet_pton.c standard +libkern/jenkins_hash.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard libkern/memcmp.c standard Copied and modified: head/sys/libkern/jenkins_hash.c (from r240081, head/sys/libkern/jenkins.h) ============================================================================== --- head/sys/libkern/jenkins.h Tue Sep 4 05:54:43 2012 (r240081, copy source) +++ head/sys/libkern/jenkins_hash.c Tue Sep 4 12:07:33 2012 (r240086) @@ -1,43 +1,44 @@ -#ifndef __LIBKERN_JENKINS_H__ -#define __LIBKERN_JENKINS_H__ /* * Taken from http://burtleburtle.net/bob/c/lookup3.c * $FreeBSD$ */ +#include +#include + /* ------------------------------------------------------------------------------- - lookup3.c, by Bob Jenkins, May 2006, Public Domain. - - These are functions for producing 32-bit hashes for hash table lookup. - hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() - are externally useful functions. Routines to test the hash are included - if SELF_TEST is defined. You can use this free for any purpose. It's in - the public domain. It has no warranty. - - You probably want to use hashlittle(). hashlittle() and hashbig() - hash byte arrays. hashlittle() is faster than hashbig() on - little-endian machines. Intel and AMD are little-endian machines. - On second thought, you probably want hashlittle2(), which is identical to - hashlittle() except it returns two 32-bit hashes for the price of one. - You could implement hashbig2() if you wanted but I haven't bothered here. +lookup3.c, by Bob Jenkins, May 2006, Public Domain. - If you want to find a hash of, say, exactly 7 integers, do - a = i1; b = i2; c = i3; - mix(a,b,c); - a += i4; b += i5; c += i6; - mix(a,b,c); - a += i7; - final(a,b,c); - then use c as the hash value. If you have a variable length array of - 4-byte integers to hash, use hashword(). If you have a byte array (like - a character string), use hashlittle(). If you have several byte arrays, or - a mix of things, see the comments above hashlittle(). - - Why is this so big? I read 12 bytes at a time into 3 4-byte integers, - then mix those integers. This is fast (you can do a lot more thorough - mixing with 12*3 instructions on 3 integers than you can with 3 instructions - on 1 byte), but shoehorning those bytes into integers efficiently is messy. +These are functions for producing 32-bit hashes for hash table lookup. +hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() +are externally useful functions. Routines to test the hash are included +if SELF_TEST is defined. You can use this free for any purpose. It's in +the public domain. It has no warranty. + +You probably want to use hashlittle(). hashlittle() and hashbig() +hash byte arrays. hashlittle() is is faster than hashbig() on +little-endian machines. Intel and AMD are little-endian machines. +On second thought, you probably want hashlittle2(), which is identical to +hashlittle() except it returns two 32-bit hashes for the price of one. +You could implement hashbig2() if you wanted but I haven't bothered here. + +If you want to find a hash of, say, exactly 7 integers, do + a = i1; b = i2; c = i3; + mix(a,b,c); + a += i4; b += i5; c += i6; + mix(a,b,c); + a += i7; + final(a,b,c); +then use c as the hash value. If you have a variable length array of +4-byte integers to hash, use hashword(). If you have a byte array (like +a character string), use hashlittle(). If you have several byte arrays, or +a mix of things, see the comments above hashlittle(). + +Why is this so big? I read 12 bytes at a time into 3 4-byte integers, +then mix those integers. This is fast (you can do a lot more thorough +mixing with 12*3 instructions on 3 integers than you can with 3 instructions +on 1 byte), but shoehorning those bytes into integers efficiently is messy. ------------------------------------------------------------------------------- */ @@ -146,12 +147,10 @@ and these came close: hashlittle() has to dance around fitting the key bytes into registers. -------------------------------------------------------------------- */ -static uint32_t -jenkins_hashword( - const uint32_t *k, /* the key, an array of uint32_t values */ - size_t length, /* the length of the key, in uint32_ts */ - uint32_t initval /* the previous hash, or an arbitrary value */ -) +uint32_t jenkins_hash32( +const uint32_t *k, /* the key, an array of uint32_t values */ +size_t length, /* the length of the key, in uint32_ts */ +uint32_t initval) /* the previous hash, or an arbitrary value */ { uint32_t a,b,c; @@ -182,4 +181,283 @@ jenkins_hashword( /*------------------------------------------------------ report the result */ return c; } -#endif + +#if BYTE_ORDER == LITTLE_ENDIAN +/* +------------------------------------------------------------------------------- +hashlittle() -- hash a variable-length key into a 32-bit value + k : the key (the unaligned variable-length array of bytes) + length : the length of the key, counting by bytes + initval : can be any 4-byte value +Returns a 32-bit value. Every bit of the key affects every bit of +the return value. Two keys differing by one or two bits will have +totally different hash values. + +The best hash table sizes are powers of 2. There is no need to do +mod a prime (mod is sooo slow!). If you need less than 32 bits, +use a bitmask. For example, if you need only 10 bits, do + h = (h & hashmask(10)); +In which case, the hash table should have hashsize(10) elements. + +If you are hashing n strings (uint8_t **)k, do it like this: + for (i=0, h=0; i 12) + { + a += k[0]; + b += k[1]; + c += k[2]; + mix(a,b,c); + length -= 12; + k += 3; + } + + /*----------------------------- handle the last (probably partial) block */ + /* + * "k[2]&0xffffff" actually reads beyond the end of the string, but + * then masks off the part it's not allowed to read. Because the + * string is aligned, the masked-off tail is in the same word as the + * rest of the string. Every machine with memory protection I've seen + * does it on word boundaries, so is OK with this. But VALGRIND will + * still catch it and complain. The masking trick does make the hash + * noticably faster for short strings (like English words). + */ + + switch(length) + { + case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; + case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; + case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; + case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; + case 8 : b+=k[1]; a+=k[0]; break; + case 7 : b+=k[1]&0xffffff; a+=k[0]; break; + case 6 : b+=k[1]&0xffff; a+=k[0]; break; + case 5 : b+=k[1]&0xff; a+=k[0]; break; + case 4 : a+=k[0]; break; + case 3 : a+=k[0]&0xffffff; break; + case 2 : a+=k[0]&0xffff; break; + case 1 : a+=k[0]&0xff; break; + case 0 : return c; /* zero length strings require no mixing */ + } + + } else if ((u.i & 0x1) == 0) { + const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */ + const uint8_t *k8; + + /*--------------- all but last block: aligned reads and different mixing */ + while (length > 12) + { + a += k[0] + (((uint32_t)k[1])<<16); + b += k[2] + (((uint32_t)k[3])<<16); + c += k[4] + (((uint32_t)k[5])<<16); + mix(a,b,c); + length -= 12; + k += 6; + } + + /*----------------------------- handle the last (probably partial) block */ + k8 = (const uint8_t *)k; + switch(length) + { + case 12: c+=k[4]+(((uint32_t)k[5])<<16); + b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 11: c+=((uint32_t)k8[10])<<16; /* fall through */ + case 10: c+=k[4]; + b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 9 : c+=k8[8]; /* fall through */ + case 8 : b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ + case 6 : b+=k[2]; + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 5 : b+=k8[4]; /* fall through */ + case 4 : a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ + case 2 : a+=k[0]; + break; + case 1 : a+=k8[0]; + break; + case 0 : return c; /* zero length requires no mixing */ + } + + } else { /* need to read the key one byte at a time */ + const uint8_t *k = (const uint8_t *)key; + + /*--------------- all but the last block: affect some 32 bits of (a,b,c) */ + while (length > 12) + { + a += k[0]; + a += ((uint32_t)k[1])<<8; + a += ((uint32_t)k[2])<<16; + a += ((uint32_t)k[3])<<24; + b += k[4]; + b += ((uint32_t)k[5])<<8; + b += ((uint32_t)k[6])<<16; + b += ((uint32_t)k[7])<<24; + c += k[8]; + c += ((uint32_t)k[9])<<8; + c += ((uint32_t)k[10])<<16; + c += ((uint32_t)k[11])<<24; + mix(a,b,c); + length -= 12; + k += 12; + } + + /*-------------------------------- last block: affect all 32 bits of (c) */ + switch(length) /* all the case statements fall through */ + { + case 12: c+=((uint32_t)k[11])<<24; + case 11: c+=((uint32_t)k[10])<<16; + case 10: c+=((uint32_t)k[9])<<8; + case 9 : c+=k[8]; + case 8 : b+=((uint32_t)k[7])<<24; + case 7 : b+=((uint32_t)k[6])<<16; + case 6 : b+=((uint32_t)k[5])<<8; + case 5 : b+=k[4]; + case 4 : a+=((uint32_t)k[3])<<24; + case 3 : a+=((uint32_t)k[2])<<16; + case 2 : a+=((uint32_t)k[1])<<8; + case 1 : a+=k[0]; + break; + case 0 : return c; + } + } + + final(a,b,c); + return c; +} + +#else /* !(BYTE_ORDER == LITTLE_ENDIAN) */ + +/* + * hashbig(): + * This is the same as hashword() on big-endian machines. It is different + * from hashlittle() on all machines. hashbig() takes advantage of + * big-endian byte ordering. + */ +uint32_t jenkins_hash( const void *key, size_t length, uint32_t initval) +{ + uint32_t a,b,c; + union { const void *ptr; size_t i; } u; /* to cast key to (size_t) happily */ + + /* Set up the internal state */ + a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; + + u.ptr = key; + if ((u.i & 0x3) == 0) { + const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ + + /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */ + while (length > 12) + { + a += k[0]; + b += k[1]; + c += k[2]; + mix(a,b,c); + length -= 12; + k += 3; + } + + /*----------------------------- handle the last (probably partial) block */ + /* + * "k[2]<<8" actually reads beyond the end of the string, but + * then shifts out the part it's not allowed to read. Because the + * string is aligned, the illegal read is in the same word as the + * rest of the string. Every machine with memory protection I've seen + * does it on word boundaries, so is OK with this. But VALGRIND will + * still catch it and complain. The masking trick does make the hash + * noticably faster for short strings (like English words). + */ + + switch(length) + { + case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; + case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break; + case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break; + case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break; + case 8 : b+=k[1]; a+=k[0]; break; + case 7 : b+=k[1]&0xffffff00; a+=k[0]; break; + case 6 : b+=k[1]&0xffff0000; a+=k[0]; break; + case 5 : b+=k[1]&0xff000000; a+=k[0]; break; + case 4 : a+=k[0]; break; + case 3 : a+=k[0]&0xffffff00; break; + case 2 : a+=k[0]&0xffff0000; break; + case 1 : a+=k[0]&0xff000000; break; + case 0 : return c; /* zero length strings require no mixing */ + } + + } else { /* need to read the key one byte at a time */ + const uint8_t *k = (const uint8_t *)key; + + /*--------------- all but the last block: affect some 32 bits of (a,b,c) */ + while (length > 12) + { + a += ((uint32_t)k[0])<<24; + a += ((uint32_t)k[1])<<16; + a += ((uint32_t)k[2])<<8; + a += ((uint32_t)k[3]); + b += ((uint32_t)k[4])<<24; + b += ((uint32_t)k[5])<<16; + b += ((uint32_t)k[6])<<8; + b += ((uint32_t)k[7]); + c += ((uint32_t)k[8])<<24; + c += ((uint32_t)k[9])<<16; + c += ((uint32_t)k[10])<<8; + c += ((uint32_t)k[11]); + mix(a,b,c); + length -= 12; + k += 12; + } + + /*-------------------------------- last block: affect all 32 bits of (c) */ + switch(length) /* all the case statements fall through */ + { + case 12: c+=k[11]; + case 11: c+=((uint32_t)k[10])<<8; + case 10: c+=((uint32_t)k[9])<<16; + case 9 : c+=((uint32_t)k[8])<<24; + case 8 : b+=k[7]; + case 7 : b+=((uint32_t)k[6])<<8; + case 6 : b+=((uint32_t)k[5])<<16; + case 5 : b+=((uint32_t)k[4])<<24; + case 4 : a+=k[3]; + case 3 : a+=((uint32_t)k[2])<<8; + case 2 : a+=((uint32_t)k[1])<<16; + case 1 : a+=((uint32_t)k[0])<<24; + break; + case 0 : return c; + } + } + + final(a,b,c); + return c; +} +#endif Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Tue Sep 4 12:02:23 2012 (r240085) +++ head/sys/net/flowtable.c Tue Sep 4 12:07:33 2012 (r240086) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include struct ipv4_tuple { @@ -585,7 +585,7 @@ ipv4_flow_lookup_hash_internal( } else offset = V_flow_hashjitter + proto; - return (jenkins_hashword(key, 3, offset)); + return (jenkins_hash32(key, 3, offset)); } static struct flentry * @@ -791,7 +791,7 @@ ipv6_flow_lookup_hash_internal( } else offset = V_flow_hashjitter + proto; - return (jenkins_hashword(key, 9, offset)); + return (jenkins_hash32(key, 9, offset)); } static struct flentry * Modified: head/sys/sys/hash.h ============================================================================== --- head/sys/sys/hash.h Tue Sep 4 12:02:23 2012 (r240085) +++ head/sys/sys/hash.h Tue Sep 4 12:07:33 2012 (r240086) @@ -118,4 +118,13 @@ hash32_strne(const void *buf, size_t len return hash; } + +#ifdef _KERNEL +/* + * Hashing function from Bob Jenkins. Implementation in libkern/jenkins_hash.c. + */ +uint32_t jenkins_hash(const void *, size_t, uint32_t); +uint32_t jenkins_hash32(const uint32_t *, size_t, uint32_t); +#endif /* _KERNEL */ + #endif /* !_SYS_HASH_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 12:19:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDA74106566B; Tue, 4 Sep 2012 12:19:34 +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 AE91E8FC12; Tue, 4 Sep 2012 12:19:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84CJYsU052739; Tue, 4 Sep 2012 12:19:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84CJYQK052737; Tue, 4 Sep 2012 12:19:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209041219.q84CJYQK052737@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 4 Sep 2012 12:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240087 - head/bin/setfacl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 12:19:35 -0000 Author: trasz Date: Tue Sep 4 12:19:34 2012 New Revision: 240087 URL: http://svn.freebsd.org/changeset/base/240087 Log: Fix an error in setfacl(1) that manifested like this: # setfacl -m u:trasz:rwx x # setfacl -m u:root:rwx x # getfacl x # file: x # owner: root # group: wheel user::rw- user:root:rwx user:trasz:rwx group::r-- mask::rwx other::r-- # setfacl -m u:root:rwx x setfacl: x: acl_calc_mask() failed: Invalid argument setfacl: x: failed to set ACL mask For NFSv4 ACLs, this sort of situation would result in duplicated entries. MFC after: 1 month Modified: head/bin/setfacl/merge.c Modified: head/bin/setfacl/merge.c ============================================================================== --- head/bin/setfacl/merge.c Tue Sep 4 12:07:33 2012 (r240086) +++ head/bin/setfacl/merge.c Tue Sep 4 12:19:34 2012 (r240087) @@ -94,7 +94,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co acl_tag_t tag, tag_new; acl_entry_type_t entry_type, entry_type_new; acl_flagset_t flagset; - int entry_id, entry_id_new, have_entry, entry_number = 0; + int entry_id, entry_id_new, have_entry, had_entry, entry_number = 0; int acl_brand, prev_acl_brand; acl_get_brand_np(acl, &acl_brand); @@ -116,6 +116,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co while (acl_get_entry(acl, entry_id, &entry) == 1) { entry_id = ACL_NEXT_ENTRY; have_entry = 0; + had_entry = 0; /* keep track of existing ACL_MASK entries */ if (acl_get_tag_type(entry, &tag) == -1) @@ -187,7 +188,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co err(1, "%s: acl_set_flagset_np() failed", filename); } - have_entry = 1; + had_entry = have_entry = 1; break; default: /* should never be here */ @@ -197,7 +198,7 @@ merge_acl(acl_t acl, acl_t *prev_acl, co } /* if this entry has not been found, it must be new */ - if (have_entry == 0) { + if (had_entry == 0) { /* * NFSv4 ACL entries must be prepended to the ACL. From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 12:27:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D29510656D2; Tue, 4 Sep 2012 12:27: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 68D8F8FC1E; Tue, 4 Sep 2012 12:27:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84CROu9053731; Tue, 4 Sep 2012 12:27:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84CRNZU053729; Tue, 4 Sep 2012 12:27:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201209041227.q84CRNZU053729@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 4 Sep 2012 12:27: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: r240088 - head/bin/cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 12:27:24 -0000 Author: trasz Date: Tue Sep 4 12:27:23 2012 New Revision: 240088 URL: http://svn.freebsd.org/changeset/base/240088 Log: Explicitly mention that "cp -p" copies ACLs. PR: docs/168962 MFC after: 1 month Modified: head/bin/cp/cp.1 Modified: head/bin/cp/cp.1 ============================================================================== --- head/bin/cp/cp.1 Tue Sep 4 12:19:34 2012 (r240087) +++ head/bin/cp/cp.1 Tue Sep 4 12:27:23 2012 (r240088) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd January 17, 2010 +.Dd September 4, 2012 .Dt CP 1 .Os .Sh NAME @@ -164,7 +164,7 @@ Cause .Nm to preserve the following attributes of each source file in the copy: modification time, access time, -file flags, file mode, user ID, and group ID, as allowed by permissions. +file flags, file mode, ACL, user ID, and group ID, as allowed by permissions. .Pp If the user ID and group ID cannot be preserved, no error message is displayed and the exit value is not altered. From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 15:58:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29FE11065670; Tue, 4 Sep 2012 15:58:59 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 143C78FC14; Tue, 4 Sep 2012 15:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84FwwYU080034; Tue, 4 Sep 2012 15:58:58 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Fwwbw080032; Tue, 4 Sep 2012 15:58:58 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041558.q84Fwwbw080032@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 15:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240089 - stable/9/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 15:58:59 -0000 Author: jimharris Date: Tue Sep 4 15:58:58 2012 New Revision: 240089 URL: http://svn.freebsd.org/changeset/base/240089 Log: MFC r239889: Do not call sati_check_data_io() for SATI_UNMAP sequences. This routine is intended only for commands such as INQUIRY where the controller may fill out a smaller amount of data than allocated by the host. The end result of this bug was that isci(4) would report non-zero resid for successful SCSI_UNMAP commands. Sponsored by: Intel Modified: stable/9/sys/dev/isci/scil/sati.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/isci/scil/sati.c ============================================================================== --- stable/9/sys/dev/isci/scil/sati.c Tue Sep 4 12:27:23 2012 (r240088) +++ stable/9/sys/dev/isci/scil/sati.c Tue Sep 4 15:58:58 2012 (r240089) @@ -1095,10 +1095,6 @@ SATI_STATUS sati_translate_command_respo status = sati_unmap_translate_response( sequence, scsi_io, ata_io ); - if(status == SATI_COMPLETE) - { - status = sati_check_data_io(sequence); - } break; #endif // !defined(DISABLE_SATI_UNMAP) From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 16:00:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6A851065675; Tue, 4 Sep 2012 16:00:51 +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 B0A6A8FC14; Tue, 4 Sep 2012 16:00:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84G0pSd080314; Tue, 4 Sep 2012 16:00:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84G0p4u080312; Tue, 4 Sep 2012 16:00:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201209041600.q84G0p4u080312@svn.freebsd.org> From: Doug Barton Date: Tue, 4 Sep 2012 16:00: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: r240090 - head/libexec/save-entropy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 16:00:52 -0000 Author: dougb Date: Tue Sep 4 16:00:51 2012 New Revision: 240090 URL: http://svn.freebsd.org/changeset/base/240090 Log: 1. Use install -d to create the entropy_dir if missing so that we can do it all in one command, with no permissions race. 2. Simplify the rotation logic by cd'ing into the directory, with a test to make sure that it succeeds. 3. Remove any files numbered higher than entropy_save_num. This helps when the user reduces the number, and may be useful for other purposes down the road. 4. Simplify the rotation logic by first testing the common case (it's a regular file) then testing if something else exists with the same name using elif. Also switch from using jot to simpler countdown format. 5. Fix logger lines and error messages to be more consistent, and wrap the code more consistently in the 80 column range. The "not a regular file" error message was mistakenly wrapped entirely in "quotes" which caused logger to include line-wrapping whitespace. Change that to wrap only the variables in quotes, which is both consistent and works better. 6. Update copyright to reflect the fact that changes were made this year. Parts of 2-4 were taken from etc/periodic/daily/310.accounting Modified: head/libexec/save-entropy/save-entropy.sh Modified: head/libexec/save-entropy/save-entropy.sh ============================================================================== --- head/libexec/save-entropy/save-entropy.sh Tue Sep 4 15:58:58 2012 (r240089) +++ head/libexec/save-entropy/save-entropy.sh Tue Sep 4 16:00:51 2012 (r240090) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2001-2006 Douglas Barton, DougB@FreeBSD.org +# Copyright (c) 2001-2006,2012 Douglas Barton, dougb@FreeBSD.org # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ # This script is called by cron to store bits of randomness which are # then used to seed /dev/random on boot. -# Originally developed by Doug Barton, DougB@FreeBSD.org +# Originally developed by Doug Barton, dougb@FreeBSD.org PATH=/bin:/usr/bin @@ -55,38 +55,36 @@ entropy_save_sz=${entropy_save_sz:-2048} entropy_save_num=${entropy_save_num:-8} if [ ! -d "${entropy_dir}" ]; then - umask 077 - mkdir "${entropy_dir}" || { - logger -is -t "$0" The entropy directory "${entropy_dir}" does not \ -exist, and cannot be created. Therefore no entropy can be saved. ; - exit 1;} - /usr/sbin/chown operator:operator "${entropy_dir}" - chmod 0700 "${entropy_dir}" + install -d -o operator -g operator -m 0700 "${entropy_dir}" || { + logger -is -t "$0" The entropy directory "${entropy_dir}" does \ + not exist, and cannot be created. Therefore no entropy can \ + be saved.; exit 1; } fi +cd "${entropy_dir}" || { + logger -is -t "$0" Cannot cd to the entropy directory: "${entropy_dir}". \ + Entropy file rotation is aborted.; exit 1; } + +for f in saved-entropy.*; do + case "${f}" in saved-entropy.\*) continue ;; esac # No files match + [ ${f#saved-entropy\.} -ge ${entropy_save_num} ] && unlink ${f} +done + umask 377 -esn_m1=$(( ${entropy_save_num} - 1 )) -for file_num in `jot $esn_m1 $esn_m1 1`; do - if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then - if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then - new_file=saved-entropy.$(( $file_num + 1 )) - if [ -e "${entropy_dir}/${new_file}" ]; then - unlink ${entropy_dir}/${new_file} - fi - mv "${entropy_dir}/saved-entropy.${file_num}" \ - "${entropy_dir}/${new_file}" - else - logger -is -t "$0" \ -"${entropy_dir}/saved-entropy.${file_num} is not a regular file, and therefore \ -it will not be rotated. Entropy file harvesting is aborted." - exit 1 - fi +n=$(( ${entropy_save_num} - 1 )) +while [ ${n} -ge 1 ]; do + if [ -f "saved-entropy.${n}" ]; then + mv "saved-entropy.${n}" "saved-entropy.$(( ${n} + 1 ))" + elif [ -e "saved-entropy.${n}" -o -L "saved-entropy.${n}" ]; then + logger -is -t "$0" \ + "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ + it will not be rotated. Entropy file rotation is aborted. + exit 1 fi + n=$(( ${n} - 1 )) done -dd if=/dev/random of="${entropy_dir}/saved-entropy.1" \ - bs="$entropy_save_sz" count=1 2> /dev/null +dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null exit 0 - From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 17:13:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87D241065674; Tue, 4 Sep 2012 17:13:52 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72E9F8FC1A; Tue, 4 Sep 2012 17:13:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84HDqc4090542; Tue, 4 Sep 2012 17:13:52 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84HDqTp090540; Tue, 4 Sep 2012 17:13:52 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041713.q84HDqTp090540@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 17:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240091 - stable/8/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 17:13:52 -0000 Author: jimharris Date: Tue Sep 4 17:13:52 2012 New Revision: 240091 URL: http://svn.freebsd.org/changeset/base/240091 Log: MFC r239889: Do not call sati_check_data_io() for SATI_UNMAP sequences. This routine is intended only for commands such as INQUIRY where the controller may fill out a smaller amount of data than allocated by the host. The end result of this bug was that isci(4) would report non-zero resid for successful SCSI_UNMAP commands. Sponsored by: Intel Modified: stable/8/sys/dev/isci/scil/sati.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/isci/scil/sati.c ============================================================================== --- stable/8/sys/dev/isci/scil/sati.c Tue Sep 4 16:00:51 2012 (r240090) +++ stable/8/sys/dev/isci/scil/sati.c Tue Sep 4 17:13:52 2012 (r240091) @@ -1095,10 +1095,6 @@ SATI_STATUS sati_translate_command_respo status = sati_unmap_translate_response( sequence, scsi_io, ata_io ); - if(status == SATI_COMPLETE) - { - status = sati_check_data_io(sequence); - } break; #endif // !defined(DISABLE_SATI_UNMAP) From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 17:15:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D9D7106566B; Tue, 4 Sep 2012 17:15:20 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC19A8FC1B; Tue, 4 Sep 2012 17:15:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84HFJxN090750; Tue, 4 Sep 2012 17:15:19 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84HFJZT090748; Tue, 4 Sep 2012 17:15:19 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041715.q84HFJZT090748@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 17:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240092 - stable/7/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 17:15:20 -0000 Author: jimharris Date: Tue Sep 4 17:15:19 2012 New Revision: 240092 URL: http://svn.freebsd.org/changeset/base/240092 Log: MFC r239889: Do not call sati_check_data_io() for SATI_UNMAP sequences. This routine is intended only for commands such as INQUIRY where the controller may fill out a smaller amount of data than allocated by the host. The end result of this bug was that isci(4) would report non-zero resid for successful SCSI_UNMAP commands. Sponsored by: Intel Modified: stable/7/sys/dev/isci/scil/sati.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/isci/scil/sati.c ============================================================================== --- stable/7/sys/dev/isci/scil/sati.c Tue Sep 4 17:13:52 2012 (r240091) +++ stable/7/sys/dev/isci/scil/sati.c Tue Sep 4 17:15:19 2012 (r240092) @@ -1095,10 +1095,6 @@ SATI_STATUS sati_translate_command_respo status = sati_unmap_translate_response( sequence, scsi_io, ata_io ); - if(status == SATI_COMPLETE) - { - status = sati_check_data_io(sequence); - } break; #endif // !defined(DISABLE_SATI_UNMAP) From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 17:24:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67BA9106564A; Tue, 4 Sep 2012 17:24:12 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 521738FC15; Tue, 4 Sep 2012 17:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84HOC6F091782; Tue, 4 Sep 2012 17:24:12 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84HOCVF091780; Tue, 4 Sep 2012 17:24:12 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041724.q84HOCVF091780@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 17:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240093 - stable/9/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 17:24:12 -0000 Author: jimharris Date: Tue Sep 4 17:24:11 2012 New Revision: 240093 URL: http://svn.freebsd.org/changeset/base/240093 Log: MFC r239571: Add -m option (for printing sampled PCs to a file) to pmcstat usage message. Modified: stable/9/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:15:19 2012 (r240092) +++ stable/9/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:24:11 2012 (r240093) @@ -509,6 +509,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" "\t -p spec\t allocate a process-private counting PMC\n" From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 17:27:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD829106566C; Tue, 4 Sep 2012 17:27:21 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C86AE8FC17; Tue, 4 Sep 2012 17:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84HRLiw092197; Tue, 4 Sep 2012 17:27:21 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84HRLKx092194; Tue, 4 Sep 2012 17:27:21 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041727.q84HRLKx092194@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 17:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240094 - stable/8/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 17:27:22 -0000 Author: jimharris Date: Tue Sep 4 17:27:21 2012 New Revision: 240094 URL: http://svn.freebsd.org/changeset/base/240094 Log: MFC r239571: Add -m option (for printing sampled PCs to a file) to pmcstat usage message. Modified: stable/8/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/8/usr.sbin/pmcstat/ (props changed) Modified: stable/8/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/8/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:24:11 2012 (r240093) +++ stable/8/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:27:21 2012 (r240094) @@ -512,6 +512,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" "\t -p spec\t allocate a process-private counting PMC\n" From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 17:29:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEDE8106564A; Tue, 4 Sep 2012 17:29:35 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9B428FC16; Tue, 4 Sep 2012 17:29:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84HTZa8092511; Tue, 4 Sep 2012 17:29:35 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84HTZFk092509; Tue, 4 Sep 2012 17:29:35 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209041729.q84HTZFk092509@svn.freebsd.org> From: Jim Harris Date: Tue, 4 Sep 2012 17:29:35 +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: r240095 - stable/7/usr.sbin/pmcstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 17:29:36 -0000 Author: jimharris Date: Tue Sep 4 17:29:35 2012 New Revision: 240095 URL: http://svn.freebsd.org/changeset/base/240095 Log: MFC r239571: Add -m option (for printing sampled PCs to a file) to pmcstat usage message. Modified: stable/7/usr.sbin/pmcstat/pmcstat.c Directory Properties: stable/7/usr.sbin/pmcstat/ (props changed) Modified: stable/7/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/7/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:27:21 2012 (r240094) +++ stable/7/usr.sbin/pmcstat/pmcstat.c Tue Sep 4 17:29:35 2012 (r240095) @@ -512,6 +512,7 @@ pmcstat_show_usage(void) "\t -f spec\t pass \"spec\" to as plugin option\n" "\t -g\t\t produce gprof(1) compatible profiles\n" "\t -k dir\t\t set the path to the kernel\n" + "\t -m file\t print sampled PCs to \"file\"\n" "\t -n rate\t set sampling rate\n" "\t -o file\t send print output to \"file\"\n" "\t -p spec\t allocate a process-private counting PMC\n" From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 18:14:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA39A106564A; Tue, 4 Sep 2012 18:14:27 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 688618FC14; Tue, 4 Sep 2012 18:14:26 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id CF7E2119C56; Tue, 4 Sep 2012 20:14:25 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id yiY+hZqZQyIE; Tue, 4 Sep 2012 20:14:25 +0200 (CEST) Received: from [10.0.0.112] (nat3-133.ghnet.pl [91.150.222.133]) by smtp.semihalf.com (Postfix) with ESMTPSA id C10EB119C40; Tue, 4 Sep 2012 20:14:24 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Rafal Jaworowski In-Reply-To: <201209020148.q821ml0M018010@svn.freebsd.org> Date: Tue, 4 Sep 2012 20:14:23 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <07899894-3253-4F16-9CAB-8339E23D57F8@semihalf.com> References: <201209020148.q821ml0M018010@svn.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 18:14:27 -0000 On 2012-09-02, at 03:48, Andrew Turner wrote: > Author: andrew > Date: Sun Sep 2 01:48:47 2012 > New Revision: 239998 > URL: http://svn.freebsd.org/changeset/base/239998 >=20 > Log: > Fix a logic inversion in an assert to allow us to use dts files that > include other files. >=20 > Modified: > head/contrib/dtc/dtc-lexer.l Is this a bug in the dtc that should be upstreamed perhaps, or is it = fixed at the point beyond our recent import of the vendor package? Rafal From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 19:04:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98546106566C; Tue, 4 Sep 2012 19:04:02 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 826C78FC15; Tue, 4 Sep 2012 19:04:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84J42so004103; Tue, 4 Sep 2012 19:04:02 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84J42ng004100; Tue, 4 Sep 2012 19:04:02 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209041904.q84J42ng004100@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 19:04: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: r240096 - 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: Tue, 04 Sep 2012 19:04:02 -0000 Author: des Date: Tue Sep 4 19:04:02 2012 New Revision: 240096 URL: http://svn.freebsd.org/changeset/base/240096 Log: No memory barrier is required. This was pointed out by kib@ a while ago, but I got distracted by other matters. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Sep 4 17:29:35 2012 (r240095) +++ head/sys/vm/swap_pager.c Tue Sep 4 19:04:02 2012 (r240096) @@ -50,7 +50,7 @@ * * - on the fly reallocation of swap during putpages. The new system * does not try to keep previously allocated swap blocks for dirty - * pages. + * pages. * * - on the fly deallocation of swap * @@ -154,15 +154,21 @@ int swap_pager_avail; static int swdev_syscall_active = 0; /* serialize swap(on|off) */ static vm_ooffset_t swap_total; -SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, "Total amount of available swap storage."); static vm_ooffset_t swap_reserved; -SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, +SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); +static unsigned long swzone; +SYSCTL_ULONG(_vm, OID_AUTO, swzone, CTLFLAG_RD, &swzone, 0, + "Actual size of swap metadata zone"); +static unsigned long swap_maxpages; +SYSCTL_ULONG(_vm, OID_AUTO, swap_maxpages, CTLFLAG_RD, &swap_maxpages, 0, + "Maximum amount of swap supported"); /* bits from overcommit */ #define SWAP_RESERVE_FORCE_ON (1 << 0) @@ -184,7 +190,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, static int curfail; static struct timeval lastfail; struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (incr & PAGE_MASK) @@ -285,7 +291,7 @@ void swap_release_by_cred(vm_ooffset_t decr, struct ucred *cred) { struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (decr & PAGE_MASK) @@ -328,7 +334,7 @@ static struct sx sw_alloc_sx; SYSCTL_INT(_vm, OID_AUTO, swap_async_max, - CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); + CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); /* * "named" and "unnamed" anon region objects. Try to reduce the overhead @@ -340,7 +346,7 @@ SYSCTL_INT(_vm, OID_AUTO, swap_async_max #define NOBJLIST(handle) \ (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) -static struct mtx sw_alloc_mtx; /* protect list manipulation */ +static struct mtx sw_alloc_mtx; /* protect list manipulation */ static struct pagerlst swap_pager_object_list[NOBJLISTS]; static uma_zone_t swap_zone; static struct vm_object swap_zone_obj; @@ -419,7 +425,7 @@ swp_pager_free_nrpage(vm_page_t m) /* * SWP_SIZECHECK() - update swap_pager_full indication - * + * * update the swap_pager_almost_full indication and warn when we are * about to run out of swap space, using lowat/hiwat hysteresis. * @@ -474,7 +480,7 @@ swp_pager_hash(vm_object_t object, vm_pi /* * SWAP_PAGER_INIT() - initialize the swap pager! * - * Expected to be started from system init. NOTE: This code is run + * Expected to be started from system init. NOTE: This code is run * before much else so be careful what you depend on. Most of the VM * system has yet to be initialized at this point. */ @@ -506,7 +512,7 @@ swap_pager_init(void) void swap_pager_swap_init(void) { - int n, n2; + unsigned long n, n2; /* * Number of in-transit swap bp operations. Don't @@ -519,7 +525,7 @@ swap_pager_swap_init(void) * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are * constrained by the swap device interleave stripe size. * - * Currently we hardwire nsw_wcount_async to 4. This limit is + * Currently we hardwire nsw_wcount_async to 4. This limit is * designed to prevent other I/O from having high latencies due to * our pageout I/O. The value 4 works well for one or two active swap * devices but is probably a little low if you have more. Even so, @@ -548,11 +554,11 @@ swap_pager_swap_init(void) n = cnt.v_page_count / 2; if (maxswzone && n > maxswzone / sizeof(struct swblock)) n = maxswzone / sizeof(struct swblock); - n2 = n; swap_zone = uma_zcreate("SWAPMETA", sizeof(struct swblock), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); if (swap_zone == NULL) panic("failed to create swap_zone."); + n2 = n; do { if (uma_zone_set_obj(swap_zone, &swap_zone_obj, n)) break; @@ -563,12 +569,13 @@ swap_pager_swap_init(void) n -= ((n + 2) / 3); } while (n > 0); if (n2 != n) - printf("Swap zone entries reduced from %d to %d.\n", n2, n); - n2 = n; + printf("Swap zone entries reduced from %lu to %lu.\n", n2, n); + swap_maxpages = n * SWAP_META_PAGES; + swzone = n * sizeof(struct swblock); /* * Initialize our meta-data hash table. The swapper does not need to - * be quite as efficient as the VM system, so we do not use an + * be quite as efficient as the VM system, so we do not use an * oversized hash table. * * n: size of hash table, must be power of 2 @@ -654,7 +661,7 @@ swap_pager_alloc(void *handle, vm_ooffse /* * SWAP_PAGER_DEALLOC() - remove swap metadata from object * - * The swap backing for the object is destroyed. The code is + * The swap backing for the object is destroyed. The code is * designed such that we can reinstantiate it later, but this * routine is typically called only when the entire object is * about to be destroyed. @@ -679,7 +686,7 @@ swap_pager_dealloc(vm_object_t object) vm_object_pip_wait(object, "swpdea"); /* - * Free all remaining metadata. We only bother to free it from + * Free all remaining metadata. We only bother to free it from * the swap meta data. We do not attempt to free swapblk's still * associated with vm_page_t's for this object. We do not care * if paging is still in progress on some objects. @@ -748,7 +755,7 @@ swp_pager_isondev(daddr_t blk, struct sw return (blk >= sp->sw_first && blk < sp->sw_end); } - + static void swp_pager_strategy(struct buf *bp) { @@ -764,10 +771,10 @@ swp_pager_strategy(struct buf *bp) } panic("Swapdev not found"); } - + /* - * SWP_PAGER_FREESWAPSPACE() - free raw swap space + * SWP_PAGER_FREESWAPSPACE() - free raw swap space * * This routine returns the specified swap blocks back to the bitmap. * @@ -785,7 +792,7 @@ swp_pager_freeswapspace(daddr_t blk, int /* * If we are attempting to stop swapping on * this device, we don't want to mark any - * blocks free lest they be reused. + * blocks free lest they be reused. */ if ((sp->sw_flags & SW_CLOSING) == 0) { blist_free(sp->sw_blist, blk - sp->sw_first, @@ -808,8 +815,8 @@ swp_pager_freeswapspace(daddr_t blk, int * * This routine removes swapblk assignments from swap metadata. * - * The external callers of this routine typically have already destroyed - * or renamed vm_page_t's associated with this range in the object so + * The external callers of this routine typically have already destroyed + * or renamed vm_page_t's associated with this range in the object so * we should be ok. */ void @@ -823,7 +830,7 @@ swap_pager_freespace(vm_object_t object, /* * SWAP_PAGER_RESERVE() - reserve swap blocks in object * - * Assigns swap blocks to the specified range within the object. The + * Assigns swap blocks to the specified range within the object. The * swap blocks are not zerod. Any previous swap assignment is destroyed. * * Returns 0 on success, -1 on failure. @@ -869,7 +876,7 @@ swap_pager_reserve(vm_object_t object, v * * This routine is allowed to sleep. It may sleep allocating metadata * indirectly through swp_pager_meta_build() or if paging is still in - * progress on the source. + * progress on the source. * * The source object contains no vm_page_t's (which is just as well) * @@ -888,8 +895,8 @@ swap_pager_copy(vm_object_t srcobject, v VM_OBJECT_LOCK_ASSERT(dstobject, MA_OWNED); /* - * If destroysource is set, we remove the source object from the - * swap_pager internal queue now. + * If destroysource is set, we remove the source object from the + * swap_pager internal queue now. */ if (destroysource) { if (srcobject->handle != NULL) { @@ -925,7 +932,7 @@ swap_pager_copy(vm_object_t srcobject, v daddr_t srcaddr; srcaddr = swp_pager_meta_ctl( - srcobject, + srcobject, i + offset, SWM_POP ); @@ -947,7 +954,7 @@ swap_pager_copy(vm_object_t srcobject, v * Destination has valid swapblk or it is represented * by a resident page. We destroy the sourceblock. */ - + swp_pager_meta_ctl(srcobject, i + offset, SWM_FREE); } } @@ -1042,7 +1049,7 @@ swap_pager_haspage(vm_object_t object, v * SWAP_PAGER_PAGE_UNSWAPPED() - remove swap backing store related to page * * This removes any associated swap backing store, whether valid or - * not, from the page. + * not, from the page. * * This routine is typically called when a page is made dirty, at * which point any associated swap can be freed. MADV_FREE also @@ -1071,7 +1078,7 @@ swap_pager_unswapped(vm_page_t m) * a chunk surrounding m[reqpage] as is contiguous in swap and which * belongs to the same object. * - * The code is designed for asynchronous operation and + * The code is designed for asynchronous operation and * immediate-notification of 'reqpage' but tends not to be * used that way. Please do not optimize-out this algorithmic * feature, I intend to improve on it in the future. @@ -1101,7 +1108,7 @@ swap_pager_getpages(vm_object_t object, * Calculate range to retrieve. The pages have already been assigned * their swapblks. We require a *contiguous* range but we know it to * not span devices. If we do not supply it, bad things - * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the + * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the * loops are set up such that the case(s) are handled implicitly. * * The swp_*() calls must be made with the object locked. @@ -1139,7 +1146,7 @@ swap_pager_getpages(vm_object_t object, } /* - * Return VM_PAGER_FAIL if we have nothing to do. Return mreq + * Return VM_PAGER_FAIL if we have nothing to do. Return mreq * still busy, but the others unbusied. */ if (blk == SWAPBLK_NONE) @@ -1234,21 +1241,21 @@ swap_pager_getpages(vm_object_t object, /* * A final note: in a low swap situation, we cannot deallocate swap * and mark a page dirty here because the caller is likely to mark - * the page clean when we return, causing the page to possibly revert + * the page clean when we return, causing the page to possibly revert * to all-zero's later. */ } /* - * swap_pager_putpages: + * swap_pager_putpages: * * Assign swap (if necessary) and initiate I/O on the specified pages. * * We support both OBJT_DEFAULT and OBJT_SWAP objects. DEFAULT objects * are automatically converted to SWAP objects. * - * In a low memory situation we may block in VOP_STRATEGY(), but the new - * vm_page reservation system coupled with properly written VFS devices + * In a low memory situation we may block in VOP_STRATEGY(), but the new + * vm_page reservation system coupled with properly written VFS devices * should ensure that no low-memory deadlock occurs. This is an area * which needs work. * @@ -1269,8 +1276,8 @@ swap_pager_putpages(vm_object_t object, int n = 0; if (count && m[0]->object != object) { - panic("swap_pager_putpages: object mismatch %p/%p", - object, + panic("swap_pager_putpages: object mismatch %p/%p", + object, m[0]->object ); } @@ -1292,7 +1299,7 @@ swap_pager_putpages(vm_object_t object, /* * Step 2 * - * Update nsw parameters from swap_async_max sysctl values. + * Update nsw parameters from swap_async_max sysctl values. * Do not let the sysop crash the machine with bogus numbers. */ mtx_lock(&pbuf_mtx); @@ -1384,7 +1391,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t mreq = m[i+j]; swp_pager_meta_build( - mreq->object, + mreq->object, mreq->pindex, blk + j ); @@ -1453,10 +1460,10 @@ swap_pager_putpages(vm_object_t object, * Completion routine for asynchronous reads and writes from/to swap. * Also called manually by synchronous code to finish up a bp. * - * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, - * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY - * unbusy all pages except the 'main' request page. For WRITE - * operations, we vm_page_t->busy'd unbusy all pages ( we can do this + * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, + * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY + * unbusy all pages except the 'main' request page. For WRITE + * operations, we vm_page_t->busy'd unbusy all pages ( we can do this * because we marked them all VM_PAGER_PEND on return from putpages ). * * This routine may not sleep. @@ -1475,7 +1482,7 @@ swp_pager_async_iodone(struct buf *bp) "swap_pager: I/O error - %s failed; blkno %ld," "size %ld, error %d\n", ((bp->b_iocmd == BIO_READ) ? "pagein" : "pageout"), - (long)bp->b_blkno, + (long)bp->b_blkno, (long)bp->b_bcount, bp->b_error ); @@ -1495,7 +1502,7 @@ swp_pager_async_iodone(struct buf *bp) * cleanup pages. If an error occurs writing to swap, we are in * very serious trouble. If it happens to be a disk error, though, * we may be able to recover by reassigning the swap later on. So - * in this case we remove the m->swapblk assignment for the page + * in this case we remove the m->swapblk assignment for the page * but do not free it in the rlist. The errornous block(s) are thus * never reallocated as swap. Redirty the page and continue. */ @@ -1508,7 +1515,7 @@ swp_pager_async_iodone(struct buf *bp) /* * If an error occurs I'd love to throw the swapblk * away without freeing it back to swapspace, so it - * can never be used again. But I can't from an + * can never be used again. But I can't from an * interrupt. */ if (bp->b_iocmd == BIO_READ) { @@ -1517,7 +1524,7 @@ swp_pager_async_iodone(struct buf *bp) * locked for the parent, but all other * pages can be freed. We still want to * wakeup the parent waiting on the page, - * though. ( also: pg_reqpage can be -1 and + * though. ( also: pg_reqpage can be -1 and * not match anything ). * * We have to wake specifically requested pages @@ -1534,7 +1541,7 @@ swp_pager_async_iodone(struct buf *bp) else vm_page_flash(m); /* - * If i == bp->b_pager.pg_reqpage, do not wake + * If i == bp->b_pager.pg_reqpage, do not wake * the page up. The caller needs to. */ } else { @@ -1551,7 +1558,7 @@ swp_pager_async_iodone(struct buf *bp) } } else if (bp->b_iocmd == BIO_READ) { /* - * NOTE: for reads, m->dirty will probably be + * NOTE: for reads, m->dirty will probably be * overridden by the original caller of getpages so * we cannot set them in order to free the underlying * swap in a low-swap situation. I don't think we'd @@ -1563,7 +1570,7 @@ swp_pager_async_iodone(struct buf *bp) * * Note that the requested page, reqpage, is left * busied, but we still have to wake it up. The - * other pages are released (unbusied) by + * other pages are released (unbusied) by * vm_page_wakeup(). */ KASSERT(!pmap_page_is_mapped(m), @@ -1577,7 +1584,7 @@ swp_pager_async_iodone(struct buf *bp) * up too because we cleared VPO_SWAPINPROG and * could be waiting for it in getpages. However, * be sure to not unbusy getpages specifically - * requested page - getpages expects it to be + * requested page - getpages expects it to be * left busy. */ if (i != bp->b_pager.pg_reqpage) { @@ -1590,7 +1597,7 @@ swp_pager_async_iodone(struct buf *bp) } else { /* * For write success, clear the dirty - * status, then finish the I/O ( which decrements the + * status, then finish the I/O ( which decrements the * busy count and possibly wakes waiter's up ). */ KASSERT(!pmap_page_is_write_mapped(m), @@ -1615,8 +1622,8 @@ swp_pager_async_iodone(struct buf *bp) VM_OBJECT_UNLOCK(object); } - /* - * swapdev_strategy() manually sets b_vp and b_bufobj before calling + /* + * swapdev_strategy() manually sets b_vp and b_bufobj before calling * bstrategy(). Set them back to NULL now we're done with it, or we'll * trigger a KASSERT in relpbuf(). */ @@ -1628,10 +1635,10 @@ swp_pager_async_iodone(struct buf *bp) * release the physical I/O buffer */ relpbuf( - bp, - ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : - ((bp->b_flags & B_ASYNC) ? - &nsw_wcount_async : + bp, + ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : + ((bp->b_flags & B_ASYNC) ? + &nsw_wcount_async : &nsw_wcount_sync ) ) @@ -1744,8 +1751,8 @@ restart: for (swap = swhash[i]; swap != NULL; swap = swap->swb_hnext) { vm_object_t object = swap->swb_object; vm_pindex_t pindex = swap->swb_index; - for (j = 0; j < SWAP_META_PAGES; ++j) { - if (swp_pager_isondev(swap->swb_pages[j], sp)) { + for (j = 0; j < SWAP_META_PAGES; ++j) { + if (swp_pager_isondev(swap->swb_pages[j], sp)) { /* avoid deadlock */ if (!VM_OBJECT_TRYLOCK(object)) { break; @@ -1758,7 +1765,7 @@ restart: goto restart; } } - } + } } } mtx_unlock(&swhash_mtx); @@ -1783,7 +1790,7 @@ restart: * SWAP META DATA * ************************************************************************ * - * These routines manipulate the swap metadata stored in the + * These routines manipulate the swap metadata stored in the * OBJT_SWAP object. * * Swap metadata is implemented with a global hash and not directly @@ -1821,13 +1828,13 @@ swp_pager_meta_build(vm_object_t object, mtx_lock(&sw_alloc_mtx); TAILQ_INSERT_TAIL( NOBJLIST(object->handle), - object, + object, pager_object_list ); mtx_unlock(&sw_alloc_mtx); } } - + /* * Locate hash entry. If not found create, but if we aren't adding * anything just return. If we run out of space in the map we wait @@ -1848,7 +1855,7 @@ retry: mtx_unlock(&swhash_mtx); VM_OBJECT_UNLOCK(object); if (uma_zone_exhausted(swap_zone)) { - if (atomic_cmpset_rel_int(&exhausted, 0, 1)) + if (atomic_cmpset_int(&exhausted, 0, 1)) printf("swap zone exhausted, " "increase kern.maxswzone\n"); vm_pageout_oom(VM_OOM_SWAPZ); @@ -1859,7 +1866,7 @@ retry: goto retry; } - if (atomic_cmpset_rel_int(&exhausted, 1, 0)) + if (atomic_cmpset_int(&exhausted, 1, 0)) printf("swap zone ok\n"); swap->swb_hnext = NULL; @@ -1896,10 +1903,10 @@ done: /* * SWP_PAGER_META_FREE() - free a range of blocks in the object's swap metadata * - * The requested range of blocks is freed, with any associated swap + * The requested range of blocks is freed, with any associated swap * returned to the swap bitmap. * - * This routine will free swap metadata structures as they are cleaned + * This routine will free swap metadata structures as they are cleaned * out. This routine does *NOT* operate on swap metadata associated * with resident pages. */ @@ -1991,14 +1998,14 @@ swp_pager_meta_free_all(vm_object_t obje * swapblk assignments in the swap meta data or in the vm_page_t. * The routine typically returns the swapblk being looked-up, or popped, * or SWAPBLK_NONE if the block was freed, or SWAPBLK_NONE if the block - * was invalid. This routine will automatically free any invalid + * was invalid. This routine will automatically free any invalid * meta-data swapblks. * * It is not possible to store invalid swapblks in the swap meta data * (other then a literal 'SWAPBLK_NONE'), so we don't bother checking. * - * When acting on a busy resident page and paging is in progress, we - * have to wait until paging is complete but otherwise can act on the + * When acting on a busy resident page and paging is in progress, we + * have to wait until paging is complete but otherwise can act on the * busy page. * * SWM_FREE remove and free swap block from metadata @@ -2014,7 +2021,7 @@ swp_pager_meta_ctl(vm_object_t object, v VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); /* - * The meta data only exists of the object is OBJT_SWAP + * The meta data only exists of the object is OBJT_SWAP * and even then might not be allocated yet. */ if (object->type != OBJT_SWAP) @@ -2040,7 +2047,7 @@ swp_pager_meta_ctl(vm_object_t object, v uma_zfree(swap_zone, swap); --object->un_pager.swp.swp_bcount; } - } + } } } mtx_unlock(&swhash_mtx); @@ -2058,7 +2065,7 @@ struct swapon_args { }; #endif -/* +/* * MPSAFE */ /* ARGSUSED */ @@ -2153,7 +2160,7 @@ swaponsomething(struct vnode *vp, void * /* * nblks is in DEV_BSIZE'd chunks, convert to PAGE_SIZE'd chunks. * First chop nblks off to page-align it, then convert. - * + * * sw->sw_nblks is in page-sized chunks now too. */ nblks &= ~(ctodb(1) - 1); @@ -2342,12 +2349,12 @@ swapoff_all(void) struct swdevt *sp, *spt; const char *devname; int error; - + mtx_lock(&Giant); while (swdev_syscall_active) tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0); swdev_syscall_active = 1; - + mtx_lock(&sw_dev_mtx); TAILQ_FOREACH_SAFE(sp, &swtailq, sw_list, spt) { mtx_unlock(&sw_dev_mtx); @@ -2365,7 +2372,7 @@ swapoff_all(void) mtx_lock(&sw_dev_mtx); } mtx_unlock(&sw_dev_mtx); - + swdev_syscall_active = 0; wakeup_one(&swdev_syscall_active); mtx_unlock(&Giant); @@ -2709,7 +2716,7 @@ swaponvp(struct thread *td, struct vnode } } mtx_unlock(&sw_dev_mtx); - + (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 19:13:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA1631065738; Tue, 4 Sep 2012 19:13:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3A81F8FC1F; Tue, 4 Sep 2012 19:13:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A4224B972; Tue, 4 Sep 2012 15:13:02 -0400 (EDT) From: John Baldwin To: "Dag-Erling SmXrgrav" Date: Tue, 4 Sep 2012 15:11:56 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209041904.q84J42ng004100@svn.freebsd.org> In-Reply-To: <201209041904.q84J42ng004100@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209041511.56128.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 04 Sep 2012 15:13:02 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240096 - 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: Tue, 04 Sep 2012 19:13:04 -0000 On Tuesday, September 04, 2012 3:04:02 pm Dag-Erling SmXrgrav wrote: > Author: des > Date: Tue Sep 4 19:04:02 2012 > New Revision: 240096 > URL: http://svn.freebsd.org/changeset/base/240096 > > Log: > No memory barrier is required. This was pointed out by kib@ a while ago, > but I got distracted by other matters. Humm, this seemed to have a lot of unrelated changes? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 19:14:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324F5106567B; Tue, 4 Sep 2012 19:14:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A45D8FC12; Tue, 4 Sep 2012 19:14:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84JEv4J005538; Tue, 4 Sep 2012 19:14:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84JEvd4005534; Tue, 4 Sep 2012 19:14:57 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209041914.q84JEvd4005534@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 19:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240097 - in stable/9/sys: amd64/include boot/common i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 19:14:58 -0000 Author: des Date: Tue Sep 4 19:14:57 2012 New Revision: 240097 URL: http://svn.freebsd.org/changeset/base/240097 Log: MFH (r239255, r239730): increase maxswzone on i386 and remove it on amd64. Modified: stable/9/sys/amd64/include/param.h stable/9/sys/boot/common/loader.8 stable/9/sys/i386/include/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/amd64/include/param.h ============================================================================== --- stable/9/sys/amd64/include/param.h Tue Sep 4 19:04:02 2012 (r240096) +++ stable/9/sys/amd64/include/param.h Tue Sep 4 19:14:57 2012 (r240097) @@ -123,14 +123,6 @@ #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ /* - * Ceiling on amount of swblock kva space, can be changed via - * the kern.maxswzone /boot/loader.conf variable. - */ -#ifndef VM_SWZONE_SIZE_MAX -#define VM_SWZONE_SIZE_MAX (32 * 1024 * 1024) -#endif - -/* * Mach derived conversion macros */ #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) Modified: stable/9/sys/boot/common/loader.8 ============================================================================== --- stable/9/sys/boot/common/loader.8 Tue Sep 4 19:04:02 2012 (r240096) +++ stable/9/sys/boot/common/loader.8 Tue Sep 4 19:14:57 2012 (r240097) @@ -613,17 +613,26 @@ Not all architectures use such buffers; for details. .It Va kern.maxswzone Limits the amount of KVM to be used to hold swap -meta information, which directly governs the -maximum amount of swap the system can support. -This value is specified in bytes of KVA space -and defaults to 32MBytes on i386 and amd64. -Care should be taken -to not reduce this value such that the actual -amount of configured swap exceeds 1/2 the -kernel-supported swap. -The default of 32MB allows -the kernel to support a maximum of ~7GB of swap. -Only change +metadata, which directly governs the +maximum amount of swap the system can support, +at the rate of approximately 200 MB of swap space +per 1 MB of metadata. +This value is specified in bytes of KVA space. +If no value is provided, the system allocates +enough memory to handle an amount of swap +that corresponds to eight times the amount of +physical memory present in the system. +.Pp +Note that swap metadata can be fragmented, +which means that the system can run out of +space before it reaches the theoretical limit. +Therefore, care should be taken to not configure +more swap than approximately half of the +theoretical maximum. +.Pp +Running out of space for swap metadata can leave +the system in an unrecoverable state. +Therefore, you should only change this parameter if you need to greatly extend the KVM reservation for other resources such as the buffer cache or Modified: stable/9/sys/i386/include/param.h ============================================================================== --- stable/9/sys/i386/include/param.h Tue Sep 4 19:04:02 2012 (r240096) +++ stable/9/sys/i386/include/param.h Tue Sep 4 19:14:57 2012 (r240097) @@ -125,9 +125,15 @@ /* * Ceiling on amount of swblock kva space, can be changed via * the kern.maxswzone /boot/loader.conf variable. + * + * 276 is sizeof(struct swblock), but we do not always have a definition + * in scope for struct swblock, so we have to hardcode it. Each struct + * swblock holds metadata for 32 pages, so in theory, this is enough for + * 16 GB of swap. In practice, however, the usable amount is considerably + * lower due to fragmentation. */ #ifndef VM_SWZONE_SIZE_MAX -#define VM_SWZONE_SIZE_MAX (32 * 1024 * 1024) +#define VM_SWZONE_SIZE_MAX (276 * 128 * 1024) #endif /* From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 19:19:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34C541065676; Tue, 4 Sep 2012 19:19:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6798FC1A; Tue, 4 Sep 2012 19:19:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84JJbrS006121; Tue, 4 Sep 2012 19:19:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84JJbj7006117; Tue, 4 Sep 2012 19:19:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209041919.q84JJbj7006117@svn.freebsd.org> From: John Baldwin Date: Tue, 4 Sep 2012 19:19: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: r240098 - in head/sys: amd64/conf conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 19:19:38 -0000 Author: jhb Date: Tue Sep 4 19:19:36 2012 New Revision: 240098 URL: http://svn.freebsd.org/changeset/base/240098 Log: Fix duplicate entries for mwl(4): - Move mwlfw from {amd64,i386}/conf/NOTES to sys/conf/NOTES (mwl(4) is already present in sys/conf/NOTES). - Remove duplicate mwl(4) entries from {amd64,i386}/conf/NOTES. - While here, add a description to the sfxge line in amd64/conf/NOTES. Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Tue Sep 4 19:14:57 2012 (r240097) +++ head/sys/amd64/conf/NOTES Tue Sep 4 19:19:36 2012 (r240098) @@ -306,8 +306,6 @@ options DRM_DEBUG # Include debug print # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand -# mwl: Marvell 88W8363 IEEE 802.11 adapter -# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters @@ -324,10 +322,9 @@ device iwn # Intel 4965/1000/5000/6000 device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand -device mwl # Marvell 88W8363 802.11n wireless NICs. device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking -device sfxge +device sfxge # Solarflare SFC9000 10Gb Ethernet device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules @@ -350,7 +347,6 @@ device wpi # Intel 3945ABG wireless NI # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only # iwn6050fw: Specific module for the 6050 only -# mwlfw: Marvell 88W8363 firmware # wpifw: Intel 3945ABG Wireless LAN Controller firmware device iwifw @@ -368,7 +364,6 @@ device iwn5000fw device iwn5150fw device iwn6000fw device iwn6050fw -device mwlfw device wpifw # Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Sep 4 19:14:57 2012 (r240097) +++ head/sys/conf/NOTES Tue Sep 4 19:19:36 2012 (r240098) @@ -1968,6 +1968,8 @@ device xmphy # XaQti XMAC II # SMC TigerCard 1000 (SMC9462SX), and some Addtron cards. # malo: Marvell Libertas wireless NICs. # mwl: Marvell 88W8363 802.11n wireless NICs. +# Requires the mwl firmware module +# mwlfw: Marvell 88W8363 firmware # msk: Support for gigabit ethernet adapters based on the Marvell/SysKonnect # Yukon II Gigabit controllers, including 88E8021, 88E8022, 88E8061, # 88E8062, 88E8035, 88E8036, 88E8038, 88E8050, 88E8052, 88E8053, @@ -2163,6 +2165,7 @@ device bwi # Broadcom BCM430* BCM431* device bwn # Broadcom BCM43xx device malo # Marvell Libertas wireless NICs. device mwl # Marvell 88W8363 802.11n wireless NICs. +device mwlfw device ral # Ralink Technology RT2500 wireless NICs. # Use sf_buf(9) interface for jumbo buffers on ti(4) controllers. Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Tue Sep 4 19:14:57 2012 (r240097) +++ head/sys/i386/conf/NOTES Tue Sep 4 19:19:36 2012 (r240098) @@ -577,8 +577,6 @@ hint.mse.0.irq="5" # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand -# mwl: Marvell 88W8363 IEEE 802.11 adapter -# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sbni: Granch SBNI12-xx ISA and PCI adapters @@ -624,7 +622,6 @@ hint.le.0.drq="0" device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand -device mwl # Marvell 88W8363 802.11n wireless NICs. device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking device sbni @@ -659,7 +656,6 @@ device wpi # Intel 3945ABG wireless NI # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only # iwn6050fw: Specific module for the 6050 only -# mwlfw: Marvell 88W8363 firmware # wpifw: Intel 3945ABG Wireless LAN Controller firmware device iwifw @@ -677,7 +673,6 @@ device iwn5000fw device iwn5150fw device iwn6000fw device iwn6050fw -device mwlfw device wpifw # From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 19:43:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6325106564A; Tue, 4 Sep 2012 19:43:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE1298FC18; Tue, 4 Sep 2012 19:43:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84JhQ9H008925; Tue, 4 Sep 2012 19:43:26 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84JhQ7h008917; Tue, 4 Sep 2012 19:43:26 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201209041943.q84JhQ7h008917@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 4 Sep 2012 19:43: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: r240099 - in head/sys: net netinet 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: Tue, 04 Sep 2012 19:43:26 -0000 Author: melifaro Date: Tue Sep 4 19:43:26 2012 New Revision: 240099 URL: http://svn.freebsd.org/changeset/base/240099 Log: Introduce new link-layer PFIL hook V_link_pfil_hook. Merge ether_ipfw_chk() and part of bridge_pfil() into unified ipfw_check_frame() function called by PFIL. This change was suggested by rwatson? @ DevSummit. Remove ipfw headers from ether/bridge code since they are unneeded now. Note this thange introduce some (temporary) performance penalty since PFIL read lock has to be acquired for every link-level packet. MFC after: 3 weeks Modified: head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/if_var.h head/sys/netinet/ip_var.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/ipfw/ip_fw_private.h Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/net/if_bridge.c Tue Sep 4 19:43:26 2012 (r240099) @@ -100,7 +100,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -131,8 +130,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include /* * Size of the route hash table. Must be a power of two. @@ -2981,7 +2978,6 @@ bridge_pfil(struct mbuf **mp, struct ifn { int snap, error, i, hlen; struct ether_header *eh1, eh2; - struct ip_fw_args args; struct ip *ip; struct llc llc1; u_int16_t ether_type; @@ -3055,6 +3051,16 @@ bridge_pfil(struct mbuf **mp, struct ifn goto bad; } + /* Run the packet through pfil before stripping link headers */ + if (PFIL_HOOKED(&V_link_pfil_hook) && pfil_ipfw != 0 && + dir == PFIL_OUT && ifp != NULL) { + + error = pfil_run_hooks(&V_link_pfil_hook, mp, ifp, dir, NULL); + + if (*mp == NULL || error != 0) /* packet consumed by filter */ + return (error); + } + /* Strip off the Ethernet header and keep a copy. */ m_copydata(*mp, 0, ETHER_HDR_LEN, (caddr_t) &eh2); m_adj(*mp, ETHER_HDR_LEN); @@ -3085,63 +3091,6 @@ bridge_pfil(struct mbuf **mp, struct ifn goto bad; } - /* XXX this section is also in if_ethersubr.c */ - // XXX PFIL_OUT or DIR_OUT ? - if (V_ip_fw_chk_ptr && pfil_ipfw != 0 && - dir == PFIL_OUT && ifp != NULL) { - struct m_tag *mtag; - - error = -1; - /* fetch the start point from existing tags, if any */ - mtag = m_tag_locate(*mp, MTAG_IPFW_RULE, 0, NULL); - if (mtag == NULL) { - args.rule.slot = 0; - } else { - struct ipfw_rule_ref *r; - - /* XXX can we free the tag after use ? */ - mtag->m_tag_id = PACKET_TAG_NONE; - r = (struct ipfw_rule_ref *)(mtag + 1); - /* packet already partially processed ? */ - if (r->info & IPFW_ONEPASS) - goto ipfwpass; - args.rule = *r; - } - - args.m = *mp; - args.oif = ifp; - args.next_hop = NULL; - args.next_hop6 = NULL; - args.eh = &eh2; - args.inp = NULL; /* used by ipfw uid/gid/jail rules */ - i = V_ip_fw_chk_ptr(&args); - *mp = args.m; - - if (*mp == NULL) - return (error); - - if (ip_dn_io_ptr && (i == IP_FW_DUMMYNET)) { - - /* put the Ethernet header back on */ - M_PREPEND(*mp, ETHER_HDR_LEN, M_DONTWAIT); - if (*mp == NULL) - return (error); - bcopy(&eh2, mtod(*mp, caddr_t), ETHER_HDR_LEN); - - /* - * Pass the pkt to dummynet, which consumes it. The - * packet will return to us via bridge_dummynet(). - */ - args.oif = ifp; - ip_dn_io_ptr(mp, DIR_FWD | PROTO_IFB, &args); - return (error); - } - - if (i != IP_FW_PASS) /* drop */ - goto bad; - } - -ipfwpass: error = 0; /* Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/net/if_ethersubr.c Tue Sep 4 19:43:26 2012 (r240099) @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -63,6 +62,7 @@ #include #include #include +#include #include #if defined(INET) || defined(INET6) @@ -71,8 +71,6 @@ #include #include #include -#include -#include #endif #ifdef INET6 #include @@ -106,6 +104,8 @@ CTASSERT(sizeof (struct ether_header) == CTASSERT(sizeof (struct ether_addr) == ETHER_ADDR_LEN); #endif +VNET_DEFINE(struct pfil_head, link_pfil_hook); /* Packet filter hooks */ + /* netgraph node hooks for ng_ether(4) */ void (*ng_ether_input_p)(struct ifnet *ifp, struct mbuf **mp); void (*ng_ether_input_orphan_p)(struct ifnet *ifp, struct mbuf *m); @@ -141,14 +141,6 @@ static MALLOC_DEFINE(M_ARPCOM, "arpcom", #define senderr(e) do { error = (e); goto bad;} while (0) -#if defined(INET) || defined(INET6) -int -ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); -static VNET_DEFINE(int, ether_ipfw); -#define V_ether_ipfw VNET(ether_ipfw) -#endif - - /* * Ethernet output routine. * Encapsulate a packet of type family for the local net. @@ -427,18 +419,17 @@ bad: if (m != NULL) int ether_output_frame(struct ifnet *ifp, struct mbuf *m) { -#if defined(INET) || defined(INET6) + int i; - if (V_ip_fw_chk_ptr && V_ether_ipfw != 0) { - if (ether_ipfw_chk(&m, ifp, 0) == 0) { - if (m) { - m_freem(m); - return EACCES; /* pkt dropped */ - } else - return 0; /* consumed e.g. in a pipe */ - } + if (PFIL_HOOKED(&V_link_pfil_hook)) { + i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_OUT, NULL); + + if (i != 0) + return (EACCES); + + if (m == NULL) + return (0); } -#endif /* * Queue message on interface, update output statistics if @@ -448,113 +439,6 @@ ether_output_frame(struct ifnet *ifp, st } #if defined(INET) || defined(INET6) -/* - * ipfw processing for ethernet packets (in and out). - * The second parameter is NULL from ether_demux, and ifp from - * ether_output_frame. - */ -int -ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared) -{ - struct ether_header *eh; - struct ether_header save_eh; - struct mbuf *m; - int i; - struct ip_fw_args args; - struct m_tag *mtag; - - /* fetch start point from rule, if any */ - mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); - if (mtag == NULL) { - args.rule.slot = 0; - } else { - /* dummynet packet, already partially processed */ - struct ipfw_rule_ref *r; - - /* XXX can we free it after use ? */ - mtag->m_tag_id = PACKET_TAG_NONE; - r = (struct ipfw_rule_ref *)(mtag + 1); - if (r->info & IPFW_ONEPASS) - return (1); - args.rule = *r; - } - - /* - * I need some amt of data to be contiguous, and in case others need - * the packet (shared==1) also better be in the first mbuf. - */ - m = *m0; - i = min( m->m_pkthdr.len, max_protohdr); - if ( shared || m->m_len < i) { - m = m_pullup(m, i); - if (m == NULL) { - *m0 = m; - return 0; - } - } - eh = mtod(m, struct ether_header *); - save_eh = *eh; /* save copy for restore below */ - m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ - - args.m = m; /* the packet we are looking at */ - args.oif = dst; /* destination, if any */ - args.next_hop = NULL; /* we do not support forward yet */ - args.next_hop6 = NULL; /* we do not support forward yet */ - args.eh = &save_eh; /* MAC header for bridged/MAC packets */ - args.inp = NULL; /* used by ipfw uid/gid/jail rules */ - i = V_ip_fw_chk_ptr(&args); - m = args.m; - if (m != NULL) { - /* - * Restore Ethernet header, as needed, in case the - * mbuf chain was replaced by ipfw. - */ - M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT); - if (m == NULL) { - *m0 = m; - return 0; - } - if (eh != mtod(m, struct ether_header *)) - bcopy(&save_eh, mtod(m, struct ether_header *), - ETHER_HDR_LEN); - } - *m0 = m; - - if (i == IP_FW_DENY) /* drop */ - return 0; - - KASSERT(m != NULL, ("ether_ipfw_chk: m is NULL")); - - if (i == IP_FW_PASS) /* a PASS rule. */ - return 1; - - if (ip_dn_io_ptr && (i == IP_FW_DUMMYNET)) { - int dir; - /* - * Pass the pkt to dummynet, which consumes it. - * If shared, make a copy and keep the original. - */ - if (shared) { - m = m_copypacket(m, M_DONTWAIT); - if (m == NULL) - return 0; - } else { - /* - * Pass the original to dummynet and - * nothing back to the caller - */ - *m0 = NULL ; - } - dir = PROTO_LAYER2 | (dst ? DIR_OUT : DIR_IN); - ip_dn_io_ptr(&m, dir, &args); - return 0; - } - /* - * XXX at some point add support for divert/forward actions. - * If none of the above matches, we have to drop the pkt. - */ - return 0; -} #endif /* @@ -788,6 +672,35 @@ ether_init(__unused void *arg) SYSINIT(ether, SI_SUB_INIT_IF, SI_ORDER_ANY, ether_init, NULL); static void +vnet_ether_init(__unused void *arg) +{ + int i; + + /* Initialize packet filter hooks. */ + V_link_pfil_hook.ph_type = PFIL_TYPE_AF; + V_link_pfil_hook.ph_af = AF_LINK; + if ((i = pfil_head_register(&V_link_pfil_hook)) != 0) + printf("%s: WARNING: unable to register pfil link hook, " + "error %d\n", __func__, i); +} +VNET_SYSINIT(vnet_ether_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, + vnet_ether_init, NULL); + +static void +vnet_ether_destroy(__unused void *arg) +{ + int i; + + if ((i = pfil_head_unregister(&V_link_pfil_hook)) != 0) + printf("%s: WARNING: unable to unregister pfil link hook, " + "error %d\n", __func__, i); +} +VNET_SYSUNINIT(vnet_ether_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, + vnet_ether_destroy, NULL); + + + +static void ether_input(struct ifnet *ifp, struct mbuf *m) { @@ -807,7 +720,7 @@ void ether_demux(struct ifnet *ifp, struct mbuf *m) { struct ether_header *eh; - int isr; + int i, isr; u_short ether_type; #if defined(NETATALK) struct llc *l; @@ -815,19 +728,14 @@ ether_demux(struct ifnet *ifp, struct mb KASSERT(ifp != NULL, ("%s: NULL interface pointer", __func__)); -#if defined(INET) || defined(INET6) - /* - * Allow dummynet and/or ipfw to claim the frame. - * Do not do this for PROMISC frames in case we are re-entered. - */ - if (V_ip_fw_chk_ptr && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) { - if (ether_ipfw_chk(&m, NULL, 0) == 0) { - if (m) - m_freem(m); /* dropped; free mbuf chain */ - return; /* consumed */ - } + /* Do not grab PROMISC frames in case we are re-entered. */ + if (PFIL_HOOKED(&V_link_pfil_hook) && !(m->m_flags & M_PROMISC)) { + i = pfil_run_hooks(&V_link_pfil_hook, &m, ifp, PFIL_IN, NULL); + + if (i != 0 || m == NULL) + return; } -#endif + eh = mtod(m, struct ether_header *); ether_type = ntohs(eh->ether_type); @@ -1056,10 +964,6 @@ ether_reassign(struct ifnet *ifp, struct SYSCTL_DECL(_net_link); SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet"); -#if defined(INET) || defined(INET6) -SYSCTL_VNET_INT(_net_link_ether, OID_AUTO, ipfw, CTLFLAG_RW, - &VNET_NAME(ether_ipfw), 0, "Pass ether pkts through firewall"); -#endif #if 0 /* Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/net/if_var.h Tue Sep 4 19:43:26 2012 (r240099) @@ -99,6 +99,9 @@ TAILQ_HEAD(ifaddrhead, ifaddr); /* insta TAILQ_HEAD(ifmultihead, ifmultiaddr); TAILQ_HEAD(ifgrouphead, ifg_group); +VNET_DECLARE(struct pfil_head, link_pfil_hook); /* packet filter hooks */ +#define V_link_pfil_hook VNET(link_pfil_hook) + /* * Structure defining a queue for a network interface. */ Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/netinet/ip_var.h Tue Sep 4 19:43:26 2012 (r240099) @@ -292,9 +292,7 @@ enum { struct ip_fw_args; typedef int (*ip_fw_chk_ptr_t)(struct ip_fw_args *args); typedef int (*ip_fw_ctl_ptr_t)(struct sockopt *); -VNET_DECLARE(ip_fw_chk_ptr_t, ip_fw_chk_ptr); VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr); -#define V_ip_fw_chk_ptr VNET(ip_fw_chk_ptr) #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) /* Divert hooks. */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/netinet/ipfw/ip_fw2.c Tue Sep 4 19:43:26 2012 (r240099) @@ -2645,10 +2645,9 @@ vnet_ipfw_init(const void *unused) V_ipfw_vnet_ready = 1; /* Open for business */ /* - * Hook the sockopt handler, and the layer2 (V_ip_fw_chk_ptr) - * and pfil hooks for ipv4 and ipv6. Even if the latter two fail - * we still keep the module alive because the sockopt and - * layer2 paths are still useful. + * Hook the sockopt handler and pfil hooks for ipv4 and ipv6. + * Even if the latter two fail we still keep the module alive + * because the sockopt and layer2 paths are still useful. * ipfw[6]_hook return 0 on success, ENOENT on failure, * so we can ignore the exact return value and just set a flag. * @@ -2659,7 +2658,6 @@ vnet_ipfw_init(const void *unused) * is checked on each packet because there are no pfil hooks. */ V_ip_fw_ctl_ptr = ipfw_ctl; - V_ip_fw_chk_ptr = ipfw_chk; error = ipfw_attach_hooks(1); return (error); } @@ -2681,7 +2679,6 @@ vnet_ipfw_uninit(const void *unused) * sure the update is propagated and nobody will be in. */ (void)ipfw_attach_hooks(0 /* detach */); - V_ip_fw_chk_ptr = NULL; V_ip_fw_ctl_ptr = NULL; IPFW_UH_WLOCK(chain); IPFW_UH_WUNLOCK(chain); Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Tue Sep 4 19:43:26 2012 (r240099) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -72,10 +73,17 @@ static VNET_DEFINE(int, fw6_enable) = 1; #define V_fw6_enable VNET(fw6_enable) #endif +static VNET_DEFINE(int, fwlink_enable) = 0; +#define V_fwlink_enable VNET(fwlink_enable) + int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); /* Forward declarations. */ static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); +static int ipfw_check_packet(void *, struct mbuf **, struct ifnet *, int, + struct inpcb *); +static int ipfw_check_frame(void *, struct mbuf **, struct ifnet *, int, + struct inpcb *); #ifdef SYSCTL_NODE @@ -92,6 +100,11 @@ SYSCTL_VNET_PROC(_net_inet6_ip6_fw, OID_ ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ +SYSCTL_DECL(_net_link_ether); +SYSCTL_VNET_PROC(_net_link_ether, OID_AUTO, ipfw, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, &VNET_NAME(fwlink_enable), 0, + ipfw_chg_hook, "I", "Pass ether pkts through firewall"); + SYSEND #endif /* SYSCTL_NODE */ @@ -101,8 +114,8 @@ SYSEND * dummynet, divert, netgraph or other modules. * The packet may be consumed. */ -int -ipfw_check_hook(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, +static int +ipfw_check_packet(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp) { struct ip_fw_args args; @@ -278,6 +291,111 @@ again: return ret; } +/* + * ipfw processing for ethernet packets (in and out). + * Inteface is NULL from ether_demux, and ifp from + * ether_output_frame. + */ +static int +ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *dst, int dir, + struct inpcb *inp) +{ + struct ether_header *eh; + struct ether_header save_eh; + struct mbuf *m; + int i, ret; + struct ip_fw_args args; + struct m_tag *mtag; + + /* fetch start point from rule, if any */ + mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); + if (mtag == NULL) { + args.rule.slot = 0; + } else { + /* dummynet packet, already partially processed */ + struct ipfw_rule_ref *r; + + /* XXX can we free it after use ? */ + mtag->m_tag_id = PACKET_TAG_NONE; + r = (struct ipfw_rule_ref *)(mtag + 1); + if (r->info & IPFW_ONEPASS) + return (0); + args.rule = *r; + } + + /* I need some amt of data to be contiguous */ + m = *m0; + i = min(m->m_pkthdr.len, max_protohdr); + if (m->m_len < i) { + m = m_pullup(m, i); + if (m == NULL) { + *m0 = m; + return (0); + } + } + eh = mtod(m, struct ether_header *); + save_eh = *eh; /* save copy for restore below */ + m_adj(m, ETHER_HDR_LEN); /* strip ethernet header */ + + args.m = m; /* the packet we are looking at */ + args.oif = dst; /* destination, if any */ + args.next_hop = NULL; /* we do not support forward yet */ + args.next_hop6 = NULL; /* we do not support forward yet */ + args.eh = &save_eh; /* MAC header for bridged/MAC packets */ + args.inp = NULL; /* used by ipfw uid/gid/jail rules */ + i = ipfw_chk(&args); + m = args.m; + if (m != NULL) { + /* + * Restore Ethernet header, as needed, in case the + * mbuf chain was replaced by ipfw. + */ + M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT); + if (m == NULL) { + *m0 = NULL; + return (0); + } + if (eh != mtod(m, struct ether_header *)) + bcopy(&save_eh, mtod(m, struct ether_header *), + ETHER_HDR_LEN); + } + *m0 = m; + + ret = 0; + /* Check result of ipfw_chk() */ + switch (i) { + case IP_FW_PASS: + break; + + case IP_FW_DENY: + ret = EACCES; + break; /* i.e. drop */ + + case IP_FW_DUMMYNET: + ret = EACCES; + int dir; + + if (ip_dn_io_ptr == NULL) + break; /* i.e. drop */ + + *m0 = NULL; + dir = PROTO_LAYER2 | (dst ? DIR_OUT : DIR_IN); + ip_dn_io_ptr(&m, dir, &args); + return 0; + + default: + KASSERT(0, ("%s: unknown retval", __func__)); + } + + if (ret != 0) { + if (*m0) + FREE_PKT(*m0); + *m0 = NULL; + } + + return ret; +} + /* do the divert, return 1 on error 0 on success */ static int ipfw_divert(struct mbuf **m0, int incoming, struct ipfw_rule_ref *rule, @@ -379,13 +497,16 @@ static int ipfw_hook(int onoff, int pf) { struct pfil_head *pfh; + void *hook_func; pfh = pfil_head_get(PFIL_TYPE_AF, pf); if (pfh == NULL) return ENOENT; + hook_func = (pf == AF_LINK) ? ipfw_check_frame : ipfw_check_packet; + (void) (onoff ? pfil_add_hook : pfil_remove_hook) - (ipfw_check_hook, NULL, PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh); + (hook_func, NULL, PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh); return 0; } @@ -409,51 +530,58 @@ ipfw_attach_hooks(int arg) printf("ipfw6_hook() error\n"); } #endif + if (arg == 0) /* detach */ + ipfw_hook(0, AF_LINK); + else if (V_fwlink_enable && ipfw_hook(1, AF_LINK) != 0) { + error = ENOENT; + printf("ipfw_link_hook() error\n"); + } return error; } int ipfw_chg_hook(SYSCTL_HANDLER_ARGS) { - int enable; - int oldenable; + int *enable; + int newval; int error; int af; if (arg1 == &VNET_NAME(fw_enable)) { - enable = V_fw_enable; + enable = &V_fw_enable; af = AF_INET; } #ifdef INET6 else if (arg1 == &VNET_NAME(fw6_enable)) { - enable = V_fw6_enable; + enable = &V_fw6_enable; af = AF_INET6; } #endif + else if (arg1 == &VNET_NAME(fwlink_enable)) { + enable = &V_fwlink_enable; + af = AF_LINK; + } else return (EINVAL); - oldenable = enable; + newval = *enable; - error = sysctl_handle_int(oidp, &enable, 0, req); + /* Handle sysctl change */ + error = sysctl_handle_int(oidp, &newval, 0, req); if (error) return (error); - enable = (enable) ? 1 : 0; + /* Formalize new value */ + newval = (newval) ? 1 : 0; - if (enable == oldenable) + if (*enable == newval) return (0); - error = ipfw_hook(enable, af); + error = ipfw_hook(newval, af); if (error) return (error); - if (af == AF_INET) - V_fw_enable = enable; -#ifdef INET6 - else if (af == AF_INET6) - V_fw6_enable = enable; -#endif + *enable = newval; return (0); } Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Tue Sep 4 19:19:36 2012 (r240098) +++ head/sys/netinet/ipfw/ip_fw_private.h Tue Sep 4 19:43:26 2012 (r240099) @@ -270,10 +270,6 @@ int ipfw_ctl(struct sockopt *sopt); int ipfw_chk(struct ip_fw_args *args); void ipfw_reap_rules(struct ip_fw *head); -/* In ip_fw_pfil */ -int ipfw_check_hook(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, - struct inpcb *inp); - /* In ip_fw_table.c */ struct radix_node; int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 20:14:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2EC5106566B; Tue, 4 Sep 2012 20:14:37 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE97F8FC14; Tue, 4 Sep 2012 20:14:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84KEbJS012651; Tue, 4 Sep 2012 20:14:37 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84KEbxv012649; Tue, 4 Sep 2012 20:14:37 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201209042014.q84KEbxv012649@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 4 Sep 2012 20:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240101 - head/tools/test/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 20:14:37 -0000 Author: gnn Date: Tue Sep 4 20:14:37 2012 New Revision: 240101 URL: http://svn.freebsd.org/changeset/base/240101 Log: Add a reasonable error message telling the caller to specify a program to be executed under hwpmc. If there is no program to run then exit. Modified: head/tools/test/hwpmc/pmctest.py Modified: head/tools/test/hwpmc/pmctest.py ============================================================================== --- head/tools/test/hwpmc/pmctest.py Tue Sep 4 19:49:37 2012 (r240100) +++ head/tools/test/hwpmc/pmctest.py Tue Sep 4 20:14:37 2012 (r240101) @@ -67,6 +67,10 @@ def main(): (options, args) = parser.parse_args() + if (options.program == None): + print "specify program, such as ls, with -p/--program" + sys.exit() + p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) counters = p.communicate()[0] From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 20:45:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D59C1106564A; Tue, 4 Sep 2012 20:45:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C00B58FC08; Tue, 4 Sep 2012 20:45:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84KjxLU016295; Tue, 4 Sep 2012 20:45:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84KjxmT016293; Tue, 4 Sep 2012 20:45:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042045.q84KjxmT016293@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 20:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240102 - stable/9/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, 04 Sep 2012 20:46:00 -0000 Author: des Date: Tue Sep 4 20:45:59 2012 New Revision: 240102 URL: http://svn.freebsd.org/changeset/base/240102 Log: MFH (r239836): align the boot partition on a 4 kB boundary. Modified: stable/9/sbin/geom/class/part/gpart.8 Directory Properties: stable/9/sbin/geom/ (props changed) stable/9/sbin/geom/class/part/ (props changed) Modified: stable/9/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/9/sbin/geom/class/part/gpart.8 Tue Sep 4 20:14:37 2012 (r240101) +++ stable/9/sbin/geom/class/part/gpart.8 Tue Sep 4 20:45:59 2012 (r240102) @@ -1006,11 +1006,12 @@ or but smaller than 545 kB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -This example uses 94 blocks (47 kB) so the next partition will be +This example uses 88 blocks (44 kB) so the next partition will be aligned on a 64 kB boundary without the need to specify an explicit offset or alignment. +The boot partition itself is aligned on a 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 34 -s 94 -t freebsd-boot ad0 +/sbin/gpart add -b 40 -s 88 -t freebsd-boot ad0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ad0 .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 20:51:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A90C11065678; Tue, 4 Sep 2012 20:51:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 953378FC18; Tue, 4 Sep 2012 20:51:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84KpPSN017084; Tue, 4 Sep 2012 20:51:25 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84KpPip017082; Tue, 4 Sep 2012 20:51:25 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209042051.q84KpPip017082@svn.freebsd.org> From: Ed Maste Date: Tue, 4 Sep 2012 20:51: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: r240103 - head/tools/tools/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 20:51:25 -0000 Author: emaste Date: Tue Sep 4 20:51:25 2012 New Revision: 240103 URL: http://svn.freebsd.org/changeset/base/240103 Log: Failure to open netmap device is unrecoverable. There's no reason to "fail later" since there's nothing this tool can do in netmap mode without /dev/netmap open. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Tue Sep 4 20:45:59 2012 (r240102) +++ head/tools/tools/netmap/pkt-gen.c Tue Sep 4 20:51:25 2012 (r240103) @@ -892,7 +892,7 @@ main(int arc, char **argv) fd = open("/dev/netmap", O_RDWR); if (fd == -1) { D("Unable to open /dev/netmap"); - // fail later + exit(1); } else { if ((ioctl(fd, NIOCGINFO, &nmr)) == -1) { D("Unable to get if info without name"); From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:02:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8A611065674; Tue, 4 Sep 2012 21:02:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3DE28FC16; Tue, 4 Sep 2012 21:02:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84L2vJg018525; Tue, 4 Sep 2012 21:02:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84L2v08018522; Tue, 4 Sep 2012 21:02:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209042102.q84L2v08018522@svn.freebsd.org> From: Xin LI Date: Tue, 4 Sep 2012 21:02: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: r240104 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:02:57 -0000 Author: delphij Date: Tue Sep 4 21:02:57 2012 New Revision: 240104 URL: http://svn.freebsd.org/changeset/base/240104 Log: Add hpt27xx to GENERIC kernel for amd64 and i386 systems. MFC after: 2 weeks Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Sep 4 20:51:25 2012 (r240103) +++ head/sys/amd64/conf/GENERIC Tue Sep 4 21:02:57 2012 (r240104) @@ -148,6 +148,7 @@ device ciss # Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx +device hpt27xx # Highpoint RocketRAID 27xx device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Sep 4 20:51:25 2012 (r240103) +++ head/sys/i386/conf/GENERIC Tue Sep 4 21:02:57 2012 (r240104) @@ -154,6 +154,7 @@ device ciss # Compaq Smart RAID 5* device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx +device hpt27xx # Highpoint RocketRAID 27xx device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:06:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A6A3106564A; Tue, 4 Sep 2012 21:06:54 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E74968FC15; Tue, 4 Sep 2012 21:06:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84L6rQx019055; Tue, 4 Sep 2012 21:06:53 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84L6rOS019053; Tue, 4 Sep 2012 21:06:53 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042106.q84L6rOS019053@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 21:06: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: r240105 - 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: Tue, 04 Sep 2012 21:06:54 -0000 Author: des Date: Tue Sep 4 21:06:53 2012 New Revision: 240105 URL: http://svn.freebsd.org/changeset/base/240105 Log: Revert previous commit, which was performed in the wrong tree. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Sep 4 21:02:57 2012 (r240104) +++ head/sys/vm/swap_pager.c Tue Sep 4 21:06:53 2012 (r240105) @@ -50,7 +50,7 @@ * * - on the fly reallocation of swap during putpages. The new system * does not try to keep previously allocated swap blocks for dirty - * pages. + * pages. * * - on the fly deallocation of swap * @@ -154,21 +154,15 @@ int swap_pager_avail; static int swdev_syscall_active = 0; /* serialize swap(on|off) */ static vm_ooffset_t swap_total; -SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, "Total amount of available swap storage."); static vm_ooffset_t swap_reserved; -SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, +SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); -static unsigned long swzone; -SYSCTL_ULONG(_vm, OID_AUTO, swzone, CTLFLAG_RD, &swzone, 0, - "Actual size of swap metadata zone"); -static unsigned long swap_maxpages; -SYSCTL_ULONG(_vm, OID_AUTO, swap_maxpages, CTLFLAG_RD, &swap_maxpages, 0, - "Maximum amount of swap supported"); /* bits from overcommit */ #define SWAP_RESERVE_FORCE_ON (1 << 0) @@ -190,7 +184,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, static int curfail; static struct timeval lastfail; struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (incr & PAGE_MASK) @@ -291,7 +285,7 @@ void swap_release_by_cred(vm_ooffset_t decr, struct ucred *cred) { struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (decr & PAGE_MASK) @@ -334,7 +328,7 @@ static struct sx sw_alloc_sx; SYSCTL_INT(_vm, OID_AUTO, swap_async_max, - CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); + CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); /* * "named" and "unnamed" anon region objects. Try to reduce the overhead @@ -346,7 +340,7 @@ SYSCTL_INT(_vm, OID_AUTO, swap_async_max #define NOBJLIST(handle) \ (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) -static struct mtx sw_alloc_mtx; /* protect list manipulation */ +static struct mtx sw_alloc_mtx; /* protect list manipulation */ static struct pagerlst swap_pager_object_list[NOBJLISTS]; static uma_zone_t swap_zone; static struct vm_object swap_zone_obj; @@ -425,7 +419,7 @@ swp_pager_free_nrpage(vm_page_t m) /* * SWP_SIZECHECK() - update swap_pager_full indication - * + * * update the swap_pager_almost_full indication and warn when we are * about to run out of swap space, using lowat/hiwat hysteresis. * @@ -480,7 +474,7 @@ swp_pager_hash(vm_object_t object, vm_pi /* * SWAP_PAGER_INIT() - initialize the swap pager! * - * Expected to be started from system init. NOTE: This code is run + * Expected to be started from system init. NOTE: This code is run * before much else so be careful what you depend on. Most of the VM * system has yet to be initialized at this point. */ @@ -512,7 +506,7 @@ swap_pager_init(void) void swap_pager_swap_init(void) { - unsigned long n, n2; + int n, n2; /* * Number of in-transit swap bp operations. Don't @@ -525,7 +519,7 @@ swap_pager_swap_init(void) * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are * constrained by the swap device interleave stripe size. * - * Currently we hardwire nsw_wcount_async to 4. This limit is + * Currently we hardwire nsw_wcount_async to 4. This limit is * designed to prevent other I/O from having high latencies due to * our pageout I/O. The value 4 works well for one or two active swap * devices but is probably a little low if you have more. Even so, @@ -554,11 +548,11 @@ swap_pager_swap_init(void) n = cnt.v_page_count / 2; if (maxswzone && n > maxswzone / sizeof(struct swblock)) n = maxswzone / sizeof(struct swblock); + n2 = n; swap_zone = uma_zcreate("SWAPMETA", sizeof(struct swblock), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); if (swap_zone == NULL) panic("failed to create swap_zone."); - n2 = n; do { if (uma_zone_set_obj(swap_zone, &swap_zone_obj, n)) break; @@ -569,13 +563,12 @@ swap_pager_swap_init(void) n -= ((n + 2) / 3); } while (n > 0); if (n2 != n) - printf("Swap zone entries reduced from %lu to %lu.\n", n2, n); - swap_maxpages = n * SWAP_META_PAGES; - swzone = n * sizeof(struct swblock); + printf("Swap zone entries reduced from %d to %d.\n", n2, n); + n2 = n; /* * Initialize our meta-data hash table. The swapper does not need to - * be quite as efficient as the VM system, so we do not use an + * be quite as efficient as the VM system, so we do not use an * oversized hash table. * * n: size of hash table, must be power of 2 @@ -661,7 +654,7 @@ swap_pager_alloc(void *handle, vm_ooffse /* * SWAP_PAGER_DEALLOC() - remove swap metadata from object * - * The swap backing for the object is destroyed. The code is + * The swap backing for the object is destroyed. The code is * designed such that we can reinstantiate it later, but this * routine is typically called only when the entire object is * about to be destroyed. @@ -686,7 +679,7 @@ swap_pager_dealloc(vm_object_t object) vm_object_pip_wait(object, "swpdea"); /* - * Free all remaining metadata. We only bother to free it from + * Free all remaining metadata. We only bother to free it from * the swap meta data. We do not attempt to free swapblk's still * associated with vm_page_t's for this object. We do not care * if paging is still in progress on some objects. @@ -755,7 +748,7 @@ swp_pager_isondev(daddr_t blk, struct sw return (blk >= sp->sw_first && blk < sp->sw_end); } - + static void swp_pager_strategy(struct buf *bp) { @@ -771,10 +764,10 @@ swp_pager_strategy(struct buf *bp) } panic("Swapdev not found"); } - + /* - * SWP_PAGER_FREESWAPSPACE() - free raw swap space + * SWP_PAGER_FREESWAPSPACE() - free raw swap space * * This routine returns the specified swap blocks back to the bitmap. * @@ -792,7 +785,7 @@ swp_pager_freeswapspace(daddr_t blk, int /* * If we are attempting to stop swapping on * this device, we don't want to mark any - * blocks free lest they be reused. + * blocks free lest they be reused. */ if ((sp->sw_flags & SW_CLOSING) == 0) { blist_free(sp->sw_blist, blk - sp->sw_first, @@ -815,8 +808,8 @@ swp_pager_freeswapspace(daddr_t blk, int * * This routine removes swapblk assignments from swap metadata. * - * The external callers of this routine typically have already destroyed - * or renamed vm_page_t's associated with this range in the object so + * The external callers of this routine typically have already destroyed + * or renamed vm_page_t's associated with this range in the object so * we should be ok. */ void @@ -830,7 +823,7 @@ swap_pager_freespace(vm_object_t object, /* * SWAP_PAGER_RESERVE() - reserve swap blocks in object * - * Assigns swap blocks to the specified range within the object. The + * Assigns swap blocks to the specified range within the object. The * swap blocks are not zerod. Any previous swap assignment is destroyed. * * Returns 0 on success, -1 on failure. @@ -876,7 +869,7 @@ swap_pager_reserve(vm_object_t object, v * * This routine is allowed to sleep. It may sleep allocating metadata * indirectly through swp_pager_meta_build() or if paging is still in - * progress on the source. + * progress on the source. * * The source object contains no vm_page_t's (which is just as well) * @@ -895,8 +888,8 @@ swap_pager_copy(vm_object_t srcobject, v VM_OBJECT_LOCK_ASSERT(dstobject, MA_OWNED); /* - * If destroysource is set, we remove the source object from the - * swap_pager internal queue now. + * If destroysource is set, we remove the source object from the + * swap_pager internal queue now. */ if (destroysource) { if (srcobject->handle != NULL) { @@ -932,7 +925,7 @@ swap_pager_copy(vm_object_t srcobject, v daddr_t srcaddr; srcaddr = swp_pager_meta_ctl( - srcobject, + srcobject, i + offset, SWM_POP ); @@ -954,7 +947,7 @@ swap_pager_copy(vm_object_t srcobject, v * Destination has valid swapblk or it is represented * by a resident page. We destroy the sourceblock. */ - + swp_pager_meta_ctl(srcobject, i + offset, SWM_FREE); } } @@ -1049,7 +1042,7 @@ swap_pager_haspage(vm_object_t object, v * SWAP_PAGER_PAGE_UNSWAPPED() - remove swap backing store related to page * * This removes any associated swap backing store, whether valid or - * not, from the page. + * not, from the page. * * This routine is typically called when a page is made dirty, at * which point any associated swap can be freed. MADV_FREE also @@ -1078,7 +1071,7 @@ swap_pager_unswapped(vm_page_t m) * a chunk surrounding m[reqpage] as is contiguous in swap and which * belongs to the same object. * - * The code is designed for asynchronous operation and + * The code is designed for asynchronous operation and * immediate-notification of 'reqpage' but tends not to be * used that way. Please do not optimize-out this algorithmic * feature, I intend to improve on it in the future. @@ -1108,7 +1101,7 @@ swap_pager_getpages(vm_object_t object, * Calculate range to retrieve. The pages have already been assigned * their swapblks. We require a *contiguous* range but we know it to * not span devices. If we do not supply it, bad things - * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the + * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the * loops are set up such that the case(s) are handled implicitly. * * The swp_*() calls must be made with the object locked. @@ -1146,7 +1139,7 @@ swap_pager_getpages(vm_object_t object, } /* - * Return VM_PAGER_FAIL if we have nothing to do. Return mreq + * Return VM_PAGER_FAIL if we have nothing to do. Return mreq * still busy, but the others unbusied. */ if (blk == SWAPBLK_NONE) @@ -1241,21 +1234,21 @@ swap_pager_getpages(vm_object_t object, /* * A final note: in a low swap situation, we cannot deallocate swap * and mark a page dirty here because the caller is likely to mark - * the page clean when we return, causing the page to possibly revert + * the page clean when we return, causing the page to possibly revert * to all-zero's later. */ } /* - * swap_pager_putpages: + * swap_pager_putpages: * * Assign swap (if necessary) and initiate I/O on the specified pages. * * We support both OBJT_DEFAULT and OBJT_SWAP objects. DEFAULT objects * are automatically converted to SWAP objects. * - * In a low memory situation we may block in VOP_STRATEGY(), but the new - * vm_page reservation system coupled with properly written VFS devices + * In a low memory situation we may block in VOP_STRATEGY(), but the new + * vm_page reservation system coupled with properly written VFS devices * should ensure that no low-memory deadlock occurs. This is an area * which needs work. * @@ -1276,8 +1269,8 @@ swap_pager_putpages(vm_object_t object, int n = 0; if (count && m[0]->object != object) { - panic("swap_pager_putpages: object mismatch %p/%p", - object, + panic("swap_pager_putpages: object mismatch %p/%p", + object, m[0]->object ); } @@ -1299,7 +1292,7 @@ swap_pager_putpages(vm_object_t object, /* * Step 2 * - * Update nsw parameters from swap_async_max sysctl values. + * Update nsw parameters from swap_async_max sysctl values. * Do not let the sysop crash the machine with bogus numbers. */ mtx_lock(&pbuf_mtx); @@ -1391,7 +1384,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t mreq = m[i+j]; swp_pager_meta_build( - mreq->object, + mreq->object, mreq->pindex, blk + j ); @@ -1460,10 +1453,10 @@ swap_pager_putpages(vm_object_t object, * Completion routine for asynchronous reads and writes from/to swap. * Also called manually by synchronous code to finish up a bp. * - * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, - * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY - * unbusy all pages except the 'main' request page. For WRITE - * operations, we vm_page_t->busy'd unbusy all pages ( we can do this + * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, + * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY + * unbusy all pages except the 'main' request page. For WRITE + * operations, we vm_page_t->busy'd unbusy all pages ( we can do this * because we marked them all VM_PAGER_PEND on return from putpages ). * * This routine may not sleep. @@ -1482,7 +1475,7 @@ swp_pager_async_iodone(struct buf *bp) "swap_pager: I/O error - %s failed; blkno %ld," "size %ld, error %d\n", ((bp->b_iocmd == BIO_READ) ? "pagein" : "pageout"), - (long)bp->b_blkno, + (long)bp->b_blkno, (long)bp->b_bcount, bp->b_error ); @@ -1502,7 +1495,7 @@ swp_pager_async_iodone(struct buf *bp) * cleanup pages. If an error occurs writing to swap, we are in * very serious trouble. If it happens to be a disk error, though, * we may be able to recover by reassigning the swap later on. So - * in this case we remove the m->swapblk assignment for the page + * in this case we remove the m->swapblk assignment for the page * but do not free it in the rlist. The errornous block(s) are thus * never reallocated as swap. Redirty the page and continue. */ @@ -1515,7 +1508,7 @@ swp_pager_async_iodone(struct buf *bp) /* * If an error occurs I'd love to throw the swapblk * away without freeing it back to swapspace, so it - * can never be used again. But I can't from an + * can never be used again. But I can't from an * interrupt. */ if (bp->b_iocmd == BIO_READ) { @@ -1524,7 +1517,7 @@ swp_pager_async_iodone(struct buf *bp) * locked for the parent, but all other * pages can be freed. We still want to * wakeup the parent waiting on the page, - * though. ( also: pg_reqpage can be -1 and + * though. ( also: pg_reqpage can be -1 and * not match anything ). * * We have to wake specifically requested pages @@ -1541,7 +1534,7 @@ swp_pager_async_iodone(struct buf *bp) else vm_page_flash(m); /* - * If i == bp->b_pager.pg_reqpage, do not wake + * If i == bp->b_pager.pg_reqpage, do not wake * the page up. The caller needs to. */ } else { @@ -1558,7 +1551,7 @@ swp_pager_async_iodone(struct buf *bp) } } else if (bp->b_iocmd == BIO_READ) { /* - * NOTE: for reads, m->dirty will probably be + * NOTE: for reads, m->dirty will probably be * overridden by the original caller of getpages so * we cannot set them in order to free the underlying * swap in a low-swap situation. I don't think we'd @@ -1570,7 +1563,7 @@ swp_pager_async_iodone(struct buf *bp) * * Note that the requested page, reqpage, is left * busied, but we still have to wake it up. The - * other pages are released (unbusied) by + * other pages are released (unbusied) by * vm_page_wakeup(). */ KASSERT(!pmap_page_is_mapped(m), @@ -1584,7 +1577,7 @@ swp_pager_async_iodone(struct buf *bp) * up too because we cleared VPO_SWAPINPROG and * could be waiting for it in getpages. However, * be sure to not unbusy getpages specifically - * requested page - getpages expects it to be + * requested page - getpages expects it to be * left busy. */ if (i != bp->b_pager.pg_reqpage) { @@ -1597,7 +1590,7 @@ swp_pager_async_iodone(struct buf *bp) } else { /* * For write success, clear the dirty - * status, then finish the I/O ( which decrements the + * status, then finish the I/O ( which decrements the * busy count and possibly wakes waiter's up ). */ KASSERT(!pmap_page_is_write_mapped(m), @@ -1622,8 +1615,8 @@ swp_pager_async_iodone(struct buf *bp) VM_OBJECT_UNLOCK(object); } - /* - * swapdev_strategy() manually sets b_vp and b_bufobj before calling + /* + * swapdev_strategy() manually sets b_vp and b_bufobj before calling * bstrategy(). Set them back to NULL now we're done with it, or we'll * trigger a KASSERT in relpbuf(). */ @@ -1635,10 +1628,10 @@ swp_pager_async_iodone(struct buf *bp) * release the physical I/O buffer */ relpbuf( - bp, - ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : - ((bp->b_flags & B_ASYNC) ? - &nsw_wcount_async : + bp, + ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : + ((bp->b_flags & B_ASYNC) ? + &nsw_wcount_async : &nsw_wcount_sync ) ) @@ -1751,8 +1744,8 @@ restart: for (swap = swhash[i]; swap != NULL; swap = swap->swb_hnext) { vm_object_t object = swap->swb_object; vm_pindex_t pindex = swap->swb_index; - for (j = 0; j < SWAP_META_PAGES; ++j) { - if (swp_pager_isondev(swap->swb_pages[j], sp)) { + for (j = 0; j < SWAP_META_PAGES; ++j) { + if (swp_pager_isondev(swap->swb_pages[j], sp)) { /* avoid deadlock */ if (!VM_OBJECT_TRYLOCK(object)) { break; @@ -1765,7 +1758,7 @@ restart: goto restart; } } - } + } } } mtx_unlock(&swhash_mtx); @@ -1790,7 +1783,7 @@ restart: * SWAP META DATA * ************************************************************************ * - * These routines manipulate the swap metadata stored in the + * These routines manipulate the swap metadata stored in the * OBJT_SWAP object. * * Swap metadata is implemented with a global hash and not directly @@ -1828,13 +1821,13 @@ swp_pager_meta_build(vm_object_t object, mtx_lock(&sw_alloc_mtx); TAILQ_INSERT_TAIL( NOBJLIST(object->handle), - object, + object, pager_object_list ); mtx_unlock(&sw_alloc_mtx); } } - + /* * Locate hash entry. If not found create, but if we aren't adding * anything just return. If we run out of space in the map we wait @@ -1855,7 +1848,7 @@ retry: mtx_unlock(&swhash_mtx); VM_OBJECT_UNLOCK(object); if (uma_zone_exhausted(swap_zone)) { - if (atomic_cmpset_int(&exhausted, 0, 1)) + if (atomic_cmpset_rel_int(&exhausted, 0, 1)) printf("swap zone exhausted, " "increase kern.maxswzone\n"); vm_pageout_oom(VM_OOM_SWAPZ); @@ -1866,7 +1859,7 @@ retry: goto retry; } - if (atomic_cmpset_int(&exhausted, 1, 0)) + if (atomic_cmpset_rel_int(&exhausted, 1, 0)) printf("swap zone ok\n"); swap->swb_hnext = NULL; @@ -1903,10 +1896,10 @@ done: /* * SWP_PAGER_META_FREE() - free a range of blocks in the object's swap metadata * - * The requested range of blocks is freed, with any associated swap + * The requested range of blocks is freed, with any associated swap * returned to the swap bitmap. * - * This routine will free swap metadata structures as they are cleaned + * This routine will free swap metadata structures as they are cleaned * out. This routine does *NOT* operate on swap metadata associated * with resident pages. */ @@ -1998,14 +1991,14 @@ swp_pager_meta_free_all(vm_object_t obje * swapblk assignments in the swap meta data or in the vm_page_t. * The routine typically returns the swapblk being looked-up, or popped, * or SWAPBLK_NONE if the block was freed, or SWAPBLK_NONE if the block - * was invalid. This routine will automatically free any invalid + * was invalid. This routine will automatically free any invalid * meta-data swapblks. * * It is not possible to store invalid swapblks in the swap meta data * (other then a literal 'SWAPBLK_NONE'), so we don't bother checking. * - * When acting on a busy resident page and paging is in progress, we - * have to wait until paging is complete but otherwise can act on the + * When acting on a busy resident page and paging is in progress, we + * have to wait until paging is complete but otherwise can act on the * busy page. * * SWM_FREE remove and free swap block from metadata @@ -2021,7 +2014,7 @@ swp_pager_meta_ctl(vm_object_t object, v VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); /* - * The meta data only exists of the object is OBJT_SWAP + * The meta data only exists of the object is OBJT_SWAP * and even then might not be allocated yet. */ if (object->type != OBJT_SWAP) @@ -2047,7 +2040,7 @@ swp_pager_meta_ctl(vm_object_t object, v uma_zfree(swap_zone, swap); --object->un_pager.swp.swp_bcount; } - } + } } } mtx_unlock(&swhash_mtx); @@ -2065,7 +2058,7 @@ struct swapon_args { }; #endif -/* +/* * MPSAFE */ /* ARGSUSED */ @@ -2160,7 +2153,7 @@ swaponsomething(struct vnode *vp, void * /* * nblks is in DEV_BSIZE'd chunks, convert to PAGE_SIZE'd chunks. * First chop nblks off to page-align it, then convert. - * + * * sw->sw_nblks is in page-sized chunks now too. */ nblks &= ~(ctodb(1) - 1); @@ -2349,12 +2342,12 @@ swapoff_all(void) struct swdevt *sp, *spt; const char *devname; int error; - + mtx_lock(&Giant); while (swdev_syscall_active) tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0); swdev_syscall_active = 1; - + mtx_lock(&sw_dev_mtx); TAILQ_FOREACH_SAFE(sp, &swtailq, sw_list, spt) { mtx_unlock(&sw_dev_mtx); @@ -2372,7 +2365,7 @@ swapoff_all(void) mtx_lock(&sw_dev_mtx); } mtx_unlock(&sw_dev_mtx); - + swdev_syscall_active = 0; wakeup_one(&swdev_syscall_active); mtx_unlock(&Giant); @@ -2716,7 +2709,7 @@ swaponvp(struct thread *td, struct vnode } } mtx_unlock(&sw_dev_mtx); - + (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:07:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B34310657A5; Tue, 4 Sep 2012 21:07:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9798FC0A; Tue, 4 Sep 2012 21:07:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BC3D0B945; Tue, 4 Sep 2012 17:07:05 -0400 (EDT) From: John Baldwin To: Robert Watson Date: Tue, 4 Sep 2012 15:17:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208251202.q7PC2EL6034670@svn.freebsd.org> In-Reply-To: <201208251202.q7PC2EL6034670@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209041517.52973.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 04 Sep 2012 17:07:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dag-Erling SmXrgrav Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:07:06 -0000 On Saturday, August 25, 2012 8:02:14 am Robert Watson wrote: > Author: rwatson > Date: Sat Aug 25 12:02:13 2012 > New Revision: 239679 > URL: http://svn.freebsd.org/changeset/base/239679 > > Log: > Add reference kernel configurations for FreeBSD/beri in simulation, on the > Terasic DE-4, and Terasic tPad Altera-based boards. > > Sponsored by: DARPA, AFRL I'm not sure why the tinderbox isn't reporting this, but this breaks 'make tinderbox' for me due to the hardcoded MFS paths in the _MDROOT configs: -------------------------------------------------------------- >>> make universe started on Fri Aug 31 17:26:08 EDT 2012 -------------------------------------------------------------- >> amd64 started on Fri Aug 31 17:26:08 EDT 2012 >> amd64 completed on Fri Aug 31 18:49:29 EDT 2012 >> arm started on Fri Aug 31 18:49:29 EDT 2012 >> arm completed on Fri Aug 31 19:27:59 EDT 2012 >> i386 started on Fri Aug 31 19:27:59 EDT 2012 >> i386 completed on Fri Aug 31 20:55:27 EDT 2012 >> ia64 started on Fri Aug 31 20:55:27 EDT 2012 >> ia64 completed on Fri Aug 31 21:13:10 EDT 2012 >> mips started on Fri Aug 31 21:13:10 EDT 2012 mips BERI_DE4_MDROOT kernel failed, check _.mips.BERI_DE4_MDROOT for details mips BERI_SIM_MDROOT kernel failed, check _.mips.BERI_SIM_MDROOT for details >> mips completed on Fri Aug 31 21:55:59 EDT 2012 >> pc98 started on Fri Aug 31 21:55:59 EDT 2012 >> pc98 completed on Fri Aug 31 22:22:36 EDT 2012 >> powerpc started on Fri Aug 31 22:22:36 EDT 2012 >> powerpc completed on Fri Aug 31 22:44:48 EDT 2012 >> sparc64 started on Fri Aug 31 22:44:48 EDT 2012 >> sparc64 completed on Fri Aug 31 23:00:01 EDT 2012 -------------------------------------------------------------- >>> make universe completed on Fri Aug 31 23:00:01 EDT 2012 (started Fri Aug 31 17:26:08 EDT 2012) -------------------------------------------------------------- Tinderbox failed: mips BERI_DE4_MDROOT kernel failed, check _.mips.BERI_DE4_MDROOT for details mips BERI_SIM_MDROOT kernel failed, check _.mips.BERI_SIM_MDROOT for details > tail _.mips.BERI_DE4_MDROOT ... make: don't know how to make /local/scratch/rnw24/mdroot.img. Stop Hmm, the tinderbox skips the BERI configs: TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_DE4_MDROOT TB --- 2012-09-04 10:38:06 - skipping BERI_DE4_MDROOT kernel TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_DE4_SDROOT TB --- 2012-09-04 10:38:06 - skipping BERI_DE4_SDROOT kernel TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_SIM_MDROOT TB --- 2012-09-04 10:38:06 - skipping BERI_SIM_MDROOT kernel TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_TEMPLATE TB --- 2012-09-04 10:38:06 - skipping BERI_TEMPLATE kernel -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:07:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2054C1065944; Tue, 4 Sep 2012 21:07:21 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id D4C9B8FC14; Tue, 4 Sep 2012 21:07:20 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 068AF6C92; Tue, 4 Sep 2012 23:07:20 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id C4F798273; Tue, 4 Sep 2012 23:07:19 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <201209041904.q84J42ng004100@svn.freebsd.org> <201209041511.56128.jhb@freebsd.org> Date: Tue, 04 Sep 2012 23:07:19 +0200 In-Reply-To: <201209041511.56128.jhb@freebsd.org> (John Baldwin's message of "Tue, 4 Sep 2012 15:11:56 -0400") Message-ID: <86obllebug.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240096 - 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: Tue, 04 Sep 2012 21:07:21 -0000 John Baldwin writes: > Humm, this seemed to have a lot of unrelated changes? *frak* Thanks for noticing. I committed from the wrong tree. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:23:06 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458701065686; Tue, 4 Sep 2012 21:23:06 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0468FC14; Tue, 4 Sep 2012 21:23:05 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q84LMxxB097228; Tue, 4 Sep 2012 16:22:59 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q84LMxlF097227; Tue, 4 Sep 2012 16:22:59 -0500 (CDT) (envelope-from brooks) Date: Tue, 4 Sep 2012 16:22:59 -0500 From: Brooks Davis To: John Baldwin Message-ID: <20120904212259.GA95355@lor.one-eyed-alien.net> References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <201209041517.52973.jhb@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, Robert Watson , Dag-Erling SmXrgrav Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:23:06 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 04, 2012 at 03:17:52PM -0400, John Baldwin wrote: > On Saturday, August 25, 2012 8:02:14 am Robert Watson wrote: > > Author: rwatson > > Date: Sat Aug 25 12:02:13 2012 > > New Revision: 239679 > > URL: http://svn.freebsd.org/changeset/base/239679 > >=20 > > Log: > > Add reference kernel configurations for FreeBSD/beri in simulation, o= n the > > Terasic DE-4, and Terasic tPad Altera-based boards. > > =20 > > Sponsored by: DARPA, AFRL >=20 > I'm not sure why the tinderbox isn't reporting this, but this breaks 'mak= e=20 > tinderbox' for me due to the hardcoded MFS paths in the _MDROOT configs: Oops, we should remove those from the versions in the base system. The change that causes the nonexistence of the images to be fatal is fairly recent so I suppose it's possible that tinderbox hasn't picked it up. -- Brooks >=20 > -------------------------------------------------------------- > >>> make universe started on Fri Aug 31 17:26:08 EDT 2012 > -------------------------------------------------------------- > >> amd64 started on Fri Aug 31 17:26:08 EDT 2012 > >> amd64 completed on Fri Aug 31 18:49:29 EDT 2012 > >> arm started on Fri Aug 31 18:49:29 EDT 2012 > >> arm completed on Fri Aug 31 19:27:59 EDT 2012 > >> i386 started on Fri Aug 31 19:27:59 EDT 2012 > >> i386 completed on Fri Aug 31 20:55:27 EDT 2012 > >> ia64 started on Fri Aug 31 20:55:27 EDT 2012 > >> ia64 completed on Fri Aug 31 21:13:10 EDT 2012 > >> mips started on Fri Aug 31 21:13:10 EDT 2012 > mips BERI_DE4_MDROOT kernel failed, check _.mips.BERI_DE4_MDROOT for deta= ils > mips BERI_SIM_MDROOT kernel failed, check _.mips.BERI_SIM_MDROOT for deta= ils > >> mips completed on Fri Aug 31 21:55:59 EDT 2012 > >> pc98 started on Fri Aug 31 21:55:59 EDT 2012 > >> pc98 completed on Fri Aug 31 22:22:36 EDT 2012 > >> powerpc started on Fri Aug 31 22:22:36 EDT 2012 > >> powerpc completed on Fri Aug 31 22:44:48 EDT 2012 > >> sparc64 started on Fri Aug 31 22:44:48 EDT 2012 > >> sparc64 completed on Fri Aug 31 23:00:01 EDT 2012 > -------------------------------------------------------------- > >>> make universe completed on Fri Aug 31 23:00:01 EDT 2012 > (started Fri Aug 31 17:26:08 EDT 2012) > -------------------------------------------------------------- > Tinderbox failed: > mips BERI_DE4_MDROOT kernel failed, check _.mips.BERI_DE4_MDROOT for deta= ils > mips BERI_SIM_MDROOT kernel failed, check _.mips.BERI_SIM_MDROOT for deta= ils >=20 > > tail _.mips.BERI_DE4_MDROOT=20 > ... > make: don't know how to make /local/scratch/rnw24/mdroot.img. Stop >=20 > Hmm, the tinderbox skips the BERI configs: >=20 > TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf > TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_DE4_MDROOT > TB --- 2012-09-04 10:38:06 - skipping BERI_DE4_MDROOT kernel > TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf > TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_DE4_SDROOT > TB --- 2012-09-04 10:38:06 - skipping BERI_DE4_SDROOT kernel > TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf > TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_SIM_MDROOT > TB --- 2012-09-04 10:38:06 - skipping BERI_SIM_MDROOT kernel > TB --- 2012-09-04 10:38:06 - cd /src/sys/mips/conf > TB --- 2012-09-04 10:38:06 - /usr/sbin/config -m BERI_TEMPLATE > TB --- 2012-09-04 10:38:06 - skipping BERI_TEMPLATE kernel >=20 > --=20 > John Baldwin >=20 --DocE+STaALJfprDB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQRnEyXY6L6fI4GtQRAgCmAJ9nhuqMxODpyFN26HlU5jzwDlF5zgCfT65s qNDZzoVXaDTP7aPP4wEci44= =Axeg -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:38:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC9C106564A; Tue, 4 Sep 2012 21:38:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 644DD8FC12; Tue, 4 Sep 2012 21:38:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84LcWT4022845; Tue, 4 Sep 2012 21:38:32 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84LcWFO022836; Tue, 4 Sep 2012 21:38:32 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209042138.q84LcWFO022836@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 Sep 2012 21:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240106 - in vendor/illumos/dist: cmd/dtrace/test/tst/common/drops cmd/dtrace/test/tst/common/pid cmd/dtrace/test/tst/common/usdt lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:38:32 -0000 Author: mm Date: Tue Sep 4 21:38:31 2012 New Revision: 240106 URL: http://svn.freebsd.org/changeset/base/240106 Log: Update vendor/illumos to illumos-gate 13788:0cb9e2232ae0 (dtrace changes, illumos issue #3123) Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/lazyprobe.d vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe.c vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe1.ksh vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe2.ksh vendor/illumos/dist/lib/libdtrace/common/dlink.h vendor/illumos/dist/lib/libdtrace/common/dlink_audit.c vendor/illumos/dist/lib/libdtrace/common/dlink_init.c Deleted: vendor/illumos/dist/lib/libdtrace/common/drti.c Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d ============================================================================== --- vendor/illumos/dist/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d Tue Sep 4 21:06:53 2012 (r240105) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d Tue Sep 4 21:38:31 2012 (r240106) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ #pragma D option destructive #pragma D option jstackstrsize=1 @@ -32,7 +34,13 @@ BEGIN { - system("java -version"); + /* + * Since some java versions are erroneously compiled with -xlazyload + * and therefore don't activate their ustack() helper by default, we + * use the DTrace helper audit library to activate it. + */ + system("LD_AUDIT_32=/usr/lib/dtrace/libdtrace_forceload.so %s", + "java -version"); } syscall:::entry Modified: vendor/illumos/dist/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe ============================================================================== Binary file (source and/or target). No diff available. Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/lazyprobe.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/lazyprobe.d Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,22 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +provider lazyprobe { + probe fire(); +}; Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe.c Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#include "lazyprobe.h" + +int +main(int argc, char **argv) +{ + for (;;) { + LAZYPROBE_FIRE(); + } + + return (0); +} Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe1.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe1.ksh Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,63 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +# +# Verify that USDT objects built with -xlazyload don't fire by default. +# + +./tst.lazyprobe.exe & +id=$! + +ret=1 + +$dtrace -Z -s /dev/stdin <<-EOF + lazyprobe*:::fire + { + exit(1); + } + tick-10hz + /i++ > 20/ + { + exit(0); + } +EOF +ret=$? + +kill -9 $id + +exit $ret Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe2.ksh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.lazyprobe2.ksh Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,64 @@ +#!/usr/bin/ksh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +# +# Verify that USDT objects built with -xlazyload fire by default when using +# the DTrace audit library. +# + +LD_AUDIT_32=/usr/lib/dtrace/libdtrace_forceload.so ./tst.lazyprobe.exe & +id=$! + +ret=1 + +$dtrace -Z -s /dev/stdin <<-EOF + lazyprobe*:::fire + { + exit(0); + } + tick-10hz + /i++ > 20/ + { + exit(1); + } +EOF +ret=$? + +kill -9 $id + +exit $ret Added: vendor/illumos/dist/lib/libdtrace/common/dlink.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/lib/libdtrace/common/dlink.h Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,40 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#ifndef _DLINK_H +#define _DLINK_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern const char *devname; + +extern void dprintf(int, const char *, ...); +extern void dtrace_link_init(void); +extern void dtrace_link_dof(dof_hdr_t *, Lmid_t, const char *, uintptr_t); + +#ifdef __cplusplus +} +#endif + +#endif /* _DLINK_H */ Added: vendor/illumos/dist/lib/libdtrace/common/dlink_audit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/lib/libdtrace/common/dlink_audit.c Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,128 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * This file implements an audit library that can be used to force the loading + * of helper providers. The default disposition for a helper provider -- USDT + * and ustack helpers -- is to load itself from it's containing object's .init + * section. In cases where startup time is deemed critical, USDT authors can + * use the -xlazyload option to dtrace(1M) to disable automatic loading (it's + * difficult to make the case for the utility of this feature for anything + * other than libc which, indeed, was the sole motivation). If a binary has + * been compiled with automatic loading disabled, this audit library may be + * used to force automatic loading: + * + * LD_AUDIT_32=/usr/lib/dtrace/libdaudit.so + * LD_AUDIT_64=/usr/lib/dtrace/64/libdaudit.so + */ + +#include +#include +#include +#include + +#include + +typedef struct obj_list { + struct obj_list *ol_next; + char *ol_name; + uintptr_t ol_addr; + Lmid_t ol_lmid; +} obj_list_t; + +static obj_list_t *list; + +#pragma init(dtrace_daudit_init) +static void +dtrace_daudit_init(void) +{ + dtrace_link_init(); +} + +/*ARGSUSED*/ +uint_t +la_version(uint_t version) +{ + return (LAV_CURRENT); +} + +/* + * Record objects into our linked list as they're loaded. + */ +/*ARGSUSED*/ +uint_t +la_objopen(Link_map *lmp, Lmid_t lmid, uintptr_t *cookie) +{ + obj_list_t *node; + + /* + * If we can't allocate the next node in our list, we'll try to emit a + * message, but it's possible that might fail as well. + */ + if ((node = malloc(sizeof (obj_list_t))) == NULL) { + dprintf(0, "libdaudit: failed to allocate"); + return (0); + } + node->ol_next = list; + node->ol_name = strdup(lmp->l_name); + node->ol_addr = lmp->l_addr; + node->ol_lmid = lmid; + list = node; + + return (0); +} + +/* + * Once the link maps have reached a consistent state, process the list of + * objects that were loaded. We need to use libproc to search for the + * ___SUNW_dof symbol rather than dlsym(3C) since the symbol is not in the + * dynamic (run-time) symbol table (though it is, of course, in the symtab). + * Once we find it, we ioctl(2) it to the kernel just as we would have from + * the .init section if automatic loading were enabled. + */ +/*ARGSUSED*/ +void +la_activity(uintptr_t *cookie, uint_t flags) +{ + struct ps_prochandle *P; + int err, ret; + GElf_Sym sym; + + if (flags != LA_ACT_CONSISTENT) + return; + + while (list != NULL) { + obj_list_t *node = list; + char *name = node->ol_name; + + list = node->ol_next; + + P = Pgrab(getpid(), PGRAB_RDONLY, &err); + ret = Plookup_by_name(P, name, "___SUNW_dof", &sym); + Prelease(P, 0); + + if (ret == 0) { + dtrace_link_dof((void *)(uintptr_t)sym.st_value, + node->ol_lmid, node->ol_name, node->ol_addr); + } + + free(node->ol_name); + free(node); + } +} Added: vendor/illumos/dist/lib/libdtrace/common/dlink_init.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/lib/libdtrace/common/dlink_init.c Tue Sep 4 21:38:31 2012 (r240106) @@ -0,0 +1,85 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * This is the basis for drti.o which dt_link.c links into the object file + * generated by dtrace(1M) -G by default (note that -xlazyload disables this). + */ + +#include +#include +#include +#include + +#include + +static int gen; /* DOF helper generation */ +extern dof_hdr_t __SUNW_dof; /* DOF defined in the .SUNW_dof section */ + +#pragma init(dtrace_drti_init) +static void +dtrace_drti_init(void) +{ + Link_map *lmp; + Lmid_t lmid; + + dtrace_link_init(); + + if (dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lmp) == -1 || lmp == NULL) { + dprintf(1, "couldn't discover module name or address\n"); + return; + } + + if (dlinfo(RTLD_SELF, RTLD_DI_LMID, &lmid) == -1) { + dprintf(1, "couldn't discover link map ID\n"); + return; + } + + dtrace_link_dof(&__SUNW_dof, lmid, lmp->l_name, lmp->l_addr); +} + +#pragma fini(dtrace_drti_fini) +static void +dtrace_drti_fini(void) +{ + int fd; + + if ((fd = open64(devname, O_RDWR)) < 0) { + dprintf(1, "failed to open helper device %s", devname); + return; + } + + if ((gen = ioctl(fd, DTRACEHIOC_REMOVE, gen)) == -1) + dprintf(1, "DTrace ioctl failed to remove DOF (%d)\n", gen); + else + dprintf(1, "DTrace ioctl removed DOF (%d)\n", gen); + + (void) close(fd); +} From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:40:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70715106566C; Tue, 4 Sep 2012 21:40:54 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 421888FC0A; Tue, 4 Sep 2012 21:40:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84Lesnh023138; Tue, 4 Sep 2012 21:40:54 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Les2x023135; Tue, 4 Sep 2012 21:40:54 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042140.q84Les2x023135@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 21:40: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: r240107 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 21:40:55 -0000 Author: des Date: Tue Sep 4 21:40:53 2012 New Revision: 240107 URL: http://svn.freebsd.org/changeset/base/240107 Log: Add a prominent warning about these functions' unsuitability for cryptographic purposes, and recommend using arc4random(3) instead. Modified: head/lib/libc/stdlib/rand.3 head/lib/libc/stdlib/random.3 Modified: head/lib/libc/stdlib/rand.3 ============================================================================== --- head/lib/libc/stdlib/rand.3 Tue Sep 4 21:38:31 2012 (r240106) +++ head/lib/libc/stdlib/rand.3 Tue Sep 4 21:40:53 2012 (r240107) @@ -55,9 +55,15 @@ .Fn rand_r "unsigned *ctx" .Sh DESCRIPTION .Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp These interfaces are obsoleted by .Xr random 3 . -.Ef .Pp The .Fn rand @@ -88,9 +94,6 @@ The function initializes a seed using the .Xr random 4 random number device which returns good random numbers. -However, the -.Fn rand -function still remains unsuitable for cryptographic use. .Pp The .Fn rand_r @@ -105,8 +108,6 @@ For better generator quality, use .Xr random 3 or .Xr lrand48 3 . -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . .Sh SEE ALSO .Xr arc4random 3 , .Xr lrand48 3 , Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Sep 4 21:38:31 2012 (r240106) +++ head/lib/libc/stdlib/random.3 Tue Sep 4 21:40:53 2012 (r240107) @@ -53,6 +53,14 @@ .Ft char * .Fn setstate "char *state" .Sh DESCRIPTION +.Bf -symbolic +The functions described in this manual page are not cryptographically +secure. +Cryptographic applications should use +.Xr arc4random 3 +instead. +.Ef +.Pp The .Fn random function @@ -98,10 +106,8 @@ as the seed. .Pp The .Fn srandomdev -routine initializes a state array using the -.Xr random 4 -random number device which returns good random numbers, -suitable for cryptographic use. +routine initializes a state array using data from +.Xr random 4 . Note that this particular seeding procedure can generate states which are impossible to reproduce by calling @@ -191,6 +197,3 @@ The historical implementation used to ha random sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. -.Pp -Applications requiring cryptographic quality randomness should use -.Xr arc4random 3 . From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:47:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45A56106564A; Tue, 4 Sep 2012 21:47:10 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 316978FC18; Tue, 4 Sep 2012 21:47:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84LlAti023834; Tue, 4 Sep 2012 21:47:10 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Ll92Y023832; Tue, 4 Sep 2012 21:47:09 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209042147.q84Ll92Y023832@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 4 Sep 2012 21:47: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: r240108 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 21:47:10 -0000 Author: obrien Date: Tue Sep 4 21:47:09 2012 New Revision: 240108 URL: http://svn.freebsd.org/changeset/base/240108 Log: * Rather than run the same 'ps' command twice, add 'kenv' which often gives machine unique values from the firmware. * The kernel is more likely to be unique than /bin/ls (but no need to stuff many megabytes into /dev/random, so hash it). * Change ordering to give larger variance across reboots to reduce predictability. Modified: head/etc/rc.d/initrandom Modified: head/etc/rc.d/initrandom ============================================================================== --- head/etc/rc.d/initrandom Tue Sep 4 21:40:53 2012 (r240107) +++ head/etc/rc.d/initrandom Tue Sep 4 21:47:09 2012 (r240108) @@ -27,9 +27,11 @@ better_than_nothing() # harvesting rate. # Entropy below is not great, but better than nothing. # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + # Note: commands are ordered to cause the most variance across reboots. + ( kenv; dmesg; df -ib; ps -fauxww; date; sysctl -a ) \ + | dd of=/dev/random bs=8k 2>/dev/null + /sbin/sha256 -q `sysctl -n kern.bootfile` \ | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null } initrandom_start() From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:50:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77ED61065796; Tue, 4 Sep 2012 21:50:52 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 360888FC14; Tue, 4 Sep 2012 21:50:52 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id AA17A6CBB; Tue, 4 Sep 2012 23:50:50 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 672CC827C; Tue, 4 Sep 2012 23:50:50 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> Date: Tue, 04 Sep 2012 23:50:50 +0200 In-Reply-To: <201209041517.52973.jhb@freebsd.org> (John Baldwin's message of "Tue, 4 Sep 2012 15:17:52 -0400") Message-ID: <86k3w9e9tx.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:50:52 -0000 John Baldwin writes: > Hmm, the tinderbox skips the BERI configs: It doesn't build the BERI kernels because they're mips64/mips, and it only builds mips/mips. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:54:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AD17106564A; Tue, 4 Sep 2012 21:54:35 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB478FC14; Tue, 4 Sep 2012 21:54:34 +0000 (UTC) Received: by iebc12 with SMTP id c12so7698429ieb.13 for ; Tue, 04 Sep 2012 14:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=yFoh2aqKpTLA50DIgDUsBT6telQaj0+R1TjODvnaWe4=; b=eaINdPxt8UD9FaMaKFOf7JjIR58sDVJoQEFltn5DSM91vpL1VFvLMObxbZHkKmzT8M iD3jxSbUVKU/ICeMn5H2LNhuqYo0VhAijQGUq/O/kxurMxBOLNYnohCe8xP9igDpbe9w UVRC6vvPWuNYWmFy+vdUlhRoKWq3UKaYij8rME0SL22jNxMMcHjx5Kir2KwwxzqKXF0v bxFmb3uiUuCRwrjbpiMucAi3dQs3P2oVVw7fxBwUExGsN+ixjRIAQVGhFpP6JfI9KUHQ TSEmeqfgllsrsh04wSdawznbV+WBof6iYlEsGnKytexOvKQ76gXVVRTIRJLRdTlcRKpn ZEgw== MIME-Version: 1.0 Received: by 10.182.174.100 with SMTP id br4mr16316850obc.62.1346795673812; Tue, 04 Sep 2012 14:54:33 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 4 Sep 2012 14:54:33 -0700 (PDT) In-Reply-To: <86k3w9e9tx.fsf@ds4.des.no> References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> Date: Tue, 4 Sep 2012 14:54:33 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 21:54:35 -0000 On Tue, Sep 4, 2012 at 2:50 PM, Dag-Erling Sm=F8rgrav wrote: > John Baldwin writes: >> Hmm, the tinderbox skips the BERI configs: > > It doesn't build the BERI kernels because they're mips64/mips, and it > only builds mips/mips. Does it sanitize TARGETS and KERNCONFs properly? -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:56:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFE2E106579E; Tue, 4 Sep 2012 21:56:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB7B78FC1A; Tue, 4 Sep 2012 21:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84LuGxL024928; Tue, 4 Sep 2012 21:56:16 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84LuGxt024926; Tue, 4 Sep 2012 21:56:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042156.q84LuGxt024926@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 21:56: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: r240109 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 21:56:17 -0000 Author: des Date: Tue Sep 4 21:56:16 2012 New Revision: 240109 URL: http://svn.freebsd.org/changeset/base/240109 Log: Add a configtest command. Submitted by: gjb@ MFC after: 1 week Modified: head/etc/rc.d/sshd Modified: head/etc/rc.d/sshd ============================================================================== --- head/etc/rc.d/sshd Tue Sep 4 21:47:09 2012 (r240108) +++ head/etc/rc.d/sshd Tue Sep 4 21:56:16 2012 (r240109) @@ -14,8 +14,9 @@ rcvar="sshd_enable" command="/usr/sbin/${name}" keygen_cmd="sshd_keygen" start_precmd="sshd_precmd" +configtest_cmd="sshd_configtest" pidfile="/var/run/${name}.pid" -extra_commands="keygen reload" +extra_commands="configtest keygen reload" timeout=300 @@ -87,6 +88,12 @@ sshd_keygen() ) } +sshd_configtest() +{ + echo "Performing sanity check on ${name} configuration." + eval ${command} ${sshd_flags} -t +} + sshd_precmd() { if [ ! -f /etc/ssh/ssh_host_key -o \ @@ -96,6 +103,7 @@ sshd_precmd() user_reseed run_rc_command keygen fi + sshd_configtest } load_rc_config $name From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:58:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B4A1065670; Tue, 4 Sep 2012 21:58:23 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 522A28FC14; Tue, 4 Sep 2012 21:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84LwNJe025215; Tue, 4 Sep 2012 21:58:23 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84LwNfO025200; Tue, 4 Sep 2012 21:58:23 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209042158.q84LwNfO025200@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 Sep 2012 21:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240110 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest vendor/illumos/dist/lib/libzpool/common/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, 04 Sep 2012 21:58:23 -0000 Author: mm Date: Tue Sep 4 21:58:22 2012 New Revision: 240110 URL: http://svn.freebsd.org/changeset/base/240110 Log: Update vendor/illumos/dist and vendor/illumos-gate/dist to illumos-gate revision 13794:7c5e0e746b2c Obtained from: ssh://anonhg@hg.illumos.org/illumos-gate Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Sep 4 21:58:22 2012 (r240110) @@ -135,6 +135,12 @@ #include #include +#ifndef _KERNEL +/* set with ZFS_DEBUG=watch, to enable watchpoints on frozen buffers */ +boolean_t arc_watch = B_FALSE; +int arc_procfd; +#endif + static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; @@ -474,6 +480,7 @@ static void arc_get_data_buf(arc_buf_t * static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock); static int arc_evict_needed(arc_buf_contents_t type); static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes); +static void arc_buf_watch(arc_buf_t *buf); static boolean_t l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *ab); @@ -949,6 +956,50 @@ arc_cksum_compute(arc_buf_t *buf, boolea fletcher_2_native(buf->b_data, buf->b_hdr->b_size, buf->b_hdr->b_freeze_cksum); mutex_exit(&buf->b_hdr->b_freeze_lock); + arc_buf_watch(buf); +} + +#ifndef _KERNEL +typedef struct procctl { + long cmd; + prwatch_t prwatch; +} procctl_t; +#endif + +/* ARGSUSED */ +static void +arc_buf_unwatch(arc_buf_t *buf) +{ +#ifndef _KERNEL + if (arc_watch) { + int result; + procctl_t ctl; + ctl.cmd = PCWATCH; + ctl.prwatch.pr_vaddr = (uintptr_t)buf->b_data; + ctl.prwatch.pr_size = 0; + ctl.prwatch.pr_wflags = 0; + result = write(arc_procfd, &ctl, sizeof (ctl)); + ASSERT3U(result, ==, sizeof (ctl)); + } +#endif +} + +/* ARGSUSED */ +static void +arc_buf_watch(arc_buf_t *buf) +{ +#ifndef _KERNEL + if (arc_watch) { + int result; + procctl_t ctl; + ctl.cmd = PCWATCH; + ctl.prwatch.pr_vaddr = (uintptr_t)buf->b_data; + ctl.prwatch.pr_size = buf->b_hdr->b_size; + ctl.prwatch.pr_wflags = WA_WRITE; + result = write(arc_procfd, &ctl, sizeof (ctl)); + ASSERT3U(result, ==, sizeof (ctl)); + } +#endif } void @@ -975,6 +1026,8 @@ arc_buf_thaw(arc_buf_t *buf) } mutex_exit(&buf->b_hdr->b_freeze_lock); + + arc_buf_unwatch(buf); } void @@ -992,6 +1045,7 @@ arc_buf_freeze(arc_buf_t *buf) buf->b_hdr->b_state == arc_anon); arc_cksum_compute(buf, B_FALSE); mutex_exit(hash_lock); + } static void @@ -1348,21 +1402,22 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta * the buffer is placed on l2arc_free_on_write to be freed later. */ static void -arc_buf_data_free(arc_buf_hdr_t *hdr, void (*free_func)(void *, size_t), - void *data, size_t size) +arc_buf_data_free(arc_buf_t *buf, void (*free_func)(void *, size_t)) { + arc_buf_hdr_t *hdr = buf->b_hdr; + if (HDR_L2_WRITING(hdr)) { l2arc_data_free_t *df; df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP); - df->l2df_data = data; - df->l2df_size = size; + df->l2df_data = buf->b_data; + df->l2df_size = hdr->b_size; df->l2df_func = free_func; mutex_enter(&l2arc_free_on_write_mtx); list_insert_head(l2arc_free_on_write, df); mutex_exit(&l2arc_free_on_write_mtx); ARCSTAT_BUMP(arcstat_l2_free_on_write); } else { - free_func(data, size); + free_func(buf->b_data, hdr->b_size); } } @@ -1378,16 +1433,15 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ arc_buf_contents_t type = buf->b_hdr->b_type; arc_cksum_verify(buf); + arc_buf_unwatch(buf); if (!recycle) { if (type == ARC_BUFC_METADATA) { - arc_buf_data_free(buf->b_hdr, zio_buf_free, - buf->b_data, size); + arc_buf_data_free(buf, zio_buf_free); arc_space_return(size, ARC_SPACE_DATA); } else { ASSERT(type == ARC_BUFC_DATA); - arc_buf_data_free(buf->b_hdr, - zio_data_buf_free, buf->b_data, size); + arc_buf_data_free(buf, zio_data_buf_free); ARCSTAT_INCR(arcstat_data_size, -size); atomic_add_64(&arc_size, -size); } @@ -2556,6 +2610,7 @@ arc_read_done(zio_t *zio) } arc_cksum_compute(buf, B_FALSE); + arc_buf_watch(buf); if (hash_lock && zio->io_error == 0 && hdr->b_state == arc_anon) { /* @@ -3113,6 +3168,7 @@ arc_release(arc_buf_t *buf, void *tag) } hdr->b_datacnt -= 1; arc_cksum_verify(buf); + arc_buf_unwatch(buf); mutex_exit(hash_lock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c Tue Sep 4 21:58:22 2012 (r240110) @@ -189,7 +189,8 @@ bptree_iterate(objset_t *os, uint64_t ob break; err = traverse_dataset_destroyed(os->os_spa, &bte.be_bp, - bte.be_birth_txg, &bte.be_zb, TRAVERSE_POST, + bte.be_birth_txg, &bte.be_zb, + TRAVERSE_PREFETCH_METADATA | TRAVERSE_POST, bptree_visit_cb, &ba); if (free) { ASSERT(err == 0 || err == ERESTART); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Tue Sep 4 21:58:22 2012 (r240110) @@ -63,6 +63,8 @@ typedef struct traverse_data { static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *buf, uint64_t objset, uint64_t object); +static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *, + arc_buf_t *buf, uint64_t objset, uint64_t object); static int traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) @@ -178,9 +180,34 @@ traverse_pause(traverse_data_t *td, cons bcopy(zb, td->td_resume, sizeof (*td->td_resume)); } +static void +traverse_prefetch_metadata(traverse_data_t *td, + arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) +{ + uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; + + if (!(td->td_flags & TRAVERSE_PREFETCH_METADATA)) + return; + /* + * If we are in the process of resuming, don't prefetch, because + * some children will not be needed (and in fact may have already + * been freed). + */ + if (td->td_resume != NULL && !ZB_IS_ZERO(td->td_resume)) + return; + if (BP_IS_HOLE(bp) || bp->blk_birth <= td->td_min_txg) + return; + if (BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE) + return; + + (void) arc_read(NULL, td->td_spa, bp, + pbuf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL, &flags, zb); +} + static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *pbuf, blkptr_t *bp, const zbookmark_t *zb) + arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) { zbookmark_t czb; int err = 0, lasterr = 0; @@ -243,14 +270,21 @@ traverse_visitbp(traverse_data_t *td, co ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); + cbp = buf->b_data; + + for (i = 0; i < epb; i++) { + SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, + zb->zb_level - 1, + zb->zb_blkid * epb + i); + traverse_prefetch_metadata(td, buf, &cbp[i], &czb); + } /* recursively visitbp() blocks below this */ - cbp = buf->b_data; - for (i = 0; i < epb; i++, cbp++) { + for (i = 0; i < epb; i++) { SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - err = traverse_visitbp(td, dnp, buf, cbp, &czb); + err = traverse_visitbp(td, dnp, buf, &cbp[i], &czb); if (err) { if (!hard) break; @@ -267,11 +301,16 @@ traverse_visitbp(traverse_data_t *td, co ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); + dnp = buf->b_data; + + for (i = 0; i < epb; i++) { + prefetch_dnode_metadata(td, &dnp[i], buf, zb->zb_objset, + zb->zb_blkid * epb + i); + } /* recursively visitbp() blocks below this */ - dnp = buf->b_data; - for (i = 0; i < epb; i++, dnp++) { - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + for (i = 0; i < epb; i++) { + err = traverse_dnode(td, &dnp[i], buf, zb->zb_objset, zb->zb_blkid * epb + i); if (err) { if (!hard) @@ -292,6 +331,15 @@ traverse_visitbp(traverse_data_t *td, co osp = buf->b_data; dnp = &osp->os_meta_dnode; + prefetch_dnode_metadata(td, dnp, buf, zb->zb_objset, + DMU_META_DNODE_OBJECT); + if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { + prefetch_dnode_metadata(td, &osp->os_userused_dnode, + buf, zb->zb_objset, DMU_USERUSED_OBJECT); + prefetch_dnode_metadata(td, &osp->os_groupused_dnode, + buf, zb->zb_objset, DMU_USERUSED_OBJECT); + } + err = traverse_dnode(td, dnp, buf, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err && hard) { @@ -334,6 +382,24 @@ post: return (err != 0 ? err : lasterr); } +static void +prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *dnp, + arc_buf_t *buf, uint64_t objset, uint64_t object) +{ + int j; + zbookmark_t czb; + + for (j = 0; j < dnp->dn_nblkptr; j++) { + SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); + traverse_prefetch_metadata(td, buf, &dnp->dn_blkptr[j], &czb); + } + + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { + SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); + traverse_prefetch_metadata(td, buf, &dnp->dn_spill, &czb); + } +} + static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *buf, uint64_t objset, uint64_t object) @@ -344,8 +410,7 @@ traverse_dnode(traverse_data_t *td, cons for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - err = traverse_visitbp(td, dnp, buf, - (blkptr_t *)&dnp->dn_blkptr[j], &czb); + err = traverse_visitbp(td, dnp, buf, &dnp->dn_blkptr[j], &czb); if (err) { if (!hard) break; @@ -354,10 +419,8 @@ traverse_dnode(traverse_data_t *td, cons } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { - SET_BOOKMARK(&czb, objset, - object, 0, DMU_SPILL_BLKID); - err = traverse_visitbp(td, dnp, buf, - (blkptr_t *)&dnp->dn_spill, &czb); + SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); + err = traverse_visitbp(td, dnp, buf, &dnp->dn_spill, &czb); if (err) { if (!hard) return (err); @@ -438,6 +501,12 @@ traverse_impl(spa_t *spa, dsl_dataset_t ASSERT(ds == NULL || objset == ds->ds_object); ASSERT(!(flags & TRAVERSE_PRE) || !(flags & TRAVERSE_POST)); + /* + * The data prefetching mechanism (the prefetch thread) is incompatible + * with resuming from a bookmark. + */ + ASSERT(resume == NULL || !(flags & TRAVERSE_PREFETCH_DATA)); + td.td_spa = spa; td.td_objset = objset; td.td_rootbp = rootbp; @@ -464,7 +533,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t traverse_zil(&td, &os->os_zil_header); } - if (!(flags & TRAVERSE_PREFETCH) || + if (!(flags & TRAVERSE_PREFETCH_DATA) || 0 == taskq_dispatch(system_taskq, traverse_prefetch_thread, &td, TQ_NOQUEUE)) pd.pd_exited = B_TRUE; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Tue Sep 4 21:58:22 2012 (r240110) @@ -429,6 +429,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; spa_t *spa = txh->txh_tx->tx_pool->dp_spa; int epbs; + uint64_t l0span = 0, nl1blks = 0; if (dn->dn_nlevels == 0) return; @@ -461,6 +462,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui nblks = dn->dn_maxblkid - blkid; } + l0span = nblks; /* save for later use to calc level > 1 overhead */ if (dn->dn_nlevels == 1) { int i; for (i = 0; i < nblks; i++) { @@ -473,24 +475,10 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui } unref += BP_GET_ASIZE(bp); } + nl1blks = 1; nblks = 0; } - /* - * Add in memory requirements of higher-level indirects. - * This assumes a worst-possible scenario for dn_nlevels. - */ - { - uint64_t blkcnt = 1 + ((nblks >> epbs) >> epbs); - int level = (dn->dn_nlevels > 1) ? 2 : 1; - - while (level++ < DN_MAX_LEVELS) { - txh->txh_memory_tohold += blkcnt << dn->dn_indblkshift; - blkcnt = 1 + (blkcnt >> epbs); - } - ASSERT(blkcnt <= dn->dn_nblkptr); - } - lastblk = blkid + nblks - 1; while (nblks) { dmu_buf_impl_t *dbuf; @@ -561,11 +549,35 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui } dbuf_rele(dbuf, FTAG); + ++nl1blks; blkid += tochk; nblks -= tochk; } rw_exit(&dn->dn_struct_rwlock); + /* + * Add in memory requirements of higher-level indirects. + * This assumes a worst-possible scenario for dn_nlevels and a + * worst-possible distribution of l1-blocks over the region to free. + */ + { + uint64_t blkcnt = 1 + ((l0span >> epbs) >> epbs); + int level = 2; + /* + * Here we don't use DN_MAX_LEVEL, but calculate it with the + * given datablkshift and indblkshift. This makes the + * difference between 19 and 8 on large files. + */ + int maxlevel = 2 + (DN_MAX_OFFSET_SHIFT - dn->dn_datablkshift) / + (dn->dn_indblkshift - SPA_BLKPTRSHIFT); + + while (level++ < maxlevel) { + txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs)) + << dn->dn_indblkshift; + blkcnt = 1 + (blkcnt >> epbs); + } + } + /* account for new level 1 indirect blocks that might show up */ if (skipped > 0) { txh->txh_fudge += skipped << dn->dn_indblkshift; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Sep 4 21:58:22 2012 (r240110) @@ -2302,7 +2302,6 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvl } } } - } void Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Tue Sep 4 21:58:22 2012 (r240110) @@ -456,12 +456,14 @@ dsl_dir_destroy_check(void *arg1, void * /* * There should be exactly two holds, both from * dsl_dataset_destroy: one on the dd directory, and one on its - * head ds. Otherwise, someone is trying to lookup something - * inside this dir while we want to destroy it. The - * config_rwlock ensures that nobody else opens it after we - * check. + * head ds. If there are more holds, then a concurrent thread is + * performing a lookup inside this dir while we're trying to destroy + * it. To minimize this possibility, we perform this check only + * in syncing context and fail the operation if we encounter + * additional holds. The dp_config_rwlock ensures that nobody else + * opens it after we check. */ - if (dmu_buf_refcount(dd->dd_dbuf) > 2) + if (dmu_tx_is_syncing(tx) && dmu_buf_refcount(dd->dd_dbuf) > 2) return (EBUSY); err = zap_count(mos, dd->dd_phys->dd_child_dir_zapobj, &count); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c Tue Sep 4 21:58:22 2012 (r240110) @@ -230,12 +230,7 @@ dsl_sync_task_do_nowait(dsl_pool_t *dp, dsl_checkfunc_t *checkfunc, dsl_syncfunc_t *syncfunc, void *arg1, void *arg2, int blocks_modified, dmu_tx_t *tx) { - dsl_sync_task_group_t *dstg; - - if (!spa_writeable(dp->dp_spa)) - return; - - dstg = dsl_sync_task_group_create(dp); + dsl_sync_task_group_t *dstg = dsl_sync_task_group_create(dp); dsl_sync_task_create(dstg, checkfunc, syncfunc, arg1, arg2, blocks_modified); dsl_sync_task_group_nowait(dstg, tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c Tue Sep 4 21:58:22 2012 (r240110) @@ -303,7 +303,7 @@ spa_history_log_nvl(spa_t *spa, nvlist_t dmu_tx_t *tx; nvlist_t *nvarg; - if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY) + if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY || !spa_writeable(spa)) return (EINVAL); tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); @@ -439,8 +439,9 @@ log_internal(nvlist_t *nvl, const char * /* * If this is part of creating a pool, not everything is * initialized yet, so don't bother logging the internal events. + * Likewise if the pool is not writeable. */ - if (tx->tx_txg == TXG_INITIAL) { + if (tx->tx_txg == TXG_INITIAL || !spa_writeable(spa)) { fnvlist_free(nvl); return; } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c Tue Sep 4 21:58:22 2012 (r240110) @@ -1600,6 +1600,18 @@ spa_init(int mode) spa_mode_global = mode; +#ifndef _KERNEL + if (spa_mode_global != FREAD && dprintf_find_string("watch")) { + arc_procfd = open("/proc/self/ctl", O_WRONLY); + if (arc_procfd == -1) { + perror("could not enable watchpoints: " + "opening /proc/self/ctl failed: "); + } else { + arc_watch = B_TRUE; + } + } +#endif + refcount_init(); unique_init(); zio_init(); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Tue Sep 4 21:58:22 2012 (r240110) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_ARC_H @@ -135,6 +136,11 @@ void l2arc_fini(void); void l2arc_start(void); void l2arc_stop(void); +#ifndef _KERNEL +extern boolean_t arc_watch; +extern int arc_procfd; +#endif + #ifdef __cplusplus } #endif Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Tue Sep 4 21:58:22 2012 (r240110) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_DNODE_H @@ -276,7 +277,6 @@ void dnode_byteswap(dnode_phys_t *dnp); void dnode_buf_byteswap(void *buf, size_t size); void dnode_verify(dnode_t *dn); int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx); -uint64_t dnode_current_max_length(dnode_t *dn); void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx); void dnode_clear_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h Tue Sep 4 21:58:22 2012 (r240110) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_ZFS_DEBUG_H @@ -75,6 +76,10 @@ extern void zfs_dbgmsg_init(void); extern void zfs_dbgmsg_fini(void); extern void zfs_dbgmsg(const char *fmt, ...); +#ifndef _KERNEL +extern int dprintf_find_string(const char *string); +#endif + #ifdef __cplusplus } #endif Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 4 21:58:22 2012 (r240110) @@ -4335,7 +4335,17 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) return (error); spa_vdev_state_enter(spa, SCL_NONE); + + /* + * If a resilver is already in progress then set the + * spa_scrub_reopen flag to B_TRUE so that we don't restart + * the scan as a side effect of the reopen. Otherwise, let + * vdev_open() decided if a resilver is required. + */ + spa->spa_scrub_reopen = dsl_scan_resilvering(spa->spa_dsl_pool); vdev_reopen(spa->spa_root_vdev); + spa->spa_scrub_reopen = B_FALSE; + (void) spa_vdev_state_exit(spa, NULL, 0); spa_close(spa, FTAG); return (0); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Tue Sep 4 21:58:22 2012 (r240110) @@ -125,11 +125,21 @@ zio_init(void) while (p2 & (p2 - 1)) p2 &= p2 - 1; +#ifndef _KERNEL + /* + * If we are using watchpoints, put each buffer on its own page, + * to eliminate the performance overhead of trapping to the + * kernel when modifying a non-watched buffer that shares the + * page with a watched buffer. + */ + if (arc_watch && !IS_P2ALIGNED(size, PAGESIZE)) + continue; +#endif if (size <= 4 * SPA_MINBLOCKSIZE) { align = SPA_MINBLOCKSIZE; - } else if (P2PHASE(size, PAGESIZE) == 0) { + } else if (IS_P2ALIGNED(size, PAGESIZE)) { align = PAGESIZE; - } else if (P2PHASE(size, p2 >> 2) == 0) { + } else if (IS_P2ALIGNED(size, p2 >> 2)) { align = p2 >> 2; } From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 21:58:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7A541065673; Tue, 4 Sep 2012 21:58:23 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87CDF8FC16; Tue, 4 Sep 2012 21:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84LwN8O025223; Tue, 4 Sep 2012 21:58:23 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84LwNOg025219; Tue, 4 Sep 2012 21:58:23 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209042158.q84LwNOg025219@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 Sep 2012 21:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240110 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest vendor/illumos/dist/lib/libzpool/common/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, 04 Sep 2012 21:58:23 -0000 Author: mm Date: Tue Sep 4 21:58:22 2012 New Revision: 240110 URL: http://svn.freebsd.org/changeset/base/240110 Log: Update vendor/illumos/dist and vendor/illumos-gate/dist to illumos-gate revision 13794:7c5e0e746b2c Obtained from: ssh://anonhg@hg.illumos.org/illumos-gate Modified: vendor/illumos/dist/cmd/ztest/ztest.c vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_debug.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Tue Sep 4 21:56:16 2012 (r240109) +++ vendor/illumos/dist/cmd/ztest/ztest.c Tue Sep 4 21:58:22 2012 (r240110) @@ -5835,6 +5835,8 @@ main(int argc, char **argv) (void) setvbuf(stdout, NULL, _IOLBF, 0); + dprintf_setup(&argc, argv); + if (!ischild) { process_options(argc, argv); Modified: vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Tue Sep 4 21:56:16 2012 (r240109) +++ vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Tue Sep 4 21:58:22 2012 (r240110) @@ -61,6 +61,7 @@ extern "C" { #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:01:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1949E106564A; Tue, 4 Sep 2012 22:01:46 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id C747F8FC1A; Tue, 4 Sep 2012 22:01:45 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 0269E6CD5; Wed, 5 Sep 2012 00:01:45 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id C77888290; Wed, 5 Sep 2012 00:01:44 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> Date: Wed, 05 Sep 2012 00:01:44 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 4 Sep 2012 14:54:33 -0700") Message-ID: <86fw6xe9br.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 22:01:46 -0000 Garrett Cooper writes: > Dag-Erling Sm=C3=B8rgrav writes: > > It doesn't build the BERI kernels because they're mips64/mips, and > > it only builds mips/mips. > Does it sanitize TARGETS and KERNCONFs properly? I have no idea what that even means. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:03:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CF4D1065670; Tue, 4 Sep 2012 22:03:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 583FD8FC20; Tue, 4 Sep 2012 22:03:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84M3HpT025825; Tue, 4 Sep 2012 22:03:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84M3HEN025822; Tue, 4 Sep 2012 22:03:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042203.q84M3HEN025822@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 22:03: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: r240111 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 22:03:17 -0000 Author: des Date: Tue Sep 4 22:03:16 2012 New Revision: 240111 URL: http://svn.freebsd.org/changeset/base/240111 Log: Bump dates. Reminded by: bz@ Modified: head/lib/libc/stdlib/rand.3 head/lib/libc/stdlib/random.3 Modified: head/lib/libc/stdlib/rand.3 ============================================================================== --- head/lib/libc/stdlib/rand.3 Tue Sep 4 21:58:22 2012 (r240110) +++ head/lib/libc/stdlib/rand.3 Tue Sep 4 22:03:16 2012 (r240111) @@ -32,7 +32,7 @@ .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 6, 2010 +.Dd September 4, 2012 .Dt RAND 3 .Os .Sh NAME Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Sep 4 21:58:22 2012 (r240110) +++ head/lib/libc/stdlib/random.3 Tue Sep 4 22:03:16 2012 (r240111) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 4, 2012 .Dt RANDOM 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:17:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C81106564A; Tue, 4 Sep 2012 22:17:34 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6138FC08; Tue, 4 Sep 2012 22:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84MHYiW027629; Tue, 4 Sep 2012 22:17:34 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84MHYLl027627; Tue, 4 Sep 2012 22:17:34 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201209042217.q84MHYLl027627@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 4 Sep 2012 22:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240112 - 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: Tue, 04 Sep 2012 22:17:34 -0000 Author: melifaro Date: Tue Sep 4 22:17:33 2012 New Revision: 240112 URL: http://svn.freebsd.org/changeset/base/240112 Log: Fix the build broken by r240099. Hide link_pfil_hook under _KERNEL macro. MFC after: 3 weeks Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Sep 4 22:03:16 2012 (r240111) +++ head/sys/net/if_var.h Tue Sep 4 22:17:33 2012 (r240112) @@ -99,8 +99,10 @@ TAILQ_HEAD(ifaddrhead, ifaddr); /* insta TAILQ_HEAD(ifmultihead, ifmultiaddr); TAILQ_HEAD(ifgrouphead, ifg_group); +#ifdef _KERNEL VNET_DECLARE(struct pfil_head, link_pfil_hook); /* packet filter hooks */ #define V_link_pfil_hook VNET(link_pfil_hook) +#endif /* _KERNEL */ /* * Structure defining a queue for a network interface. From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:19:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01951065670; Tue, 4 Sep 2012 22:19:33 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA0808FC0C; Tue, 4 Sep 2012 22:19:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84MJXww027901; Tue, 4 Sep 2012 22:19:33 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84MJXbv027899; Tue, 4 Sep 2012 22:19:33 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209042219.q84MJXbv027899@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 4 Sep 2012 22:19: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: r240113 - 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: Tue, 04 Sep 2012 22:19:33 -0000 Author: des Date: Tue Sep 4 22:19:33 2012 New Revision: 240113 URL: http://svn.freebsd.org/changeset/base/240113 Log: No memory barrier is required. This was pointed out by kib@ a while ago, but I got distracted by other matters. (for real this time) Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Sep 4 22:17:33 2012 (r240112) +++ head/sys/vm/swap_pager.c Tue Sep 4 22:19:33 2012 (r240113) @@ -1848,7 +1848,7 @@ retry: mtx_unlock(&swhash_mtx); VM_OBJECT_UNLOCK(object); if (uma_zone_exhausted(swap_zone)) { - if (atomic_cmpset_rel_int(&exhausted, 0, 1)) + if (atomic_cmpset_int(&exhausted, 0, 1)) printf("swap zone exhausted, " "increase kern.maxswzone\n"); vm_pageout_oom(VM_OOM_SWAPZ); @@ -1859,7 +1859,7 @@ retry: goto retry; } - if (atomic_cmpset_rel_int(&exhausted, 1, 0)) + if (atomic_cmpset_int(&exhausted, 1, 0)) printf("swap zone ok\n"); swap->swb_hnext = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:40:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17027106564A; Tue, 4 Sep 2012 22:40:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0320A8FC1C; Tue, 4 Sep 2012 22:40:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84MenEG030687; Tue, 4 Sep 2012 22:40:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Menm5030685; Tue, 4 Sep 2012 22:40:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209042240.q84Menm5030685@svn.freebsd.org> From: Michael Tuexen Date: Tue, 4 Sep 2012 22:40: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: r240114 - 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: Tue, 04 Sep 2012 22:40:50 -0000 Author: tuexen Date: Tue Sep 4 22:40:49 2012 New Revision: 240114 URL: http://svn.freebsd.org/changeset/base/240114 Log: Whitespace change. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Sep 4 22:19:33 2012 (r240113) +++ head/sys/netinet/sctputil.c Tue Sep 4 22:40:49 2012 (r240114) @@ -2385,7 +2385,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb timevalsub(&now, old); /* store the current RTT in us */ net->rtt = (uint64_t) 1000000 *(uint64_t) now.tv_sec + - (uint64_t) now.tv_usec; + (uint64_t) now.tv_usec; /* computer rtt in ms */ rtt = net->rtt / 1000; From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 22:45:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C89C2106566C; Tue, 4 Sep 2012 22:45:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0B5D8FC14; Tue, 4 Sep 2012 22:45:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84Mj0t5031201; Tue, 4 Sep 2012 22:45:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84Mj0fr031199; Tue, 4 Sep 2012 22:45:00 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209042245.q84Mj0fr031199@svn.freebsd.org> From: Michael Tuexen Date: Tue, 4 Sep 2012 22:45: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: r240115 - 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: Tue, 04 Sep 2012 22:45:00 -0000 Author: tuexen Date: Tue Sep 4 22:45:00 2012 New Revision: 240115 URL: http://svn.freebsd.org/changeset/base/240115 Log: Use the consistenly the size of a variable. This helps to keep the code simpler for the userland implementation. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Sep 4 22:40:49 2012 (r240114) +++ head/sys/netinet/sctp_output.c Tue Sep 4 22:45:00 2012 (r240115) @@ -3371,7 +3371,7 @@ sctp_find_cmsg(int c_type, void *data, s return (found); } m_copydata(control, at, sizeof(cmh), (caddr_t)&cmh); - if (cmh.cmsg_len < CMSG_ALIGN(sizeof(struct cmsghdr))) { + if (cmh.cmsg_len < CMSG_ALIGN(sizeof(cmh))) { /* We dont't have a complete CMSG header. */ return (found); } @@ -3386,11 +3386,11 @@ sctp_find_cmsg(int c_type, void *data, s (cmh.cmsg_type == SCTP_PRINFO) || (cmh.cmsg_type == SCTP_AUTHINFO))))) { if (c_type == cmh.cmsg_type) { - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < cpsize) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < cpsize) { return (found); } /* It is exactly what we want. Copy it out. */ - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), cpsize, (caddr_t)data); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), cpsize, (caddr_t)data); return (1); } else { struct sctp_sndrcvinfo *sndrcvinfo; @@ -3404,10 +3404,10 @@ sctp_find_cmsg(int c_type, void *data, s } switch (cmh.cmsg_type) { case SCTP_SNDINFO: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct sctp_sndinfo)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct sctp_sndinfo)) { return (found); } - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct sctp_sndinfo), (caddr_t)&sndinfo); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_sndinfo), (caddr_t)&sndinfo); sndrcvinfo->sinfo_stream = sndinfo.snd_sid; sndrcvinfo->sinfo_flags = sndinfo.snd_flags; sndrcvinfo->sinfo_ppid = sndinfo.snd_ppid; @@ -3415,18 +3415,18 @@ sctp_find_cmsg(int c_type, void *data, s sndrcvinfo->sinfo_assoc_id = sndinfo.snd_assoc_id; break; case SCTP_PRINFO: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct sctp_prinfo)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct sctp_prinfo)) { return (found); } - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct sctp_prinfo), (caddr_t)&prinfo); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_prinfo), (caddr_t)&prinfo); sndrcvinfo->sinfo_timetolive = prinfo.pr_value; sndrcvinfo->sinfo_flags |= prinfo.pr_policy; break; case SCTP_AUTHINFO: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct sctp_authinfo)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct sctp_authinfo)) { return (found); } - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct sctp_authinfo), (caddr_t)&authinfo); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_authinfo), (caddr_t)&authinfo); sndrcvinfo->sinfo_keynumber_valid = 1; sndrcvinfo->sinfo_keynumber = authinfo.auth_keynumber; break; @@ -3466,7 +3466,7 @@ sctp_process_cmsgs_for_init(struct sctp_ return (1); } m_copydata(control, at, sizeof(cmh), (caddr_t)&cmh); - if (cmh.cmsg_len < CMSG_ALIGN(sizeof(struct cmsghdr))) { + if (cmh.cmsg_len < CMSG_ALIGN(sizeof(cmh))) { /* We dont't have a complete CMSG header. */ *error = EINVAL; return (1); @@ -3479,11 +3479,11 @@ sctp_process_cmsgs_for_init(struct sctp_ if (cmh.cmsg_level == IPPROTO_SCTP) { switch (cmh.cmsg_type) { case SCTP_INIT: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct sctp_initmsg)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct sctp_initmsg)) { *error = EINVAL; return (1); } - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct sctp_initmsg), (caddr_t)&initmsg); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_initmsg), (caddr_t)&initmsg); if (initmsg.sinit_max_attempts) stcb->asoc.max_init_times = initmsg.sinit_max_attempts; if (initmsg.sinit_num_ostreams) @@ -3523,7 +3523,7 @@ sctp_process_cmsgs_for_init(struct sctp_ break; #ifdef INET case SCTP_DSTADDRV4: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct in_addr)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct in_addr)) { *error = EINVAL; return (1); } @@ -3531,7 +3531,7 @@ sctp_process_cmsgs_for_init(struct sctp_ sin.sin_family = AF_INET; sin.sin_len = sizeof(struct sockaddr_in); sin.sin_port = stcb->rport; - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct in_addr), (caddr_t)&sin.sin_addr); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct in_addr), (caddr_t)&sin.sin_addr); if ((sin.sin_addr.s_addr == INADDR_ANY) || (sin.sin_addr.s_addr == INADDR_BROADCAST) || IN_MULTICAST(ntohl(sin.sin_addr.s_addr))) { @@ -3547,7 +3547,7 @@ sctp_process_cmsgs_for_init(struct sctp_ #endif #ifdef INET6 case SCTP_DSTADDRV6: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct in6_addr)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct in6_addr)) { *error = EINVAL; return (1); } @@ -3555,7 +3555,7 @@ sctp_process_cmsgs_for_init(struct sctp_ sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_port = stcb->rport; - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct in6_addr), (caddr_t)&sin6.sin6_addr); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct in6_addr), (caddr_t)&sin6.sin6_addr); if (IN6_IS_ADDR_UNSPECIFIED(&sin6.sin6_addr) || IN6_IS_ADDR_MULTICAST(&sin6.sin6_addr)) { *error = EINVAL; @@ -3623,7 +3623,7 @@ sctp_findassociation_cmsgs(struct sctp_i return (NULL); } m_copydata(control, at, sizeof(cmh), (caddr_t)&cmh); - if (cmh.cmsg_len < CMSG_ALIGN(sizeof(struct cmsghdr))) { + if (cmh.cmsg_len < CMSG_ALIGN(sizeof(cmh))) { /* We dont't have a complete CMSG header. */ *error = EINVAL; return (NULL); @@ -3637,7 +3637,7 @@ sctp_findassociation_cmsgs(struct sctp_i switch (cmh.cmsg_type) { #ifdef INET case SCTP_DSTADDRV4: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct in_addr)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct in_addr)) { *error = EINVAL; return (NULL); } @@ -3645,13 +3645,13 @@ sctp_findassociation_cmsgs(struct sctp_i sin.sin_family = AF_INET; sin.sin_len = sizeof(struct sockaddr_in); sin.sin_port = port; - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct in_addr), (caddr_t)&sin.sin_addr); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct in_addr), (caddr_t)&sin.sin_addr); addr = (struct sockaddr *)&sin; break; #endif #ifdef INET6 case SCTP_DSTADDRV6: - if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr))) < sizeof(struct in6_addr)) { + if ((size_t)(cmh.cmsg_len - CMSG_ALIGN(sizeof(cmh))) < sizeof(struct in6_addr)) { *error = EINVAL; return (NULL); } @@ -3659,7 +3659,7 @@ sctp_findassociation_cmsgs(struct sctp_i sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_port = port; - m_copydata(control, at + CMSG_ALIGN(sizeof(struct cmsghdr)), sizeof(struct in6_addr), (caddr_t)&sin6.sin6_addr); + m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct in6_addr), (caddr_t)&sin6.sin6_addr); #ifdef INET if (IN6_IS_ADDR_V4MAPPED(&sin6.sin6_addr)) { in6_sin6_2_sin(&sin, &sin6); From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:07:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79371106566C; Tue, 4 Sep 2012 23:07:34 +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 5FAFD8FC0C; Tue, 4 Sep 2012 23:07:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84N7Y80033851; Tue, 4 Sep 2012 23:07:34 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84N7YQ6033842; Tue, 4 Sep 2012 23:07:34 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209042307.q84N7YQ6033842@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 4 Sep 2012 23:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240116 - in vendor/atf: . atf-0.16 atf-0.16/admin atf-0.16/atf-c atf-0.16/atf-c++ atf-0.16/atf-c++/detail atf-0.16/atf-c/detail atf-0.16/atf-config atf-0.16/atf-report atf-0.16/atf-run... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:07:34 -0000 Author: marcel Date: Tue Sep 4 23:07:32 2012 New Revision: 240116 URL: http://svn.freebsd.org/changeset/base/240116 Log: Import ATF version 0,16 Discussed with: gibbs, gnn, keramida, mdf, mlaier, Discussed with: Garrett Cooper Added: vendor/atf/ vendor/atf/atf-0.16/ vendor/atf/atf-0.16/AUTHORS vendor/atf/atf-0.16/Atffile vendor/atf/atf-0.16/COPYING vendor/atf/atf-0.16/INSTALL vendor/atf/atf-0.16/Kyuafile vendor/atf/atf-0.16/Makefile.am vendor/atf/atf-0.16/Makefile.in vendor/atf/atf-0.16/NEWS vendor/atf/atf-0.16/README vendor/atf/atf-0.16/TODO vendor/atf/atf-0.16/aclocal.m4 vendor/atf/atf-0.16/admin/ vendor/atf/atf-0.16/admin/Makefile.am.inc vendor/atf/atf-0.16/admin/check-install.sh (contents, props changed) vendor/atf/atf-0.16/admin/check-style-c.awk vendor/atf/atf-0.16/admin/check-style-common.awk vendor/atf/atf-0.16/admin/check-style-cpp.awk vendor/atf/atf-0.16/admin/check-style-man.awk vendor/atf/atf-0.16/admin/check-style-shell.awk vendor/atf/atf-0.16/admin/check-style.sh (contents, props changed) vendor/atf/atf-0.16/admin/compile (contents, props changed) vendor/atf/atf-0.16/admin/config.guess (contents, props changed) vendor/atf/atf-0.16/admin/config.sub (contents, props changed) vendor/atf/atf-0.16/admin/depcomp (contents, props changed) vendor/atf/atf-0.16/admin/install-sh (contents, props changed) vendor/atf/atf-0.16/admin/ltmain.sh vendor/atf/atf-0.16/admin/missing (contents, props changed) vendor/atf/atf-0.16/atf-c/ vendor/atf/atf-0.16/atf-c++/ vendor/atf/atf-0.16/atf-c++.hpp vendor/atf/atf-0.16/atf-c++/Atffile vendor/atf/atf-0.16/atf-c++/Kyuafile vendor/atf/atf-0.16/atf-c++/Makefile.am.inc vendor/atf/atf-0.16/atf-c++/atf-c++-api.3 vendor/atf/atf-0.16/atf-c++/atf-c++.m4 vendor/atf/atf-0.16/atf-c++/atf-c++.pc.in vendor/atf/atf-0.16/atf-c++/atf_c++_test.cpp vendor/atf/atf-0.16/atf-c++/build.cpp vendor/atf/atf-0.16/atf-c++/build.hpp vendor/atf/atf-0.16/atf-c++/build_test.cpp vendor/atf/atf-0.16/atf-c++/check.cpp vendor/atf/atf-0.16/atf-c++/check.hpp vendor/atf/atf-0.16/atf-c++/check_test.cpp vendor/atf/atf-0.16/atf-c++/config.cpp vendor/atf/atf-0.16/atf-c++/config.hpp vendor/atf/atf-0.16/atf-c++/config_test.cpp vendor/atf/atf-0.16/atf-c++/detail/ vendor/atf/atf-0.16/atf-c++/detail/Atffile vendor/atf/atf-0.16/atf-c++/detail/Kyuafile vendor/atf/atf-0.16/atf-c++/detail/Makefile.am.inc vendor/atf/atf-0.16/atf-c++/detail/application.cpp vendor/atf/atf-0.16/atf-c++/detail/application.hpp vendor/atf/atf-0.16/atf-c++/detail/application_test.cpp vendor/atf/atf-0.16/atf-c++/detail/env.cpp vendor/atf/atf-0.16/atf-c++/detail/env.hpp vendor/atf/atf-0.16/atf-c++/detail/env_test.cpp vendor/atf/atf-0.16/atf-c++/detail/exceptions.cpp vendor/atf/atf-0.16/atf-c++/detail/exceptions.hpp vendor/atf/atf-0.16/atf-c++/detail/exceptions_test.cpp vendor/atf/atf-0.16/atf-c++/detail/expand.cpp vendor/atf/atf-0.16/atf-c++/detail/expand.hpp vendor/atf/atf-0.16/atf-c++/detail/expand_test.cpp vendor/atf/atf-0.16/atf-c++/detail/fs.cpp vendor/atf/atf-0.16/atf-c++/detail/fs.hpp vendor/atf/atf-0.16/atf-c++/detail/fs_test.cpp vendor/atf/atf-0.16/atf-c++/detail/parser.cpp vendor/atf/atf-0.16/atf-c++/detail/parser.hpp vendor/atf/atf-0.16/atf-c++/detail/parser_test.cpp vendor/atf/atf-0.16/atf-c++/detail/process.cpp vendor/atf/atf-0.16/atf-c++/detail/process.hpp vendor/atf/atf-0.16/atf-c++/detail/process_test.cpp vendor/atf/atf-0.16/atf-c++/detail/sanity.hpp vendor/atf/atf-0.16/atf-c++/detail/sanity_test.cpp vendor/atf/atf-0.16/atf-c++/detail/test_helpers.cpp vendor/atf/atf-0.16/atf-c++/detail/test_helpers.hpp vendor/atf/atf-0.16/atf-c++/detail/text.cpp vendor/atf/atf-0.16/atf-c++/detail/text.hpp vendor/atf/atf-0.16/atf-c++/detail/text_test.cpp vendor/atf/atf-0.16/atf-c++/detail/ui.cpp vendor/atf/atf-0.16/atf-c++/detail/ui.hpp vendor/atf/atf-0.16/atf-c++/detail/ui_test.cpp vendor/atf/atf-0.16/atf-c++/macros.hpp vendor/atf/atf-0.16/atf-c++/macros_hpp_test.cpp vendor/atf/atf-0.16/atf-c++/macros_test.cpp vendor/atf/atf-0.16/atf-c++/pkg_config_test.sh vendor/atf/atf-0.16/atf-c++/tests.cpp vendor/atf/atf-0.16/atf-c++/tests.hpp vendor/atf/atf-0.16/atf-c++/tests_test.cpp vendor/atf/atf-0.16/atf-c++/unused_test.cpp vendor/atf/atf-0.16/atf-c++/utils.hpp vendor/atf/atf-0.16/atf-c++/utils_test.cpp vendor/atf/atf-0.16/atf-c.h vendor/atf/atf-0.16/atf-c/Atffile vendor/atf/atf-0.16/atf-c/Kyuafile vendor/atf/atf-0.16/atf-c/Makefile.am.inc vendor/atf/atf-0.16/atf-c/atf-c-api.3 vendor/atf/atf-0.16/atf-c/atf-c.m4 vendor/atf/atf-0.16/atf-c/atf-c.pc.in vendor/atf/atf-0.16/atf-c/atf-common.m4 vendor/atf/atf-0.16/atf-c/atf_c_test.c vendor/atf/atf-0.16/atf-c/build.c vendor/atf/atf-0.16/atf-c/build.h vendor/atf/atf-0.16/atf-c/build_test.c vendor/atf/atf-0.16/atf-c/check.c vendor/atf/atf-0.16/atf-c/check.h vendor/atf/atf-0.16/atf-c/check_test.c vendor/atf/atf-0.16/atf-c/config.c vendor/atf/atf-0.16/atf-c/config.h vendor/atf/atf-0.16/atf-c/config_test.c vendor/atf/atf-0.16/atf-c/defs.h.in vendor/atf/atf-0.16/atf-c/detail/ vendor/atf/atf-0.16/atf-c/detail/Atffile vendor/atf/atf-0.16/atf-c/detail/Kyuafile vendor/atf/atf-0.16/atf-c/detail/Makefile.am.inc vendor/atf/atf-0.16/atf-c/detail/dynstr.c vendor/atf/atf-0.16/atf-c/detail/dynstr.h vendor/atf/atf-0.16/atf-c/detail/dynstr_test.c vendor/atf/atf-0.16/atf-c/detail/env.c vendor/atf/atf-0.16/atf-c/detail/env.h vendor/atf/atf-0.16/atf-c/detail/env_test.c vendor/atf/atf-0.16/atf-c/detail/fs.c vendor/atf/atf-0.16/atf-c/detail/fs.h vendor/atf/atf-0.16/atf-c/detail/fs_test.c vendor/atf/atf-0.16/atf-c/detail/list.c vendor/atf/atf-0.16/atf-c/detail/list.h vendor/atf/atf-0.16/atf-c/detail/list_test.c vendor/atf/atf-0.16/atf-c/detail/map.c vendor/atf/atf-0.16/atf-c/detail/map.h vendor/atf/atf-0.16/atf-c/detail/map_test.c vendor/atf/atf-0.16/atf-c/detail/process.c vendor/atf/atf-0.16/atf-c/detail/process.h vendor/atf/atf-0.16/atf-c/detail/process_helpers.c vendor/atf/atf-0.16/atf-c/detail/process_test.c vendor/atf/atf-0.16/atf-c/detail/sanity.c vendor/atf/atf-0.16/atf-c/detail/sanity.h vendor/atf/atf-0.16/atf-c/detail/sanity_test.c vendor/atf/atf-0.16/atf-c/detail/test_helpers.c vendor/atf/atf-0.16/atf-c/detail/test_helpers.h vendor/atf/atf-0.16/atf-c/detail/test_helpers_test.c vendor/atf/atf-0.16/atf-c/detail/text.c vendor/atf/atf-0.16/atf-c/detail/text.h vendor/atf/atf-0.16/atf-c/detail/text_test.c vendor/atf/atf-0.16/atf-c/detail/tp_main.c vendor/atf/atf-0.16/atf-c/detail/user.c vendor/atf/atf-0.16/atf-c/detail/user.h vendor/atf/atf-0.16/atf-c/detail/user_test.c vendor/atf/atf-0.16/atf-c/error.c vendor/atf/atf-0.16/atf-c/error.h vendor/atf/atf-0.16/atf-c/error_fwd.h vendor/atf/atf-0.16/atf-c/error_test.c vendor/atf/atf-0.16/atf-c/h_build.h vendor/atf/atf-0.16/atf-c/macros.h vendor/atf/atf-0.16/atf-c/macros_h_test.c vendor/atf/atf-0.16/atf-c/macros_test.c vendor/atf/atf-0.16/atf-c/pkg_config_test.sh vendor/atf/atf-0.16/atf-c/tc.c vendor/atf/atf-0.16/atf-c/tc.h vendor/atf/atf-0.16/atf-c/tc_test.c vendor/atf/atf-0.16/atf-c/tp.c vendor/atf/atf-0.16/atf-c/tp.h vendor/atf/atf-0.16/atf-c/tp_test.c vendor/atf/atf-0.16/atf-c/unused_test.c vendor/atf/atf-0.16/atf-c/utils.c vendor/atf/atf-0.16/atf-c/utils.h vendor/atf/atf-0.16/atf-c/utils_test.c vendor/atf/atf-0.16/atf-config/ vendor/atf/atf-0.16/atf-config/Atffile vendor/atf/atf-0.16/atf-config/Kyuafile vendor/atf/atf-0.16/atf-config/Makefile.am.inc vendor/atf/atf-0.16/atf-config/atf-config.1 vendor/atf/atf-0.16/atf-config/atf-config.cpp vendor/atf/atf-0.16/atf-config/integration_test.sh vendor/atf/atf-0.16/atf-report/ vendor/atf/atf-0.16/atf-report/Atffile vendor/atf/atf-0.16/atf-report/Kyuafile vendor/atf/atf-0.16/atf-report/Makefile.am.inc vendor/atf/atf-0.16/atf-report/atf-report.1 vendor/atf/atf-0.16/atf-report/atf-report.cpp vendor/atf/atf-0.16/atf-report/fail_helper.cpp vendor/atf/atf-0.16/atf-report/integration_test.sh vendor/atf/atf-0.16/atf-report/misc_helpers.cpp vendor/atf/atf-0.16/atf-report/pass_helper.cpp vendor/atf/atf-0.16/atf-report/reader.cpp vendor/atf/atf-0.16/atf-report/reader.hpp vendor/atf/atf-0.16/atf-report/reader_test.cpp vendor/atf/atf-0.16/atf-report/tests-results.css vendor/atf/atf-0.16/atf-report/tests-results.dtd vendor/atf/atf-0.16/atf-report/tests-results.xsl vendor/atf/atf-0.16/atf-run/ vendor/atf/atf-0.16/atf-run/Atffile vendor/atf/atf-0.16/atf-run/Kyuafile vendor/atf/atf-0.16/atf-run/Makefile.am.inc vendor/atf/atf-0.16/atf-run/atf-run.1 vendor/atf/atf-0.16/atf-run/atf-run.cpp vendor/atf/atf-0.16/atf-run/atffile.cpp vendor/atf/atf-0.16/atf-run/atffile.hpp vendor/atf/atf-0.16/atf-run/atffile_test.cpp vendor/atf/atf-0.16/atf-run/bad_metadata_helper.c vendor/atf/atf-0.16/atf-run/config.cpp vendor/atf/atf-0.16/atf-run/config.hpp vendor/atf/atf-0.16/atf-run/config_test.cpp vendor/atf/atf-0.16/atf-run/expect_helpers.c vendor/atf/atf-0.16/atf-run/fs.cpp vendor/atf/atf-0.16/atf-run/fs.hpp vendor/atf/atf-0.16/atf-run/fs_test.cpp vendor/atf/atf-0.16/atf-run/integration_test.sh vendor/atf/atf-0.16/atf-run/io.cpp vendor/atf/atf-0.16/atf-run/io.hpp vendor/atf/atf-0.16/atf-run/io_test.cpp vendor/atf/atf-0.16/atf-run/misc_helpers.cpp vendor/atf/atf-0.16/atf-run/pass_helper.cpp vendor/atf/atf-0.16/atf-run/requirements.cpp vendor/atf/atf-0.16/atf-run/requirements.hpp vendor/atf/atf-0.16/atf-run/requirements_test.cpp vendor/atf/atf-0.16/atf-run/sample/ vendor/atf/atf-0.16/atf-run/sample/atf-run.hooks vendor/atf/atf-0.16/atf-run/sample/common.conf vendor/atf/atf-0.16/atf-run/several_tcs_helper.c vendor/atf/atf-0.16/atf-run/share/ vendor/atf/atf-0.16/atf-run/share/atf-run.hooks vendor/atf/atf-0.16/atf-run/signals.cpp vendor/atf/atf-0.16/atf-run/signals.hpp vendor/atf/atf-0.16/atf-run/signals_test.cpp vendor/atf/atf-0.16/atf-run/test-program.cpp vendor/atf/atf-0.16/atf-run/test-program.hpp vendor/atf/atf-0.16/atf-run/test_program_test.cpp vendor/atf/atf-0.16/atf-run/timer.cpp vendor/atf/atf-0.16/atf-run/timer.hpp vendor/atf/atf-0.16/atf-run/user.cpp vendor/atf/atf-0.16/atf-run/user.hpp vendor/atf/atf-0.16/atf-run/user_test.cpp vendor/atf/atf-0.16/atf-run/zero_tcs_helper.c vendor/atf/atf-0.16/atf-sh/ vendor/atf/atf-0.16/atf-sh/Atffile vendor/atf/atf-0.16/atf-sh/Kyuafile vendor/atf/atf-0.16/atf-sh/Makefile.am.inc vendor/atf/atf-0.16/atf-sh/atf-check.1 vendor/atf/atf-0.16/atf-sh/atf-check.cpp vendor/atf/atf-0.16/atf-sh/atf-check_test.sh vendor/atf/atf-0.16/atf-sh/atf-sh-api.3 vendor/atf/atf-0.16/atf-sh/atf-sh.1 vendor/atf/atf-0.16/atf-sh/atf-sh.cpp vendor/atf/atf-0.16/atf-sh/atf-sh.m4 vendor/atf/atf-0.16/atf-sh/atf-sh.pc.in vendor/atf/atf-0.16/atf-sh/atf_check_test.sh vendor/atf/atf-0.16/atf-sh/config_test.sh vendor/atf/atf-0.16/atf-sh/integration_test.sh vendor/atf/atf-0.16/atf-sh/libatf-sh.subr vendor/atf/atf-0.16/atf-sh/misc_helpers.sh vendor/atf/atf-0.16/atf-sh/normalize_test.sh vendor/atf/atf-0.16/atf-sh/tc_test.sh vendor/atf/atf-0.16/atf-sh/tp_test.sh vendor/atf/atf-0.16/atf-version/ vendor/atf/atf-0.16/atf-version/Makefile.am.inc vendor/atf/atf-0.16/atf-version/atf-version.1 vendor/atf/atf-0.16/atf-version/atf-version.cpp vendor/atf/atf-0.16/atf-version/generate-revision.sh (contents, props changed) vendor/atf/atf-0.16/bconfig.h.in vendor/atf/atf-0.16/bootstrap/ vendor/atf/atf-0.16/bootstrap/Makefile.am.inc vendor/atf/atf-0.16/bootstrap/h_app_empty.cpp vendor/atf/atf-0.16/bootstrap/h_app_opts_args.cpp vendor/atf/atf-0.16/bootstrap/h_tp_atf_check_sh.sh vendor/atf/atf-0.16/bootstrap/h_tp_basic_c.c vendor/atf/atf-0.16/bootstrap/h_tp_basic_cpp.cpp vendor/atf/atf-0.16/bootstrap/h_tp_basic_sh.sh vendor/atf/atf-0.16/bootstrap/h_tp_fail.sh vendor/atf/atf-0.16/bootstrap/h_tp_pass.sh vendor/atf/atf-0.16/bootstrap/package.m4 vendor/atf/atf-0.16/bootstrap/t_application_help.at vendor/atf/atf-0.16/bootstrap/t_application_opts_args.at vendor/atf/atf-0.16/bootstrap/t_atf_config.at vendor/atf/atf-0.16/bootstrap/t_atf_run.at vendor/atf/atf-0.16/bootstrap/t_subr_atf_check.at vendor/atf/atf-0.16/bootstrap/t_test_program_compare.at vendor/atf/atf-0.16/bootstrap/t_test_program_filter.at vendor/atf/atf-0.16/bootstrap/t_test_program_list.at vendor/atf/atf-0.16/bootstrap/t_test_program_run.at vendor/atf/atf-0.16/bootstrap/testsuite (contents, props changed) vendor/atf/atf-0.16/bootstrap/testsuite.at vendor/atf/atf-0.16/configure (contents, props changed) vendor/atf/atf-0.16/configure.ac vendor/atf/atf-0.16/doc/ vendor/atf/atf-0.16/doc/Makefile.am.inc vendor/atf/atf-0.16/doc/atf-formats.5 vendor/atf/atf-0.16/doc/atf-test-case.4 vendor/atf/atf-0.16/doc/atf-test-program.1 vendor/atf/atf-0.16/doc/atf.7.in vendor/atf/atf-0.16/m4/ vendor/atf/atf-0.16/m4/compiler-flags.m4 vendor/atf/atf-0.16/m4/cxx-std-funcs.m4 vendor/atf/atf-0.16/m4/developer-mode.m4 vendor/atf/atf-0.16/m4/libtool.m4 vendor/atf/atf-0.16/m4/ltoptions.m4 vendor/atf/atf-0.16/m4/ltsugar.m4 vendor/atf/atf-0.16/m4/ltversion.m4 vendor/atf/atf-0.16/m4/lt~obsolete.m4 vendor/atf/atf-0.16/m4/module-application.m4 vendor/atf/atf-0.16/m4/module-defs.m4 vendor/atf/atf-0.16/m4/module-env.m4 vendor/atf/atf-0.16/m4/module-fs.m4 vendor/atf/atf-0.16/m4/module-sanity.m4 vendor/atf/atf-0.16/m4/module-signals.m4 vendor/atf/atf-0.16/m4/runtime-tool.m4 vendor/atf/atf-0.16/test-programs/ vendor/atf/atf-0.16/test-programs/Atffile vendor/atf/atf-0.16/test-programs/Kyuafile vendor/atf/atf-0.16/test-programs/Makefile.am.inc vendor/atf/atf-0.16/test-programs/c_helpers.c vendor/atf/atf-0.16/test-programs/common.sh vendor/atf/atf-0.16/test-programs/config_test.sh vendor/atf/atf-0.16/test-programs/cpp_helpers.cpp vendor/atf/atf-0.16/test-programs/expect_test.sh vendor/atf/atf-0.16/test-programs/fork_test.sh vendor/atf/atf-0.16/test-programs/meta_data_test.sh vendor/atf/atf-0.16/test-programs/result_test.sh vendor/atf/atf-0.16/test-programs/sh_helpers.sh vendor/atf/atf-0.16/test-programs/srcdir_test.sh Added: vendor/atf/atf-0.16/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/AUTHORS Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,30 @@ +Authors and contributors Automated Testing Framework +=========================================================================== + + +* Julio Merino + + Main developer. He started the work on this project when he took part in + the Google Summer of Code 2007 program as a student. + +* Martin Husemann + + Mentored this project during its development as part of the Google Summer + of Code 2007 program. + +* Lukasz Strzygowski + + Participant of the Google Summer of Code 2008 program. Mentored by The + NetBSD Foundation, he worked on the atfify NetBSD-SoC project and, as a + side-effect, he contributed to the ATF source code. He developed the + initial version of the atf-check utility and started the addition of the + ATF_REQUIRE family of macros in the C interface. + +* Paul Goyette + + Implemented timestamping of test programs and test cases so that + atf-report can provide timings for their execution. + + +=========================================================================== +vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2 Added: vendor/atf/atf-0.16/Atffile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/Atffile Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,12 @@ +Content-Type: application/X-atf-atffile; version="1" + +prop: test-suite = atf + +tp: atf-c +tp: atf-c++ +tp: atf-sh +tp: test-programs + +tp-glob: atf-config* +tp-glob: atf-report* +tp-glob: atf-run* Added: vendor/atf/atf-0.16/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/COPYING Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,100 @@ +Redistribution terms Automated Testing Framework +=========================================================================== + + +License +******* + +Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, 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 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 2011, 2012 Google 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: + +* 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. + +* Neither the name of Google Inc. 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 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. + + +Relicensed code +*************** + +The following code snippets have been taken from other projects. Even +though they were not originally licensed under the terms above, the +original authors have agreed to relicense their work so that this project +can be distributed under a single license. This section is put here just to +clarify this fact. + +* configure.ac, Makefile.am: The original versions were derived from the + ones in the XML Catalog Manager project, version 2.2. + + Author: Julio Merino + +* atf-c/ui.c: The format_paragraph and format_text functions were + derived form the ones in the Monotone project, revision + 3a0982da308228d796df35f98d787c5cff2bb5b6. + + Author: Julio Merino + +* atf-c++/detail/io.hpp, atf-c++/detail/io.cpp, atf-c++/detail/io_test.cpp: + These files were derived from the file_handle, systembuf, pipe and pistream + classes and tests found in the Boost.Process library. + + Author: Julio Merino + +* admin/check-style.sh, admin/check-style-common.awk, + admin/check-style-cpp.awk, admin/check-style-shell.awk: These files, + except the first one, were first implemented in the Buildtool project. + They were later adapted to be part of Boost.Process and, during that + process, the shell script was created. + + Author: Julio Merino + + +=========================================================================== +vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2 Added: vendor/atf/atf-0.16/INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/INSTALL Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,232 @@ +Installation instructions Automated Testing Framework +=========================================================================== + + +Introduction +************ + +ATF uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as its +build system. These are used only when compiling the application from the +source code package. If you want to install ATF from a binary package, you +do not need to read this document. + +For the impatient: + + $ ./configure + $ make + Gain root privileges + # make install + Drop root privileges + $ make installcheck + +Or alternatively, install as a regular user into your home directory: + + $ ./configure --prefix ~/local + $ make + $ make install + $ make installcheck + + +Dependencies +************ + +To build and use ATF successfully you need: + +* A standards-compliant C/C++ complier. For example, GNU GCC 2.95 will not + work. + +* A POSIX shell interpreter. + +* A make(1) utility. + +If you are building ATF from the code on the repository, you will also need +the following tools. The versions listed here are the ones used to build +the files bundled in the last formal release, but these are not strictly +required. Newer ones will most likely work and, maybe, some slightly older +ones: + +* GNU autoconf 2.68 + +* GNU automake 1.11.3 + +* GNU libtool 2.4.2 + + +Regenerating the build system +***************************** + +If you are building ATF from code extracted from the repository, you must +first regenerate the files used by the build system. You will also need to +do this if you modify configure.ac, Makefile.am or any of the other build +system files. To do this, simply run: + + $ autoreconf -i -s + +For formal releases, no extra steps are needed. + + +General build procedure +*********************** + +To build and install the source package, you must follow these steps: + +1. Configure the sources to adapt to your operating system. This is done + using the 'configure' script located on the sources' top directory, + and it is usually invoked without arguments unless you want to change + the installation prefix. More details on this procedure are given on a + later section. + +2. Build the sources to generate the binaries and scripts. Simply run + 'make' on the sources' top directory after configuring them. No + problems should arise. + +3. Install the program by running 'make install'. You may need to become + root to issue this step. + +4. Issue any manual installation steps that may be required. These are + described later in their own section. + +5. Check that the installed programs work by running 'make installcheck'. + You do not need to be root to do this, even though some checks will not + be run otherwise. + + +Configuration flags +******************* + +The most common, standard flags given to 'configure' are: + +* --prefix=directory + Possible values: Any path + Default: /usr/local + + Specifies where the program (binaries and all associated files) will + be installed. + +* --sysconfdir=directory + Possible values: Any path + Default: /usr/local/etc + + Specifies where the installed programs will look for configuration files. + '/atf' will be appended to the given path unless ATF_CONFSUBDIR is + redefined as explained later on. + +* --help + Shows information about all available flags and exits immediately, + without running any configuration tasks. + +The following environment variables are specific to ATF's 'configure' +script: + +* ATF_BUILD_CC + Possible values: empty, a absolute or relative path to a C compiler. + Default: the value of CC as detected by the configure script. + + Specifies the C compiler that ATF will use at run time whenever the + build-time-specific checks are used. + +* ATF_BUILD_CFLAGS + Possible values: empty, a list of valid C compiler flags. + Default: the value of CFLAGS as detected by the configure script. + + Specifies the C compiler flags that ATF will use at run time whenever the + build-time-specific checks are used. + +* ATF_BUILD_CPP + Possible values: empty, a absolute or relative path to a C/C++ + preprocessor. + Default: the value of CPP as detected by the configure script. + + Specifies the C/C++ preprocessor that ATF will use at run time whenever + the build-time-specific checks are used. + +* ATF_BUILD_CPPFLAGS + Possible values: empty, a list of valid C/C++ preprocessor flags. + Default: the value of CPPFLAGS as detected by the configure script. + + Specifies the C/C++ preprocessor flags that ATF will use at run time + whenever the build-time-specific checks are used. + +* ATF_BUILD_CXX + Possible values: empty, a absolute or relative path to a C++ compiler. + Default: the value of CXX as detected by the configure script. + + Specifies the C++ compiler that ATF will use at run time whenever the + build-time-specific checks are used. + +* ATF_BUILD_CXXFLAGS + Possible values: empty, a list of valid C++ compiler flags. + Default: the value of CXXFLAGS as detected by the configure script. + + Specifies the C++ compiler flags that ATF will use at run time whenever + the build-time-specific checks are used. + +* ATF_CONFSUBDIR + Possible values: empty, a relative path. + Default: atf. + + Specifies the subdirectory of the configuration directory (given by the + --sysconfdir argument) under which ATF will search for its configuration + files. + +* ATF_SHELL + Possible values: empty, absolute path to a POSIX shell interpreter. + Default: empty. + + Specifies the POSIX shell interpreter that ATF will use at run time to + execute its scripts and the test programs written using the atf-sh + library. If empty, the configure script will try to find a suitable + interpreter for you. + +* ATF_WORKDIR + Possible values: empty, an absolute path. + Default: /tmp or /var/tmp, depending on availability. + + Specifies the directory that ATF will use to place its temporary files + and work directories for test cases. This is just a default and can be + overriden at run time. + +* GDB + Possible values: empty, absolute path to GNU GDB. + Default: empty. + + Specifies the path to the GNU GDB binary that atf-run will use to gather + a stack trace of a crashing test program. If empty, the configure script + will try to find a suitable binary for you. + +The following flags are specific to ATF's 'configure' script: + +* --enable-developer + Possible values: yes, no + Default: 'yes' in Git HEAD builds; 'no' in formal releases. + + Enables several features useful for development, such as the inclusion + of debugging symbols in all objects or the enforcement of compilation + warnings. + + The compiler will be executed with an exhaustive collection of warning + detection features regardless of the value of this flag. However, such + warnings are only fatal when --enable-developer is 'yes'. + +* --enable-tools + Possible values: yes, no + Default: no. + + Enables the build of the deprecated atf-config, atf-report, atf-run + and atf-version tools. atf-report and atf-run have been superseded by + Kyua, and atf-config and atf-version are unnecessary. + + +Post-installation steps +*********************** + +After installing ATF, you have to register the DTDs it provides into the +system-wide XML catalog. See the comments at the top of the files in +${datadir}/share/xml/atf to see the correct public identifiers. This +directory will typically be /usr/local/share/xml/atf or /usr/share/xml/atf. +Failure to do so will lead to further errors when processing the XML files +generated by atf-report. + + +=========================================================================== +vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2 Added: vendor/atf/atf-0.16/Kyuafile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/Kyuafile Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,18 @@ +syntax("kyuafile", 1) + +test_suite("atf") + +include("atf-c/Kyuafile") +include("atf-c++/Kyuafile") +include("atf-sh/Kyuafile") +include("test-programs/Kyuafile") + +if fs.exists("atf-config/Kyuafile") then + include("atf-config/Kyuafile") +end +if fs.exists("atf-report/Kyuafile") then + include("atf-report/Kyuafile") +end +if fs.exists("atf-run/Kyuafile") then + include("atf-run/Kyuafile") +end Added: vendor/atf/atf-0.16/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/Makefile.am Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,151 @@ +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +atf_aclocal_DATA = +BUILT_SOURCES = +CLEANFILES = +EXTRA_DIST = +bin_PROGRAMS = +dist_man_MANS = +include_HEADERS = +lib_LTLIBRARIES = +libexec_PROGRAMS = +man_MANS = +noinst_DATA = +noinst_LTLIBRARIES = +INSTALLCHECK_TARGETS = +PHONY_TARGETS = + +ACLOCAL_AMFLAGS = -I m4 +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools + +include admin/Makefile.am.inc +include atf-c/Makefile.am.inc +include atf-c++/Makefile.am.inc +include atf-sh/Makefile.am.inc +include bootstrap/Makefile.am.inc +include doc/Makefile.am.inc +include test-programs/Makefile.am.inc + +if ENABLE_TOOLS +include atf-report/Makefile.am.inc +include atf-config/Makefile.am.inc +include atf-run/Makefile.am.inc +include atf-version/Makefile.am.inc +endif + +# +# Top-level distfile documents. +# + +doc_DATA = AUTHORS COPYING NEWS README +noinst_DATA += INSTALL README +EXTRA_DIST += $(doc_DATA) INSTALL README + +# +# Supporting logic to run our custom testsuite. +# + +TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ + PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig + +testsdir = $(exec_prefix)/tests +pkgtestsdir = $(testsdir)/$(PACKAGE) + +if ENABLE_TOOLS +INSTALLCHECK_TARGETS += installcheck-atf +PHONY_TARGETS += installcheck-atf +installcheck-atf: + logfile=$$(pwd)/installcheck.log; \ + fifofile=$$(pwd)/installcheck.fifo; \ + cd $(pkgtestsdir); \ + rm -f $${fifofile}; \ + mkfifo $${fifofile}; \ + cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \ + $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \ + res=$${?}; \ + wait; \ + rm $${fifofile}; \ + echo; \ + echo "The verbatim output of atf-run has been saved to" \ + "installcheck.log; exit was $${res}"; \ + test $${res} -eq 0 +CLEANFILES += installcheck.fifo installcheck.log +endif + +PHONY_TARGETS += installcheck-kyua +if HAVE_KYUA +installcheck-kyua: + cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test +endif + +installcheck-targets: $(INSTALLCHECK_TARGETS) + +pkgtests_DATA = Kyuafile +if ENABLE_TOOLS +pkgtests_DATA += Atffile +endif +EXTRA_DIST += $(pkgtests_DATA) + +BUILD_SH_TP = \ + echo "Creating $${dst}"; \ + echo "\#! $(bindir)/atf-sh" >$${dst}; \ + cat $${src} >>$${dst}; \ + chmod +x $${dst} + +# +# Custom targets. +# + +dist-hook: forbid-dist +if ENABLE_TOOLS +forbid-dist: + @true +else +forbid-dist: + @echo "Sorry; cannot make dist without the tools enabled." + @echo "Please reconfigure with --enable-tools." + @false +endif + +PHONY_TARGETS += clean-all +clean-all: + GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh + +PHONY_TARGETS += release +release: + $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES) + +PHONY_TARGETS += release-test +release-test: + $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES) + +.PHONY: $(PHONY_TARGETS) + +# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 Added: vendor/atf/atf-0.16/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/atf-0.16/Makefile.in Tue Sep 4 23:07:32 2012 (r240116) @@ -0,0 +1,5264 @@ +# Makefile.in generated by automake 1.11.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, 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 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. +# + + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:08:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17B431065676; Tue, 4 Sep 2012 23:08:53 +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 DEDD58FC1A; Tue, 4 Sep 2012 23:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84N8qra034032; Tue, 4 Sep 2012 23:08:52 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84N8qPb034030; Tue, 4 Sep 2012 23:08:52 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209042308.q84N8qPb034030@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 4 Sep 2012 23:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240117 - vendor/atf/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:08:53 -0000 Author: marcel Date: Tue Sep 4 23:08:52 2012 New Revision: 240117 URL: http://svn.freebsd.org/changeset/base/240117 Log: Bootstrap dist directory from the initial import of ATF 0.16. Added: vendor/atf/dist/ - copied from r240116, vendor/atf/atf-0.16/ From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:13:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90F32106564A; Tue, 4 Sep 2012 23:13:25 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C2DA8FC08; Tue, 4 Sep 2012 23:13:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84NDP4N034613; Tue, 4 Sep 2012 23:13:25 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84NDPi2034610; Tue, 4 Sep 2012 23:13:25 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209042313.q84NDPi2034610@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 4 Sep 2012 23:13: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: r240118 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:13:25 -0000 Author: gavin Date: Tue Sep 4 23:13:24 2012 New Revision: 240118 URL: http://svn.freebsd.org/changeset/base/240118 Log: Support another uchcom(4) device. MFC after: 1 week Modified: head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Tue Sep 4 23:08:52 2012 (r240117) +++ head/sys/dev/usb/serial/uchcom.c Tue Sep 4 23:13:24 2012 (r240118) @@ -207,6 +207,7 @@ static const struct uchcom_divider_recor static const STRUCT_USB_HOST_ID uchcom_devs[] = { {USB_VPI(USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341SER, 0)}, {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER, 0)}, + {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER_2, 0)}, }; /* protypes */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Sep 4 23:08:52 2012 (r240117) +++ head/sys/dev/usb/usbdevs Tue Sep 4 23:13:24 2012 (r240118) @@ -4163,6 +4163,7 @@ product WAVESENSE JAZZ 0xaaaa Jazz bloo /* WCH products */ product WCH CH341SER 0x5523 CH341/CH340 USB-Serial Bridge product WCH2 DUMMY 0x0000 Dummy product +product WCH2 CH341SER_2 0x5523 CH341/CH340 USB-Serial Bridge product WCH2 CH341SER 0x7523 CH341/CH340 USB-Serial Bridge product WCH2 U2M 0X752d CH345 USB2.0-MIDI From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:16:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0896106566C; Tue, 4 Sep 2012 23:16:55 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC0988FC0A; Tue, 4 Sep 2012 23:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84NGt8T035025; Tue, 4 Sep 2012 23:16:55 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84NGtuA035023; Tue, 4 Sep 2012 23:16:55 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201209042316.q84NGtuA035023@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 4 Sep 2012 23:16: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: r240119 - 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, 04 Sep 2012 23:16:56 -0000 Author: ray Date: Tue Sep 4 23:16:55 2012 New Revision: 240119 URL: http://svn.freebsd.org/changeset/base/240119 Log: Style fixes. Suggested by: mdf Approved by: adrian (menthor) Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Tue Sep 4 23:13:24 2012 (r240118) +++ head/sys/kern/subr_hints.c Tue Sep 4 23:16:55 2012 (r240119) @@ -31,8 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include /* @@ -52,9 +52,9 @@ static char *hintp; static int sysctl_hintmode(SYSCTL_HANDLER_ARGS) { - int error, i, from_kenv, value, eqidx; const char *cp; char *line, *eq; + int eqidx, error, from_kenv, i, value; from_kenv = 0; cp = kern_envp; @@ -62,7 +62,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) /* Fetch candidate for new hintmode value */ error = sysctl_handle_int(oidp, &value, 0, req); - if (error || !req->newptr) + if (error || req->newptr == NULL) return (error); if (value != 2) @@ -73,8 +73,11 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) switch (hintmode) { case 0: if (dynamic_kenv) { - /* Already here */ - hintmode = value; /* XXX: Need we switch or not ? */ + /* + * Already here. But assign hintmode to 2, to not + * check it in the future. + */ + hintmode = 2; return (0); } from_kenv = 1; @@ -98,7 +101,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) continue; } eq = strchr(cp, '='); - if (!eq) + if (eq == NULL) /* Bad hint value */ continue; eqidx = eq - cp; From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:16:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B29D106564A; Tue, 4 Sep 2012 23:16:59 +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 D19B18FC16; Tue, 4 Sep 2012 23:16:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84NGwD4035061; Tue, 4 Sep 2012 23:16:58 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84NGwiP035060; Tue, 4 Sep 2012 23:16:58 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209042316.q84NGwiP035060@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 4 Sep 2012 23:16: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: r240120 - head/contrib/atf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:16:59 -0000 Author: marcel Date: Tue Sep 4 23:16:58 2012 New Revision: 240120 URL: http://svn.freebsd.org/changeset/base/240120 Log: Merge ATF 0.16 from vendor/atf/dist. Provenance: http://code.google.com/p/kyua Discussed with: gibbs, gnn, keramida, mdf, mlaier, Discussed with: Garrett Cooper Added: head/contrib/atf/ - copied from r240117, vendor/atf/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:24:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 646321065675; Tue, 4 Sep 2012 23:24: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 4CFCB8FC0A; Tue, 4 Sep 2012 23:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84NO1tN036003; Tue, 4 Sep 2012 23:24:01 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84NO1Jg035988; Tue, 4 Sep 2012 23:24:01 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209042324.q84NO1Jg035988@svn.freebsd.org> From: Xin LI Date: Tue, 4 Sep 2012 23:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240121 - in stable/9: contrib/less usr.bin/less X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:24:01 -0000 Author: delphij Date: Tue Sep 4 23:24:00 2012 New Revision: 240121 URL: http://svn.freebsd.org/changeset/base/240121 Log: MFC: less v451. Modified: stable/9/contrib/less/LICENSE stable/9/contrib/less/Makefile.aut stable/9/contrib/less/NEWS stable/9/contrib/less/README stable/9/contrib/less/brac.c stable/9/contrib/less/ch.c stable/9/contrib/less/charset.c stable/9/contrib/less/charset.h stable/9/contrib/less/cmd.h stable/9/contrib/less/cmdbuf.c stable/9/contrib/less/command.c stable/9/contrib/less/configure stable/9/contrib/less/configure.ac stable/9/contrib/less/cvt.c stable/9/contrib/less/decode.c stable/9/contrib/less/defines.ds stable/9/contrib/less/defines.h.in stable/9/contrib/less/defines.o2 stable/9/contrib/less/defines.o9 stable/9/contrib/less/defines.wn stable/9/contrib/less/edit.c stable/9/contrib/less/filename.c stable/9/contrib/less/forwback.c stable/9/contrib/less/funcs.h stable/9/contrib/less/help.c stable/9/contrib/less/ifile.c stable/9/contrib/less/input.c stable/9/contrib/less/jump.c stable/9/contrib/less/less.h stable/9/contrib/less/less.hlp stable/9/contrib/less/less.man stable/9/contrib/less/less.nro stable/9/contrib/less/lessecho.c stable/9/contrib/less/lessecho.man stable/9/contrib/less/lessecho.nro stable/9/contrib/less/lesskey.c stable/9/contrib/less/lesskey.h stable/9/contrib/less/lesskey.man stable/9/contrib/less/lesskey.nro stable/9/contrib/less/lglob.h stable/9/contrib/less/line.c stable/9/contrib/less/linenum.c stable/9/contrib/less/lsystem.c stable/9/contrib/less/main.c stable/9/contrib/less/mark.c stable/9/contrib/less/mkhelp.c stable/9/contrib/less/optfunc.c stable/9/contrib/less/option.c stable/9/contrib/less/option.h stable/9/contrib/less/opttbl.c stable/9/contrib/less/os.c stable/9/contrib/less/output.c stable/9/contrib/less/pattern.c stable/9/contrib/less/pattern.h stable/9/contrib/less/pckeys.h stable/9/contrib/less/position.c stable/9/contrib/less/position.h stable/9/contrib/less/prompt.c stable/9/contrib/less/screen.c stable/9/contrib/less/scrsize.c stable/9/contrib/less/search.c stable/9/contrib/less/signal.c stable/9/contrib/less/tags.c stable/9/contrib/less/ttyin.c stable/9/contrib/less/version.c stable/9/usr.bin/less/defines.h Directory Properties: stable/9/contrib/less/ (props changed) stable/9/usr.bin/less/ (props changed) Modified: stable/9/contrib/less/LICENSE ============================================================================== --- stable/9/contrib/less/LICENSE Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/LICENSE Tue Sep 4 23:24:00 2012 (r240121) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2011 Mark Nudelman +Copyright (C) 1984-2012 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/9/contrib/less/Makefile.aut ============================================================================== --- stable/9/contrib/less/Makefile.aut Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/Makefile.aut Tue Sep 4 23:24:00 2012 (r240121) @@ -1,6 +1,6 @@ # Makefile for authoring less. -EMAIL = markn@greenwoodsoftware.com +EMAIL = bug-less@gnu.org HOMEPAGE = http://www.greenwoodsoftware.com/less SHELL = /bin/sh RCS = rcs @@ -112,8 +112,7 @@ dist: ${DISTFILES} echo "Preparing $$REL"; \ rm -rf $$REL; mkdir $$REL; \ for file in ${DISTFILES}; do \ - cp -p $$file $$REL; \ - chmod -w $$REL/$$file; \ + ./add_copyright $$file $$REL; \ done; \ cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \ echo "Creating release/$$REL/$$REL.tar.gz"; \ Modified: stable/9/contrib/less/NEWS ============================================================================== --- stable/9/contrib/less/NEWS Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/NEWS Tue Sep 4 23:24:00 2012 (r240121) @@ -7,8 +7,34 @@ http://www.greenwoodsoftware.com/less You can also download the latest version of less from there. - To report bugs, suggestions or comments, send email to - bug-less@gnu.org or markn@greenwoodsoftware.com. + To report bugs, suggestions or comments, send email to bug-less@gnu.org. + +====================================================================== + + Major changes between "less" versions 444 and 451 + +* Add ESC-F command to keep reading data until a pattern is found. + +* Use exit code of LESSOPEN script if LESSOPEN starts with "||". + +* When up/down arrow is used on the command line immediately after + typing text, the next command starting with that text is found. + +* Add support for GNU regex. + +* Add configure option --with-regex=none and fix compile errors + when compiling with no regex library. + +* Fix bugs handling SGR sequences in Win32. + +* Fix possible crashes caused by malformed LESSOPEN or + LESSCLOSE variables. + +* Fix bug highlighting text which is discontiguous in the file + due to backspace processing. + +* Fix bug in displaying status column when scrolling backwards + with -J and -S in effect. ====================================================================== Modified: stable/9/contrib/less/README ============================================================================== --- stable/9/contrib/less/README Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/README Tue Sep 4 23:24:00 2012 (r240121) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 444 + Less, version 451 - This is the distribution of less, version 444, released 09 Jun 2011. + This is the distribution of less, version 451, released 21 Jul 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or @@ -21,7 +21,7 @@ or 2. The Less License, in the file LICENSE. - Please report any problems to bug-less@gnu.org or markn@greenwoodsoftware.com. + Please report any problems to bug-less@gnu.org. See http://www.greenwoodsoftware.com/less for the latest info. ========================================================================= @@ -60,10 +60,11 @@ INSTALLATION (Unix systems only): regcomp Use the V8-compatible regcomp. regcomp-local Use Henry Spencer's V8-compatible regcomp (source is supplied with less). + none No regular expressions, only simple string matching. --with-secure Builds a "secure" version of less, with some features disabled - to prevent users from viewing other files, accessing shell - commands, etc. + to prevent users from viewing other files, accessing shell + commands, etc. 3. It is a good idea to look over the generated Makefile and defines.h @@ -96,7 +97,7 @@ INSTALLATION (Unix systems only): bindir and/or mandir to the appropriate directories. If you have any problems building or running "less", suggestions, -complaints, etc., you may mail to the author at markn@greenwoodsoftware.com. +complaints, etc., you may mail to bug-less@gnu.org. Note to hackers: comments noting possible improvements are enclosed in double curly brackets {{ like this }}. Modified: stable/9/contrib/less/brac.c ============================================================================== --- stable/9/contrib/less/brac.c Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/brac.c Tue Sep 4 23:24:00 2012 (r240121) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ Modified: stable/9/contrib/less/ch.c ============================================================================== --- stable/9/contrib/less/ch.c Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/ch.c Tue Sep 4 23:24:00 2012 (r240121) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -582,6 +581,8 @@ ch_length() return (NULL_POSITION); if (ch_flags & CH_HELPFILE) return (size_helpdata); + if (ch_flags & CH_NODATA) + return (0); return (ch_fsize); } @@ -806,6 +807,17 @@ seekable(f) } /* + * Force EOF to be at the current read position. + * This is used after an ignore_eof read, during which the EOF may change. + */ + public void +ch_set_eof() +{ + ch_fsize = ch_fpos; +} + + +/* * Initialize file state for a new file. */ public void Modified: stable/9/contrib/less/charset.c ============================================================================== --- stable/9/contrib/less/charset.c Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/charset.c Tue Sep 4 23:24:00 2012 (r240121) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ Modified: stable/9/contrib/less/charset.h ============================================================================== --- stable/9/contrib/less/charset.h Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/charset.h Tue Sep 4 23:24:00 2012 (r240121) @@ -1,11 +1,10 @@ /* - * Copyright (C) 2005-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) Modified: stable/9/contrib/less/cmd.h ============================================================================== --- stable/9/contrib/less/cmd.h Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/cmd.h Tue Sep 4 23:24:00 2012 (r240121) @@ -1,15 +1,14 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ -#define MAX_USERCMD 500 +#define MAX_USERCMD 1000 #define MAX_CMDLEN 16 #define A_B_LINE 2 @@ -66,6 +65,7 @@ #define A_NEXT_TAG 53 #define A_PREV_TAG 54 #define A_FILTER 55 +#define A_F_UNTIL_HILITE 56 #define A_INVALID 100 #define A_NOACTION 101 @@ -78,7 +78,7 @@ #define A_EXTRA 0200 -/* Line editting characters */ +/* Line editing characters */ #define EC_BACKSPACE 1 #define EC_LINEKILL 2 Modified: stable/9/contrib/less/cmdbuf.c ============================================================================== --- stable/9/contrib/less/cmdbuf.c Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/cmdbuf.c Tue Sep 4 23:24:00 2012 (r240121) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -30,6 +29,7 @@ static int prompt_col; /* Column of cur static char *cp; /* Pointer into cmdbuf */ static int cmd_offset; /* Index into cmdbuf of first displayed char */ static int literal; /* Next input char should not be interpreted */ +static int updown_match = -1; /* Prefix length in up/down movement */ #if TAB_COMPLETE_FILENAME static int cmd_complete(); @@ -122,6 +122,7 @@ cmd_reset() cmd_offset = 0; literal = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -132,6 +133,7 @@ clear_cmd() { cmd_col = prompt_col = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -504,6 +506,7 @@ cmd_ichar(cs, clen) /* * Reprint the tail of the line from the inserted char. */ + updown_match = -1; cmd_repaint(cp); cmd_right(); return (CC_OK); @@ -547,6 +550,7 @@ cmd_erase() /* * Repaint the buffer after the erased char. */ + updown_match = -1; cmd_repaint(cp); /* @@ -643,6 +647,7 @@ cmd_kill() cmd_offset = 0; cmd_home(); *cp = '\0'; + updown_match = -1; cmd_repaint(cp); /* @@ -675,12 +680,15 @@ set_mlist(mlist, cmdflags) #if CMD_HISTORY /* * Move up or down in the currently selected command history list. + * Only consider entries whose first updown_match chars are equal to + * cmdbuf's corresponding chars. */ static int cmd_updown(action) int action; { char *s; + struct mlist *ml; if (curr_mlist == NULL) { @@ -690,24 +698,47 @@ cmd_updown(action) bell(); return (CC_OK); } - cmd_home(); - clear_eol(); + + if (updown_match < 0) + { + updown_match = cp - cmdbuf; + } + /* - * Move curr_mp to the next/prev entry. + * Find the next history entry which matches. */ - if (action == EC_UP) - curr_mlist->curr_mp = curr_mlist->curr_mp->prev; - else - curr_mlist->curr_mp = curr_mlist->curr_mp->next; - /* - * Copy the entry into cmdbuf and echo it on the screen. - */ - s = curr_mlist->curr_mp->string; - if (s == NULL) - s = ""; - strcpy(cmdbuf, s); - for (cp = cmdbuf; *cp != '\0'; ) - cmd_right(); + for (ml = curr_mlist->curr_mp;;) + { + ml = (action == EC_UP) ? ml->prev : ml->next; + if (ml == curr_mlist) + { + /* + * We reached the end (or beginning) of the list. + */ + break; + } + if (strncmp(cmdbuf, ml->string, updown_match) == 0) + { + /* + * This entry matches; stop here. + * Copy the entry into cmdbuf and echo it on the screen. + */ + curr_mlist->curr_mp = ml; + s = ml->string; + if (s == NULL) + s = ""; + strcpy(cmdbuf, s); + cmd_home(); + clear_eol(); + for (cp = cmdbuf; *cp != '\0'; ) + cmd_right(); + return (CC_OK); + } + } + /* + * We didn't find a history entry that matches. + */ + bell(); return (CC_OK); } #endif @@ -1056,7 +1087,11 @@ init_compl() tk_text = fcomplete(word); } else { +#if MSDOS_COMPILER + char *qword = NULL; +#else char *qword = shell_quote(word+1); +#endif if (qword == NULL) tk_text = fcomplete(word+1); else @@ -1457,9 +1492,6 @@ save_cmdhist() FILE *f; int modified = 0; - filename = histfile_name(); - if (filename == NULL) - return; if (mlist_search.modified) modified = 1; #if SHELL_ESCAPE || PIPEC @@ -1468,6 +1500,9 @@ save_cmdhist() #endif if (!modified) return; + filename = histfile_name(); + if (filename == NULL) + return; f = fopen(filename, "w"); free(filename); if (f == NULL) Modified: stable/9/contrib/less/command.c ============================================================================== --- stable/9/contrib/less/command.c Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/command.c Tue Sep 4 23:24:00 2012 (r240121) @@ -1,12 +1,11 @@ /* $FreeBSD$ */ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -38,6 +37,7 @@ extern int secure; extern int hshift; extern int show_attn; extern int less_is_more; +extern POSITION highest_hilite; extern char *every_first_cmd; extern char *curr_altfilename; extern char version[]; @@ -104,8 +104,8 @@ cmd_exec() static void start_mca(action, prompt, mlist, cmdflags) int action; - char *prompt; - void constant *mlist; + constant char *prompt; + constant void *mlist; int cmdflags; { mca = action; @@ -686,7 +686,7 @@ make_display() static void prompt() { - register char constant *p; + register constant char *p; if (ungot != NULL) { @@ -962,6 +962,46 @@ multi_search(pattern, n) } /* + * Forward forever, or until a highlighted line appears. + */ + static int +forw_loop(until_hilite) + int until_hilite; +{ + POSITION curr_len; + + if (ch_getflags() & CH_HELPFILE) + return (A_NOACTION); + + cmd_exec(); + jump_forw(); + curr_len = ch_length(); + highest_hilite = until_hilite ? curr_len : NULL_POSITION; + ignore_eoi = 1; + while (!sigs) + { + if (until_hilite && highest_hilite > curr_len) + { + bell(); + break; + } + make_display(); + forward(1, 0, 0); + } + ignore_eoi = 0; + ch_set_eof(); + + /* + * This gets us back in "F mode" after processing + * a non-abort signal (e.g. window-change). + */ + if (sigs && !ABORT_SIGS()) + return (until_hilite ? A_F_UNTIL_HILITE : A_F_FOREVER); + + return (A_NOACTION); +} + +/* * Main command processor. * Accept and execute commands until a quit command. */ @@ -979,6 +1019,7 @@ commands() IFILE old_ifile; IFILE new_ifile; char *tagfile; + int until_hilite = 0; search_type = SRCH_FORW; wscroll = (sc_height + 1) / 2; @@ -1206,23 +1247,11 @@ commands() /* * Forward forever, ignoring EOF. */ - if (ch_getflags() & CH_HELPFILE) - break; - cmd_exec(); - jump_forw(); - ignore_eoi = 1; - while (!sigs) - { - make_display(); - forward(1, 0, 0); - } - ignore_eoi = 0; - /* - * This gets us back in "F mode" after processing - * a non-abort signal (e.g. window-change). - */ - if (sigs && !ABORT_SIGS()) - newaction = A_F_FOREVER; + newaction = forw_loop(0); + break; + + case A_F_UNTIL_HILITE: + newaction = forw_loop(1); break; case A_F_SCROLL: Modified: stable/9/contrib/less/configure ============================================================================== --- stable/9/contrib/less/configure Tue Sep 4 23:16:58 2012 (r240120) +++ stable/9/contrib/less/configure Tue Sep 4 23:24:00 2012 (r240121) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for less 1. +# Generated by GNU Autoconf 2.68 for less 1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -1067,7 +1075,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1281,7 +1289,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-secure Compile in secure mode --with-no-float Do not use floating point - --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library auto + --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none} Select a regular expression library auto --with-editor=PROGRAM use PROGRAM as the default editor vi Some influential environment variables: @@ -1361,7 +1369,7 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF less configure 1 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1407,7 +1415,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1453,7 +1461,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1490,7 +1498,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1532,7 +1540,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1545,10 +1553,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1611,7 +1619,7 @@ $as_echo "$as_me: WARNING: $2: proceedin esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1620,7 +1628,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1633,7 +1641,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1651,7 +1659,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1664,7 +1672,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1705,7 +1713,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1717,7 +1725,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1772,7 +1780,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF @@ -1780,7 +1788,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by less $as_me 1, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2142,7 +2150,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2182,7 +2190,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2235,7 +2243,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2275,7 +2283,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2334,7 +2342,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2378,7 +2386,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2661,7 +2669,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_ex ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2712,7 +2720,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2749,7 +2757,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2827,7 +2835,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2925,7 +2933,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -2959,11 +2967,11 @@ for ac_lib in '' cposix; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then : + if ${ac_cv_search_strerror+:} false; then : break fi done -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no @@ -2991,7 +2999,7 @@ if test -n "$CPP" && test -d "$CPP"; the CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3119,7 +3127,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3182,7 +3190,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3250,7 +3258,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -3335,7 +3343,7 @@ ac_configure="$SHELL $ac_aux_dir/configu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3422,7 +3430,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -3473,7 +3481,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3542,7 +3550,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3615,7 +3623,7 @@ fi # Checks for general libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -ltinfo" >&5 $as_echo_n "checking for tgoto in -ltinfo... " >&6; } -if test "${ac_cv_lib_tinfo_tgoto+set}" = set; then : +if ${ac_cv_lib_tinfo_tgoto+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3649,7 +3657,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgoto" >&5 $as_echo "$ac_cv_lib_tinfo_tgoto" >&6; } -if test "x$ac_cv_lib_tinfo_tgoto" = x""yes; then : +if test "x$ac_cv_lib_tinfo_tgoto" = xyes; then : have_tinfo=yes else have_tinfo=no @@ -3657,7 +3665,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lxcurses" >&5 $as_echo_n "checking for initscr in -lxcurses... " >&6; } -if test "${ac_cv_lib_xcurses_initscr+set}" = set; then : +if ${ac_cv_lib_xcurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3691,7 +3699,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcurses_initscr" >&5 $as_echo "$ac_cv_lib_xcurses_initscr" >&6; } -if test "x$ac_cv_lib_xcurses_initscr" = x""yes; then : +if test "x$ac_cv_lib_xcurses_initscr" = xyes; then : have_xcurses=yes else have_xcurses=no @@ -3699,7 +3707,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 $as_echo_n "checking for initscr in -lncursesw... " >&6; } -if test "${ac_cv_lib_ncursesw_initscr+set}" = set; then : +if ${ac_cv_lib_ncursesw_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3733,7 +3741,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 $as_echo "$ac_cv_lib_ncursesw_initscr" >&6; } -if test "x$ac_cv_lib_ncursesw_initscr" = x""yes; then : +if test "x$ac_cv_lib_ncursesw_initscr" = xyes; then : have_ncursesw=yes else have_ncursesw=no @@ -3741,7 +3749,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 $as_echo_n "checking for initscr in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_initscr+set}" = set; then : +if ${ac_cv_lib_ncurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3775,7 +3783,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } -if test "x$ac_cv_lib_ncurses_initscr" = x""yes; then : +if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : have_ncurses=yes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:27:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBF33106566B; Tue, 4 Sep 2012 23:27:07 +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 AC48B8FC08; Tue, 4 Sep 2012 23:27:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q84NR7fR036451; Tue, 4 Sep 2012 23:27:07 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q84NR7Tj036449; Tue, 4 Sep 2012 23:27:07 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209042327.q84NR7Tj036449@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 4 Sep 2012 23:27: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: r240122 - in head/contrib/atf: . atf-c X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 04 Sep 2012 23:27:07 -0000 Author: marcel Date: Tue Sep 4 23:27:07 2012 New Revision: 240122 URL: http://svn.freebsd.org/changeset/base/240122 Log: Add headers created by running configure. Added: head/contrib/atf/atf-c/defs.h head/contrib/atf/bconfig.h Added: head/contrib/atf/atf-c/defs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/atf-c/defs.h Tue Sep 4 23:27:07 2012 (r240122) @@ -0,0 +1,37 @@ +/* + * Automated Testing Framework (atf) + * + * Copyright (c) 2008 The NetBSD Foundation, 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 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. + */ + +#if !defined(ATF_C_DEFS_H) +#define ATF_C_DEFS_H + +#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) __attribute__((__format__(__printf__, a, b))) +#define ATF_DEFS_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#define ATF_DEFS_ATTRIBUTE_UNUSED __attribute__((__unused__)) + +#endif /* !defined(ATF_C_DEFS_H) */ Added: head/contrib/atf/bconfig.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/bconfig.h Tue Sep 4 23:27:07 2012 (r240122) @@ -0,0 +1,114 @@ +/* bconfig.h. Generated from bconfig.h.in by configure. */ +/* bconfig.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if basename takes a constant pointer */ +#define HAVE_CONST_BASENAME 1 + +/* Define to 1 if dirname takes a constant pointer */ +#define HAVE_CONST_DIRNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if getcwd(NULL, 0) works */ +#define HAVE_GETCWD_DYN 1 + +/* Define to 1 if getopt allows a + sign for POSIX behavior */ +/* #undef HAVE_GNU_GETOPT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if getopt has optreset */ +/* #undef HAVE_OPTRESET */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if putenv is in std */ +/* #undef HAVE_PUTENV_IN_STD */ + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if setenv is in std */ +/* #undef HAVE_SETENV_IN_STD */ + +/* Define to 1 if snprintf is in std */ +/* #undef HAVE_SNPRINTF_IN_STD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unmount' function. */ +#define HAVE_UNMOUNT 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if unsetenv is in std */ +/* #undef HAVE_UNSETENV_IN_STD */ + +/* Define to 1 if vsnprintf is in std */ +/* #undef HAVE_VSNPRINTF_IN_STD */ + +/* Define to the last valid signal number */ +#define LAST_SIGNO 128 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Name of package */ +#define PACKAGE "atf" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "atf-devel@NetBSD.org" + +/* Define to the copyright string applicable to this package. */ +#define PACKAGE_COPYRIGHT "Copyright (c) 2007-2012 The NetBSD Foundation, Inc." + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "Automated Testing Framework" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "Automated Testing Framework 0.16" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "atf" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://code.google.com/p/kyua/wiki/ATF" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.16" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "0.16" From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:31:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D26631065676; Tue, 4 Sep 2012 23:31:07 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 604388FC17; Tue, 4 Sep 2012 23:31:07 +0000 (UTC) Received: by iebc12 with SMTP id c12so7918049ieb.13 for ; Tue, 04 Sep 2012 16:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=RDwAxZPjZjObtg/sCpjhm4Ge3F5BCxcYn48/rG4qmrs=; b=VPqf7tRIELzfS0DWFixiwKkcvfCvrlY18DIpl3zZZg36lGr+C9aXDOq8jFk3kUBejO /0/KjrlqWmoaRq0T0Ae5F8EZH9XI/Sll6YUmkl6EQc1WYx0Fya24q6oMLhjMF/sOSrBc vl65burK3iPfkDGKfu+5b4aJqQCBbqTdbLAUCU5/EZT0NVj49QDCjUjgd7KGSOQZ4QgM p1LwqUQ5fJiSwSJlkvsuBhacbGrSiLTW2ttHm+Zy57FqKMhdxji3sRbakldCgO0OK7NZ Su9wT8JAKhsZogxj7rsSHYLR7jiPwUyrrzGP3Al0yJ5BNsboPr0H+E2OVmwN7xuhOSWL IKZg== MIME-Version: 1.0 Received: by 10.182.218.37 with SMTP id pd5mr16555938obc.24.1346801466967; Tue, 04 Sep 2012 16:31:06 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 4 Sep 2012 16:31:06 -0700 (PDT) In-Reply-To: <86fw6xe9br.fsf@ds4.des.no> References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> <86fw6xe9br.fsf@ds4.des.no> Date: Tue, 4 Sep 2012 16:31:06 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 23:31:08 -0000 On Tue, Sep 4, 2012 at 3:01 PM, Dag-Erling Sm=F8rgrav wrote: > Garrett Cooper writes: >> Dag-Erling Sm=F8rgrav writes: >> > It doesn't build the BERI kernels because they're mips64/mips, and >> > it only builds mips/mips. >> Does it sanitize TARGETS and KERNCONFs properly? > > I have no idea what that even means. Answering myself, it should if TARGET isn't explicitly defined to something that the conversion logic wouldn't create collisions for (from .../Makefile in stable/9): 405 KERNCONFS!=3D cd ${KERNSRCDIR}/${TARGET}/conf && \ 406 find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ 407 ! -name DEFAULTS ! -name NOTES 408 universe_kernconfs: 409 .for kernel in ${KERNCONFS} 410 TARGET_ARCH_${kernel}!=3D cd ${KERNSRCDIR}/${TARGET}/conf && \ 411 config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null |= \ 412 grep -v WARNING: | cut -f 2 413 .if empty(TARGET_ARCH_${kernel}) 414 .error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old." 415 .endif In particular TARGETS_ARCHS=3Dmips64:mips might not work in all cases, righ= t? $ make -VKERNCONFS TARGET=3Dmips TARGET_ARCH=3Dmips64 tinderbox ADM5120 ALCHEMY AP91 AP93 AP94 AP96 AR71XX_BASE AR724X_BASE AR91XX_BASE BERI_DE4_MDROOT BERI_DE4_SDROOT BERI_SIM_MDROOT BERI_TEMPLATE DIR-825 GXEMUL IDT MALTA MALTA64 OCTEON1 PB47 PB92 QEMU ROUTERSTATION ROUTERSTATION_MFS RSPRO RSPRO_MFS RSPRO_STANDALONE RT305X SENTRY5 SWARM SWARM64 SWARM64_SMP SWARM_SMP TP-WN1043ND XLP XLP64 XLPN32 XLR XLR64 XLRN32 $ make -VKERNCONFS TARGET=3Dmips TARGET_ARCH=3Dmips tinderbox ADM5120 ALCHEMY AP91 AP93 AP94 AP96 AR71XX_BASE AR724X_BASE AR91XX_BASE BERI_DE4_MDROOT BERI_DE4_SDROOT BERI_SIM_MDROOT BERI_TEMPLATE DIR-825 GXEMUL IDT MALTA MALTA64 OCTEON1 PB47 PB92 QEMU ROUTERSTATION ROUTERSTATION_MFS RSPRO RSPRO_MFS RSPRO_STANDALONE RT305X SENTRY5 SWARM SWARM64 SWARM64_SMP SWARM_SMP TP-WN1043ND XLP XLP64 XLPN32 XLR XLR64 XLRN32 You have to explicitly set the machine directive in the KERNCONF in order for it to only compile on one TARGET_ARCH: $ egrep -r 'machine.*64' sys/mips/conf/ sys/mips/conf/XLP64:machine mips mips64 sys/mips/conf/BERI_TEMPLATE:machine mips mips64 sys/mips/conf/GXEMUL:machine mips mips64 sys/mips/conf/XLR64:machine mips mips64 sys/mips/conf/SWARM64:machine mips mips64 sys/mips/conf/SWARM64_SMP:machine mips mips64 sys/mips/conf/MALTA64:machine mips mips64el # Malta supports both, so it isn't in std.malta Thanks! -Garrett PS I think brooks@ is aware of what needs to be fixed and is working on the solution. From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:39:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15E33106566C; Tue, 4 Sep 2012 23:39:54 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id C4F468FC16; Tue, 4 Sep 2012 23:39:53 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 29ED96D61; Wed, 5 Sep 2012 01:39:53 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 02C9182E4; Wed, 5 Sep 2012 01:39:52 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> <86fw6xe9br.fsf@ds4.des.no> Date: Wed, 05 Sep 2012 01:39:52 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 4 Sep 2012 16:31:06 -0700") Message-ID: <86txvdcq7r.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 23:39:54 -0000 Garrett Cooper writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Garrett Cooper writes: > > > Does it sanitize TARGETS and KERNCONFs properly? > > I have no idea what that even means. > Answering myself, it should if TARGET isn't explicitly defined to > something that the conversion logic wouldn't create collisions for > [...] I still have no idea what you mean. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:42:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADA2F106566B; Tue, 4 Sep 2012 23:42:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B91A8FC19; Tue, 4 Sep 2012 23:42:10 +0000 (UTC) Received: by iayy25 with SMTP id y25so247198iay.13 for ; Tue, 04 Sep 2012 16:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/rvBY/8k0i4gNfw38GqBvHngUTZronCpuCaXa3BMhEI=; b=fjJkZaycDNPC+HkQLRwvxYJC2eEdfSLHmT510Z3y7G9f5RNd3ISBsgnXl++OLKPpPN ij6XxENHBCNkz2VqLKCaSRGXbzSEThahrtnToa0AajmkHPqCOmnII6daVfo/3xJbn8gN YdTmj0cC6Nj/n+DWfTJgRgfm0tBTfSQbtNKfKHK6b5QC6Qo2hy07ST7ajmAWsQLaCDuY wtOpLNmyeoDJvE34cIR1xXWM+E14uQ4N2IFaiNTsGP7VYdns64QECmB5nIbm39YR9w61 CnR6xDC7H0JWcLEOTxNSickrW0g2GDnZpiVjeA6O1NiHH3noBldD1qsNEhKpj7ug0zAh 1ZWQ== MIME-Version: 1.0 Received: by 10.182.218.37 with SMTP id pd5mr16560743obc.24.1346802129818; Tue, 04 Sep 2012 16:42:09 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 4 Sep 2012 16:42:09 -0700 (PDT) In-Reply-To: <86txvdcq7r.fsf@ds4.des.no> References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> <86fw6xe9br.fsf@ds4.des.no> <86txvdcq7r.fsf@ds4.des.no> Date: Tue, 4 Sep 2012 16:42:09 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 23:42:10 -0000 On Tue, Sep 4, 2012 at 4:39 PM, Dag-Erling Sm=F8rgrav wrote: > Garrett Cooper writes: >> Dag-Erling Sm=F8rgrav writes: >> > Garrett Cooper writes: >> > > Does it sanitize TARGETS and KERNCONFs properly? >> > I have no idea what that even means. >> Answering myself, it should if TARGET isn't explicitly defined to >> something that the conversion logic wouldn't create collisions for >> [...] > > I still have no idea what you mean. tl;dr: I [very briefly] thought someone could set KERNCONF in /etc/src.conf or on the command line and it would screw things up, but I quickly realized that assumption was incorrect. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Sep 4 23:50:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CDC106566B; Tue, 4 Sep 2012 23:50:10 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7D58FC16; Tue, 4 Sep 2012 23:50:09 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 456456D6D; Wed, 5 Sep 2012 01:50:09 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 1222282E7; Wed, 5 Sep 2012 01:50:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> <86fw6xe9br.fsf@ds4.des.no> <86txvdcq7r.fsf@ds4.des.no> Date: Wed, 05 Sep 2012 01:50:08 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 4 Sep 2012 16:42:09 -0700") Message-ID: <86pq61cpqn.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , John Baldwin Subject: Re: svn commit: r239679 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 23:50:10 -0000 Garrett Cooper writes: > I [very briefly] thought someone could set KERNCONF in /etc/src.conf > or on the command line and it would screw things up, but I quickly > realized that assumption was incorrect. The tinderbox points both __MAKE_CONF and SRCCONF at /dev/null anyway. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 02:03:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769DE1065678; Wed, 5 Sep 2012 02:03:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613BD8FC17; Wed, 5 Sep 2012 02:03:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8523ihM054777; Wed, 5 Sep 2012 02:03:44 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8523iNf054775; Wed, 5 Sep 2012 02:03:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209050203.q8523iNf054775@svn.freebsd.org> From: Ed Maste Date: Wed, 5 Sep 2012 02:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240123 - stable/9/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 02:03:44 -0000 Author: emaste Date: Wed Sep 5 02:03:43 2012 New Revision: 240123 URL: http://svn.freebsd.org/changeset/base/240123 Log: MFC 239883: Avoid passing uninitialized stack to addelem() if called with an empty arg. PR: bin/171174 Modified: stable/9/bin/ps/ps.c Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/ps.c ============================================================================== --- stable/9/bin/ps/ps.c Tue Sep 4 23:27:07 2012 (r240122) +++ stable/9/bin/ps/ps.c Wed Sep 5 02:03:43 2012 (r240123) @@ -889,8 +889,8 @@ add_list(struct listinfo *inf, const cha int toolong; char elemcopy[PATH_MAX]; - if (*argp == 0) - inf->addelem(inf, elemcopy); + if (*argp == '\0') + inf->addelem(inf, argp); while (*argp != '\0') { while (*argp != '\0' && strchr(W_SEP, *argp) != NULL) argp++; From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 02:26:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C53531065675; Wed, 5 Sep 2012 02:26:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05678FC12; Wed, 5 Sep 2012 02:26:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q852QDQK057454; Wed, 5 Sep 2012 02:26:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q852QDd4057452; Wed, 5 Sep 2012 02:26:13 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209050226.q852QDd4057452@svn.freebsd.org> From: Ed Maste Date: Wed, 5 Sep 2012 02:26: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: r240124 - 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: Wed, 05 Sep 2012 02:26:13 -0000 Author: emaste Date: Wed Sep 5 02:26:13 2012 New Revision: 240124 URL: http://svn.freebsd.org/changeset/base/240124 Log: MFC 239883: Avoid passing uninitialized stack to addelem() if called with an empty arg. PR: bin/171174 Modified: stable/8/bin/ps/ps.c Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.c ============================================================================== --- stable/8/bin/ps/ps.c Wed Sep 5 02:03:43 2012 (r240123) +++ stable/8/bin/ps/ps.c Wed Sep 5 02:26:13 2012 (r240124) @@ -857,8 +857,8 @@ add_list(struct listinfo *inf, const cha int toolong; char elemcopy[PATH_MAX]; - if (*argp == 0) - inf->addelem(inf, elemcopy); + if (*argp == '\0') + inf->addelem(inf, argp); while (*argp != '\0') { while (*argp != '\0' && strchr(W_SEP, *argp) != NULL) argp++; From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 04:18:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FCBA1065670; Wed, 5 Sep 2012 04:18:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 132C48FC0C; Wed, 5 Sep 2012 04:18:51 +0000 (UTC) Received: from mail12.syd.optusnet.com.au (mail12.syd.optusnet.com.au [211.29.132.193]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q854Io7f015497; Wed, 5 Sep 2012 14:18:50 +1000 Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail12.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q854IeVb011549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Sep 2012 14:18:42 +1000 Date: Wed, 5 Sep 2012 14:18:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Aleksandr Rybalko In-Reply-To: <201209042316.q84NGtuA035023@svn.freebsd.org> Message-ID: <20120905135841.D1053@besplex.bde.org> References: <201209042316.q84NGtuA035023@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240119 - 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, 05 Sep 2012 04:18:52 -0000 On Tue, 4 Sep 2012, Aleksandr Rybalko wrote: > Log: > Style fixes. > > Suggested by: mdf > Approved by: adrian (menthor) The following style bugs remain. (The density of style bugs is low enough for them to be easy to fix.) > Modified: head/sys/kern/subr_hints.c > ============================================================================== > --- head/sys/kern/subr_hints.c Tue Sep 4 23:13:24 2012 (r240118) > +++ head/sys/kern/subr_hints.c Tue Sep 4 23:16:55 2012 (r240119) > @@ -31,8 +31,8 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > +#include Sorting this correctly would be an unrelated fix (it is a prerequisite for most headers, since almost any header may use KASSERT()). > #include Sorting this correctly woruld be an unrelated fix. > > /* > @@ -52,9 +52,9 @@ static char *hintp; Sorting and indenting the static variables would be an unrelated fix. > static int > sysctl_hintmode(SYSCTL_HANDLER_ARGS) A bug in svn diff is visible. The variable declaration is worse than useless as a header for this block of code. > { > - int error, i, from_kenv, value, eqidx; > const char *cp; > char *line, *eq; > + int eqidx, error, from_kenv, i, value; > > from_kenv = 0; > cp = kern_envp; > @@ -62,7 +62,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > /* Fetch candidate for new hintmode value */ Comments (except possibly ones at the right of code) should be real sentences. This one is missing a ".", unlike all older comments (not at the right of code) in this file. > error = sysctl_handle_int(oidp, &value, 0, req); > - if (error || !req->newptr) > + if (error || req->newptr == NULL) > return (error); > > if (value != 2) This still has a boolean test for the non-boolean `error'. Now the older code sets a bad example in all cases where `error' is tested. > @@ -73,8 +73,11 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > switch (hintmode) { > case 0: > if (dynamic_kenv) { > - /* Already here */ > - hintmode = value; /* XXX: Need we switch or not ? */ > + /* > + * Already here. But assign hintmode to 2, to not > + * check it in the future. > + */ Sentence breaks should be 2 spaces, as in all older comments in this file, starting as usual with the copyright. But outside of the copyright, the style bug of single-space sentence breaks was avoided in this file mostly by using the larger style bug of using a new line for most new sentences. > + hintmode = 2; > return (0); > } > from_kenv = 1; > @@ -98,7 +101,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > continue; > } > eq = strchr(cp, '='); > - if (!eq) > + if (eq == NULL) > /* Bad hint value */ > continue; > eqidx = eq - cp; Bruce From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 05:34:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4B81106566B; Wed, 5 Sep 2012 05:34:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail27.syd.optusnet.com.au (mail27.syd.optusnet.com.au [211.29.133.168]) by mx1.freebsd.org (Postfix) with ESMTP id 488E88FC12; Wed, 5 Sep 2012 05:34:52 +0000 (UTC) Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail27.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q855YhW7012201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Sep 2012 15:34:44 +1000 Date: Wed, 5 Sep 2012 15:34:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Zonov In-Reply-To: <50445609.8070902@FreeBSD.org> Message-ID: <20120905141910.N1053@besplex.bde.org> References: <201209021739.q82Hd3CE042578@svn.freebsd.org> <50445609.8070902@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Garrett Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240026 - 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, 05 Sep 2012 05:34:53 -0000 On Mon, 3 Sep 2012, Andrey Zonov wrote: > On 9/3/12 1:20 AM, Garrett Cooper wrote: >> On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper wrote: >>> On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov wrote: >>>> Author: zont >>>> Date: Sun Sep 2 17:39:02 2012 >>>> New Revision: 240026 >>>> URL: http://svn.freebsd.org/changeset/base/240026 >>>> >>>> Log: >>>> - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz >>>> and kern.sgrowsiz sysctls writable. >>>> >>>> Approved by: kib (mentor) >>>> >>>> Modified: >>>> head/sys/kern/subr_param.c >> >> ... >> >>> Please add some basic sanity checking to init_param1 -- there's >>> absolutely nothing preventing me from passing in values <= 0 or other Isn't that an old feature, not affected by this commit? init_param1() runs long before sysctl(8) can run to use the new feature, so it is not affected by this commit. And it is a feature, not a bug, for it to use the values passed in -- the user is the sysadmin, who never makes misteaks and knows what is sane better than init_param1(). >> Correction: values == 0 with little effort (missed the part where it >> was using TUNABLE_ULONG_FETCH). Hopefully it only uses TUNABLE_ULONG_FETCH() for u_longs. It starts by using TUNABLE_INT_FIX() for hz. hz == -1 is in-band but is abused to check for the tunable not being passed in, though hz = -1 can be passed in. Zero, and other negative values of hz are silently accepted. This is a feature (unless you want kernel bloat), since it is too hard for init_param() to tell what a sane value is. To do so, it would have to know all about the subsystems that use the variables, and the interactions of the subsystems with each other and with the system's resources, since sane values of the variables depend on the other variables and the system's resources. For hz, it happens to be easy to know that hz = 0 is insane. hz = 0 will in fact be detected and reported immediately as a fatal trap (division by 0). hz < 0 is just insane. Large values of hz may or may not be insane, depending on timecounter and other system capabilities (except hz > 1000000 is obviously insane, since the same immediate division that gives the fatal trap when hz = 0 also gives tick = 0 when hz > 1000000, and tick = 0 can't work). Next, init_param1() uses some TUNABLE_LONG_FETCH()es for variables not touched in this commit. Most of the older parameters use plain int or long. There is sanity checking only for the newer tunable ngroups_max. This mainly breaks the ability of the user to create a non-POSIX system for testing. This sanity checking has a comment about not allowing values greater than INT_MAX - 1. This comment is wrong and not just irrelevant. TUNABLE_INT_FETCH() automatically disallows values larger than INT_MAX. But it allows a value of INT_MAX, and the code does nothing extra to disallow that. This is probably related to old off-by-1 bugs near {NGROUPS_MAX} (it is unclear if the effective gid is "supplementary"). Hopefully we now count the extra 1 in {NGROUPS_MAX}, so never need to add 1 to {NGROUPS_MAX}. >> You could get negative values though >> if you overflow the value passed in -- in part because the getenv* >> functions in kern_environment.c don't check for/handle overflow >> gracefully .. I had a patch out for this a while ago that never made >> it in. The unsigned long variables mainly break any possibility of detecting overflow, since overflow and negative values can't really happen for unsigned longs. But it is a feature for init_param1() to not limit values to say LONG_MAX, since such a limit is almost useless for preventing overflow when the variables are combined, and limits small enough to prevent overflow for all possible reasonable combinations of the variables would probably prevent useful combinations of the variables (when some of the variables can be larger than usual provided others are smaller than usual). The limits related to packing of kva are most interesting here -- even adding up the sizes of the pieces is not easy. The above discussion of {NGROUPS_MAX} shows that even adding 1 is not easy. >>> non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values. Since we have to trust users to pack kva delicately (if they want to change the defaults at all), why not trust them to know PAGE_SIZE? > I thought of sanity checking here, but there weren't for tunables and I > did't want to add any "magic numbers" in this code. I don't think that > we should check for multiple of PAGE_SIZE, may be only for sgrowsiz and > even not checking, just rounding up. Indeed. It is possible for sysctl() to do more sanity checking, but even less useful, since doing so mainly breaks testing of the limits. > If you have those "magic numbers" I would love to add it. The limits can't be static magic numbers, since they (should) depend on things like kva size and packing which depend on other limits. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 06:02:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9D51106564A; Wed, 5 Sep 2012 06:02:54 +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 9A1668FC14; Wed, 5 Sep 2012 06:02:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8562sXC084962; Wed, 5 Sep 2012 06:02:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8562sUo084957; Wed, 5 Sep 2012 06:02:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209050602.q8562sUo084957@svn.freebsd.org> From: Alan Cox Date: Wed, 5 Sep 2012 06:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240126 - in head/sys: amd64/amd64 i386/i386 i386/xen mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 06:02:54 -0000 Author: alc Date: Wed Sep 5 06:02:54 2012 New Revision: 240126 URL: http://svn.freebsd.org/changeset/base/240126 Log: Rename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the comment describing them. Both the function names and the comment had grown stale. Quite some time has passed since these pmap implementations last used the page's hold count to track the number of valid mapping within a page table page. Also, returning TRUE from pmap_unwire_ptp() rather than _pmap_unwire_ptp() eliminates a few instructions from callers like pmap_enter_quick_locked() where pmap_unwire_ptp()'s return value is used directly by a conditional statement. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/mips/mips/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 5 04:50:20 2012 (r240125) +++ head/sys/amd64/amd64/pmap.c Wed Sep 5 06:02:54 2012 (r240126) @@ -323,8 +323,8 @@ static vm_page_t pmap_allocpde(pmap_t pm static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, struct rwlock **lockp); -static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_page_t* free); +static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, + vm_page_t *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); @@ -1557,23 +1557,25 @@ pmap_remove_pt_page(pmap_t pmap, vm_page } /* - * This routine unholds page table pages, and if the hold count - * drops to zero, then it decrements the wire count. + * Decrements a page table page's wire count, which is used to record the + * number of valid page table entries within the page. If the wire count + * drops to zero, then the page table page is unmapped. Returns TRUE if the + * page table page was unmapped and FALSE otherwise. */ -static __inline int -pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) +static inline boolean_t +pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { --m->wire_count; - if (m->wire_count == 0) - return (_pmap_unwire_pte_hold(pmap, va, m, free)); - else - return (0); + if (m->wire_count == 0) { + _pmap_unwire_ptp(pmap, va, m, free); + return (TRUE); + } else + return (FALSE); } -static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_page_t *free) +static void +_pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1602,14 +1604,14 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of vm_page_t pdpg; pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); - pmap_unwire_pte_hold(pmap, va, pdpg, free); + pmap_unwire_ptp(pmap, va, pdpg, free); } if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) { /* We just released a PD, unhold the matching PDP */ vm_page_t pdppg; pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME); - pmap_unwire_pte_hold(pmap, va, pdppg, free); + pmap_unwire_ptp(pmap, va, pdppg, free); } /* @@ -1624,8 +1626,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of * *ALL* TLB shootdown is done */ pmap_add_delayed_free_list(m, free, TRUE); - - return (1); } /* @@ -1641,7 +1641,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (0); KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return (pmap_unwire_pte_hold(pmap, va, mpte, free)); + return (pmap_unwire_ptp(pmap, va, mpte, free)); } void @@ -3666,7 +3666,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t if (!pmap_pv_insert_pde(pmap, va, VM_PAGE_TO_PHYS(m), lockp)) { free = NULL; - if (pmap_unwire_pte_hold(pmap, va, mpde, &free)) { + if (pmap_unwire_ptp(pmap, va, mpde, &free)) { pmap_invalidate_page(pmap, va); pmap_free_zero_pages(free); } @@ -3842,7 +3842,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ !pmap_try_insert_pv_entry(pmap, va, m, lockp)) { if (mpte != NULL) { free = NULL; - if (pmap_unwire_pte_hold(pmap, va, mpte, &free)) { + if (pmap_unwire_ptp(pmap, va, mpte, &free)) { pmap_invalidate_page(pmap, va); pmap_free_zero_pages(free); } @@ -4149,8 +4149,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pmap_resident_count_inc(dst_pmap, 1); } else { free = NULL; - if (pmap_unwire_pte_hold(dst_pmap, - addr, dstmpte, &free)) { + if (pmap_unwire_ptp(dst_pmap, addr, + dstmpte, &free)) { pmap_invalidate_page(dst_pmap, addr); pmap_free_zero_pages(free); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Sep 5 04:50:20 2012 (r240125) +++ head/sys/i386/i386/pmap.c Wed Sep 5 06:02:54 2012 (r240126) @@ -344,7 +344,7 @@ static void pmap_update_pde_invalidate(v static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags); -static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free); +static void _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *); @@ -1672,22 +1672,25 @@ pmap_remove_pt_page(pmap_t pmap, vm_page } /* - * This routine unholds page table pages, and if the hold count - * drops to zero, then it decrements the wire count. + * Decrements a page table page's wire count, which is used to record the + * number of valid page table entries within the page. If the wire count + * drops to zero, then the page table page is unmapped. Returns TRUE if the + * page table page was unmapped and FALSE otherwise. */ -static __inline int -pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) +static inline boolean_t +pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free) { --m->wire_count; - if (m->wire_count == 0) - return (_pmap_unwire_pte_hold(pmap, m, free)); - else - return (0); + if (m->wire_count == 0) { + _pmap_unwire_ptp(pmap, m, free); + return (TRUE); + } else + return (FALSE); } -static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) +static void +_pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free) { vm_offset_t pteva; @@ -1716,8 +1719,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa * *ALL* TLB shootdown is done */ pmap_add_delayed_free_list(m, free, TRUE); - - return (1); } /* @@ -1734,7 +1735,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (0); ptepde = *pmap_pde(pmap, va); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return (pmap_unwire_pte_hold(pmap, mpte, free)); + return (pmap_unwire_ptp(pmap, mpte, free)); } /* @@ -3819,7 +3820,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ !pmap_try_insert_pv_entry(pmap, va, m)) { if (mpte != NULL) { free = NULL; - if (pmap_unwire_pte_hold(pmap, mpte, &free)) { + if (pmap_unwire_ptp(pmap, mpte, &free)) { pmap_invalidate_page(pmap, va); pmap_free_zero_pages(free); } @@ -4088,8 +4089,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dst_pmap->pm_stats.resident_count++; } else { free = NULL; - if (pmap_unwire_pte_hold(dst_pmap, - dstmpte, &free)) { + if (pmap_unwire_ptp(dst_pmap, dstmpte, + &free)) { pmap_invalidate_page(dst_pmap, addr); pmap_free_zero_pages(free); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Wed Sep 5 04:50:20 2012 (r240125) +++ head/sys/i386/xen/pmap.c Wed Sep 5 06:02:54 2012 (r240126) @@ -300,7 +300,7 @@ static boolean_t pmap_try_insert_pv_entr static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags); -static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free); +static void _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *); @@ -1333,22 +1333,25 @@ pmap_free_zero_pages(vm_page_t free) } /* - * This routine unholds page table pages, and if the hold count - * drops to zero, then it decrements the wire count. + * Decrements a page table page's wire count, which is used to record the + * number of valid page table entries within the page. If the wire count + * drops to zero, then the page table page is unmapped. Returns TRUE if the + * page table page was unmapped and FALSE otherwise. */ -static __inline int -pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) +static inline boolean_t +pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free) { --m->wire_count; - if (m->wire_count == 0) - return (_pmap_unwire_pte_hold(pmap, m, free)); - else - return (0); + if (m->wire_count == 0) { + _pmap_unwire_ptp(pmap, m, free); + return (TRUE); + } else + return (FALSE); } -static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free) +static void +_pmap_unwire_ptp(pmap_t pmap, vm_page_t m, vm_page_t *free) { vm_offset_t pteva; @@ -1384,8 +1387,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa */ m->right = *free; *free = m; - - return (1); } /* @@ -1402,7 +1403,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (0); ptepde = PT_GET(pmap_pde(pmap, va)); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return (pmap_unwire_pte_hold(pmap, mpte, free)); + return (pmap_unwire_ptp(pmap, mpte, free)); } /* @@ -3015,7 +3016,7 @@ pmap_enter_quick_locked(multicall_entry_ !pmap_try_insert_pv_entry(pmap, va, m)) { if (mpte != NULL) { free = NULL; - if (pmap_unwire_pte_hold(pmap, mpte, &free)) { + if (pmap_unwire_ptp(pmap, mpte, &free)) { pmap_invalidate_page(pmap, va); pmap_free_zero_pages(free); } @@ -3294,8 +3295,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dst_pmap->pm_stats.resident_count++; } else { free = NULL; - if (pmap_unwire_pte_hold(dst_pmap, - dstmpte, &free)) { + if (pmap_unwire_ptp(dst_pmap, dstmpte, + &free)) { pmap_invalidate_page(dst_pmap, addr); pmap_free_zero_pages(free); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Sep 5 04:50:20 2012 (r240125) +++ head/sys/mips/mips/pmap.c Wed Sep 5 06:02:54 2012 (r240126) @@ -190,7 +190,7 @@ static boolean_t pmap_try_insert_pv_entr static void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); static void pmap_invalidate_all(pmap_t pmap); static void pmap_invalidate_page(pmap_t pmap, vm_offset_t va); -static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); @@ -928,29 +928,26 @@ pmap_qremove(vm_offset_t va, int count) * Page table page management routines..... ***************************************************/ -/* Revision 1.507 - * - * Simplify the reference counting of page table pages. Specifically, use - * the page table page's wired count rather than its hold count to contain - * the reference count. - */ - /* - * This routine unholds page table pages, and if the hold count - * drops to zero, then it decrements the wire count. + * Decrements a page table page's wire count, which is used to record the + * number of valid page table entries within the page. If the wire count + * drops to zero, then the page table page is unmapped. Returns TRUE if the + * page table page was unmapped and FALSE otherwise. */ -static PMAP_INLINE int -pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) +static PMAP_INLINE boolean_t +pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m) { + --m->wire_count; - if (m->wire_count == 0) - return (_pmap_unwire_pte_hold(pmap, va, m)); - else - return (0); + if (m->wire_count == 0) { + _pmap_unwire_ptp(pmap, va, m); + return (TRUE); + } else + return (FALSE); } -static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) +static void +_pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m) { pd_entry_t *pde; @@ -979,7 +976,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of */ pdp = (pd_entry_t *)*pmap_segmap(pmap, va); pdpg = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS(pdp)); - pmap_unwire_pte_hold(pmap, va, pdpg); + pmap_unwire_ptp(pmap, va, pdpg); } #endif @@ -988,7 +985,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of */ vm_page_free_zero(m); atomic_subtract_int(&cnt.v_wire_count, 1); - return (1); } /* @@ -1004,7 +1000,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (0); KASSERT(pde != 0, ("pmap_unuse_pt: pde != 0")); mpte = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS(pde)); - return (pmap_unwire_pte_hold(pmap, va, mpte)); + return (pmap_unwire_ptp(pmap, va, mpte)); } void @@ -2227,7 +2223,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ if ((m->oflags & VPO_UNMANAGED) == 0 && !pmap_try_insert_pv_entry(pmap, mpte, va, m)) { if (mpte != NULL) { - pmap_unwire_pte_hold(pmap, va, mpte); + pmap_unwire_ptp(pmap, va, mpte); mpte = NULL; } return (mpte); From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 06:15:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 646F4106564A; Wed, 5 Sep 2012 06:15:16 +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 4C4418FC08; Wed, 5 Sep 2012 06:15:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q856FGbi086475; Wed, 5 Sep 2012 06:15:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q856FG7M086461; Wed, 5 Sep 2012 06:15:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209050615.q856FG7M086461@svn.freebsd.org> From: Xin LI Date: Wed, 5 Sep 2012 06:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240127 - in stable/8: contrib/less usr.bin/less X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 06:15:16 -0000 Author: delphij Date: Wed Sep 5 06:15:15 2012 New Revision: 240127 URL: http://svn.freebsd.org/changeset/base/240127 Log: MFC: less v451. Modified: stable/8/contrib/less/LICENSE stable/8/contrib/less/Makefile.aut stable/8/contrib/less/NEWS stable/8/contrib/less/README stable/8/contrib/less/brac.c stable/8/contrib/less/ch.c stable/8/contrib/less/charset.c stable/8/contrib/less/charset.h stable/8/contrib/less/cmd.h stable/8/contrib/less/cmdbuf.c stable/8/contrib/less/command.c stable/8/contrib/less/configure stable/8/contrib/less/configure.ac stable/8/contrib/less/cvt.c stable/8/contrib/less/decode.c stable/8/contrib/less/defines.ds stable/8/contrib/less/defines.h.in stable/8/contrib/less/defines.o2 stable/8/contrib/less/defines.o9 stable/8/contrib/less/defines.wn stable/8/contrib/less/edit.c stable/8/contrib/less/filename.c stable/8/contrib/less/forwback.c stable/8/contrib/less/funcs.h stable/8/contrib/less/help.c stable/8/contrib/less/ifile.c stable/8/contrib/less/input.c stable/8/contrib/less/jump.c stable/8/contrib/less/less.h stable/8/contrib/less/less.hlp stable/8/contrib/less/less.man stable/8/contrib/less/less.nro stable/8/contrib/less/lessecho.c stable/8/contrib/less/lessecho.man stable/8/contrib/less/lessecho.nro stable/8/contrib/less/lesskey.c stable/8/contrib/less/lesskey.h stable/8/contrib/less/lesskey.man stable/8/contrib/less/lesskey.nro stable/8/contrib/less/lglob.h stable/8/contrib/less/line.c stable/8/contrib/less/linenum.c stable/8/contrib/less/lsystem.c stable/8/contrib/less/main.c stable/8/contrib/less/mark.c stable/8/contrib/less/mkhelp.c stable/8/contrib/less/optfunc.c stable/8/contrib/less/option.c stable/8/contrib/less/option.h stable/8/contrib/less/opttbl.c stable/8/contrib/less/os.c stable/8/contrib/less/output.c stable/8/contrib/less/pattern.c stable/8/contrib/less/pattern.h stable/8/contrib/less/pckeys.h stable/8/contrib/less/position.c stable/8/contrib/less/position.h stable/8/contrib/less/prompt.c stable/8/contrib/less/screen.c stable/8/contrib/less/scrsize.c stable/8/contrib/less/search.c stable/8/contrib/less/signal.c stable/8/contrib/less/tags.c stable/8/contrib/less/ttyin.c stable/8/contrib/less/version.c stable/8/usr.bin/less/defines.h Directory Properties: stable/8/contrib/less/ (props changed) stable/8/usr.bin/less/ (props changed) Modified: stable/8/contrib/less/LICENSE ============================================================================== --- stable/8/contrib/less/LICENSE Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/LICENSE Wed Sep 5 06:15:15 2012 (r240127) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2011 Mark Nudelman +Copyright (C) 1984-2012 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/8/contrib/less/Makefile.aut ============================================================================== --- stable/8/contrib/less/Makefile.aut Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/Makefile.aut Wed Sep 5 06:15:15 2012 (r240127) @@ -1,6 +1,6 @@ # Makefile for authoring less. -EMAIL = markn@greenwoodsoftware.com +EMAIL = bug-less@gnu.org HOMEPAGE = http://www.greenwoodsoftware.com/less SHELL = /bin/sh RCS = rcs @@ -112,8 +112,7 @@ dist: ${DISTFILES} echo "Preparing $$REL"; \ rm -rf $$REL; mkdir $$REL; \ for file in ${DISTFILES}; do \ - cp -p $$file $$REL; \ - chmod -w $$REL/$$file; \ + ./add_copyright $$file $$REL; \ done; \ cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \ echo "Creating release/$$REL/$$REL.tar.gz"; \ Modified: stable/8/contrib/less/NEWS ============================================================================== --- stable/8/contrib/less/NEWS Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/NEWS Wed Sep 5 06:15:15 2012 (r240127) @@ -7,8 +7,34 @@ http://www.greenwoodsoftware.com/less You can also download the latest version of less from there. - To report bugs, suggestions or comments, send email to - bug-less@gnu.org or markn@greenwoodsoftware.com. + To report bugs, suggestions or comments, send email to bug-less@gnu.org. + +====================================================================== + + Major changes between "less" versions 444 and 451 + +* Add ESC-F command to keep reading data until a pattern is found. + +* Use exit code of LESSOPEN script if LESSOPEN starts with "||". + +* When up/down arrow is used on the command line immediately after + typing text, the next command starting with that text is found. + +* Add support for GNU regex. + +* Add configure option --with-regex=none and fix compile errors + when compiling with no regex library. + +* Fix bugs handling SGR sequences in Win32. + +* Fix possible crashes caused by malformed LESSOPEN or + LESSCLOSE variables. + +* Fix bug highlighting text which is discontiguous in the file + due to backspace processing. + +* Fix bug in displaying status column when scrolling backwards + with -J and -S in effect. ====================================================================== Modified: stable/8/contrib/less/README ============================================================================== --- stable/8/contrib/less/README Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/README Wed Sep 5 06:15:15 2012 (r240127) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 444 + Less, version 451 - This is the distribution of less, version 444, released 09 Jun 2011. + This is the distribution of less, version 451, released 21 Jul 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or @@ -21,7 +21,7 @@ or 2. The Less License, in the file LICENSE. - Please report any problems to bug-less@gnu.org or markn@greenwoodsoftware.com. + Please report any problems to bug-less@gnu.org. See http://www.greenwoodsoftware.com/less for the latest info. ========================================================================= @@ -60,10 +60,11 @@ INSTALLATION (Unix systems only): regcomp Use the V8-compatible regcomp. regcomp-local Use Henry Spencer's V8-compatible regcomp (source is supplied with less). + none No regular expressions, only simple string matching. --with-secure Builds a "secure" version of less, with some features disabled - to prevent users from viewing other files, accessing shell - commands, etc. + to prevent users from viewing other files, accessing shell + commands, etc. 3. It is a good idea to look over the generated Makefile and defines.h @@ -96,7 +97,7 @@ INSTALLATION (Unix systems only): bindir and/or mandir to the appropriate directories. If you have any problems building or running "less", suggestions, -complaints, etc., you may mail to the author at markn@greenwoodsoftware.com. +complaints, etc., you may mail to bug-less@gnu.org. Note to hackers: comments noting possible improvements are enclosed in double curly brackets {{ like this }}. Modified: stable/8/contrib/less/brac.c ============================================================================== --- stable/8/contrib/less/brac.c Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/brac.c Wed Sep 5 06:15:15 2012 (r240127) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ Modified: stable/8/contrib/less/ch.c ============================================================================== --- stable/8/contrib/less/ch.c Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/ch.c Wed Sep 5 06:15:15 2012 (r240127) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -582,6 +581,8 @@ ch_length() return (NULL_POSITION); if (ch_flags & CH_HELPFILE) return (size_helpdata); + if (ch_flags & CH_NODATA) + return (0); return (ch_fsize); } @@ -806,6 +807,17 @@ seekable(f) } /* + * Force EOF to be at the current read position. + * This is used after an ignore_eof read, during which the EOF may change. + */ + public void +ch_set_eof() +{ + ch_fsize = ch_fpos; +} + + +/* * Initialize file state for a new file. */ public void Modified: stable/8/contrib/less/charset.c ============================================================================== --- stable/8/contrib/less/charset.c Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/charset.c Wed Sep 5 06:15:15 2012 (r240127) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ Modified: stable/8/contrib/less/charset.h ============================================================================== --- stable/8/contrib/less/charset.h Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/charset.h Wed Sep 5 06:15:15 2012 (r240127) @@ -1,11 +1,10 @@ /* - * Copyright (C) 2005-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) Modified: stable/8/contrib/less/cmd.h ============================================================================== --- stable/8/contrib/less/cmd.h Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/cmd.h Wed Sep 5 06:15:15 2012 (r240127) @@ -1,15 +1,14 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ -#define MAX_USERCMD 500 +#define MAX_USERCMD 1000 #define MAX_CMDLEN 16 #define A_B_LINE 2 @@ -66,6 +65,7 @@ #define A_NEXT_TAG 53 #define A_PREV_TAG 54 #define A_FILTER 55 +#define A_F_UNTIL_HILITE 56 #define A_INVALID 100 #define A_NOACTION 101 @@ -78,7 +78,7 @@ #define A_EXTRA 0200 -/* Line editting characters */ +/* Line editing characters */ #define EC_BACKSPACE 1 #define EC_LINEKILL 2 Modified: stable/8/contrib/less/cmdbuf.c ============================================================================== --- stable/8/contrib/less/cmdbuf.c Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/cmdbuf.c Wed Sep 5 06:15:15 2012 (r240127) @@ -1,11 +1,10 @@ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -30,6 +29,7 @@ static int prompt_col; /* Column of cur static char *cp; /* Pointer into cmdbuf */ static int cmd_offset; /* Index into cmdbuf of first displayed char */ static int literal; /* Next input char should not be interpreted */ +static int updown_match = -1; /* Prefix length in up/down movement */ #if TAB_COMPLETE_FILENAME static int cmd_complete(); @@ -122,6 +122,7 @@ cmd_reset() cmd_offset = 0; literal = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -132,6 +133,7 @@ clear_cmd() { cmd_col = prompt_col = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -504,6 +506,7 @@ cmd_ichar(cs, clen) /* * Reprint the tail of the line from the inserted char. */ + updown_match = -1; cmd_repaint(cp); cmd_right(); return (CC_OK); @@ -547,6 +550,7 @@ cmd_erase() /* * Repaint the buffer after the erased char. */ + updown_match = -1; cmd_repaint(cp); /* @@ -643,6 +647,7 @@ cmd_kill() cmd_offset = 0; cmd_home(); *cp = '\0'; + updown_match = -1; cmd_repaint(cp); /* @@ -675,12 +680,15 @@ set_mlist(mlist, cmdflags) #if CMD_HISTORY /* * Move up or down in the currently selected command history list. + * Only consider entries whose first updown_match chars are equal to + * cmdbuf's corresponding chars. */ static int cmd_updown(action) int action; { char *s; + struct mlist *ml; if (curr_mlist == NULL) { @@ -690,24 +698,47 @@ cmd_updown(action) bell(); return (CC_OK); } - cmd_home(); - clear_eol(); + + if (updown_match < 0) + { + updown_match = cp - cmdbuf; + } + /* - * Move curr_mp to the next/prev entry. + * Find the next history entry which matches. */ - if (action == EC_UP) - curr_mlist->curr_mp = curr_mlist->curr_mp->prev; - else - curr_mlist->curr_mp = curr_mlist->curr_mp->next; - /* - * Copy the entry into cmdbuf and echo it on the screen. - */ - s = curr_mlist->curr_mp->string; - if (s == NULL) - s = ""; - strcpy(cmdbuf, s); - for (cp = cmdbuf; *cp != '\0'; ) - cmd_right(); + for (ml = curr_mlist->curr_mp;;) + { + ml = (action == EC_UP) ? ml->prev : ml->next; + if (ml == curr_mlist) + { + /* + * We reached the end (or beginning) of the list. + */ + break; + } + if (strncmp(cmdbuf, ml->string, updown_match) == 0) + { + /* + * This entry matches; stop here. + * Copy the entry into cmdbuf and echo it on the screen. + */ + curr_mlist->curr_mp = ml; + s = ml->string; + if (s == NULL) + s = ""; + strcpy(cmdbuf, s); + cmd_home(); + clear_eol(); + for (cp = cmdbuf; *cp != '\0'; ) + cmd_right(); + return (CC_OK); + } + } + /* + * We didn't find a history entry that matches. + */ + bell(); return (CC_OK); } #endif @@ -1056,7 +1087,11 @@ init_compl() tk_text = fcomplete(word); } else { +#if MSDOS_COMPILER + char *qword = NULL; +#else char *qword = shell_quote(word+1); +#endif if (qword == NULL) tk_text = fcomplete(word+1); else @@ -1457,9 +1492,6 @@ save_cmdhist() FILE *f; int modified = 0; - filename = histfile_name(); - if (filename == NULL) - return; if (mlist_search.modified) modified = 1; #if SHELL_ESCAPE || PIPEC @@ -1468,6 +1500,9 @@ save_cmdhist() #endif if (!modified) return; + filename = histfile_name(); + if (filename == NULL) + return; f = fopen(filename, "w"); free(filename); if (f == NULL) Modified: stable/8/contrib/less/command.c ============================================================================== --- stable/8/contrib/less/command.c Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/command.c Wed Sep 5 06:15:15 2012 (r240127) @@ -1,12 +1,11 @@ /* $FreeBSD$ */ /* - * Copyright (C) 1984-2011 Mark Nudelman + * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * - * For more information about less, or for information on how to - * contact the author, see the README file. + * For more information, see the README file. */ @@ -38,6 +37,7 @@ extern int secure; extern int hshift; extern int show_attn; extern int less_is_more; +extern POSITION highest_hilite; extern char *every_first_cmd; extern char *curr_altfilename; extern char version[]; @@ -104,8 +104,8 @@ cmd_exec() static void start_mca(action, prompt, mlist, cmdflags) int action; - char *prompt; - void *mlist; + constant char *prompt; + constant void *mlist; int cmdflags; { mca = action; @@ -686,7 +686,7 @@ make_display() static void prompt() { - register char *p; + register constant char *p; if (ungot != NULL) { @@ -962,6 +962,46 @@ multi_search(pattern, n) } /* + * Forward forever, or until a highlighted line appears. + */ + static int +forw_loop(until_hilite) + int until_hilite; +{ + POSITION curr_len; + + if (ch_getflags() & CH_HELPFILE) + return (A_NOACTION); + + cmd_exec(); + jump_forw(); + curr_len = ch_length(); + highest_hilite = until_hilite ? curr_len : NULL_POSITION; + ignore_eoi = 1; + while (!sigs) + { + if (until_hilite && highest_hilite > curr_len) + { + bell(); + break; + } + make_display(); + forward(1, 0, 0); + } + ignore_eoi = 0; + ch_set_eof(); + + /* + * This gets us back in "F mode" after processing + * a non-abort signal (e.g. window-change). + */ + if (sigs && !ABORT_SIGS()) + return (until_hilite ? A_F_UNTIL_HILITE : A_F_FOREVER); + + return (A_NOACTION); +} + +/* * Main command processor. * Accept and execute commands until a quit command. */ @@ -979,6 +1019,7 @@ commands() IFILE old_ifile; IFILE new_ifile; char *tagfile; + int until_hilite = 0; search_type = SRCH_FORW; wscroll = (sc_height + 1) / 2; @@ -1206,23 +1247,11 @@ commands() /* * Forward forever, ignoring EOF. */ - if (ch_getflags() & CH_HELPFILE) - break; - cmd_exec(); - jump_forw(); - ignore_eoi = 1; - while (!sigs) - { - make_display(); - forward(1, 0, 0); - } - ignore_eoi = 0; - /* - * This gets us back in "F mode" after processing - * a non-abort signal (e.g. window-change). - */ - if (sigs && !ABORT_SIGS()) - newaction = A_F_FOREVER; + newaction = forw_loop(0); + break; + + case A_F_UNTIL_HILITE: + newaction = forw_loop(1); break; case A_F_SCROLL: Modified: stable/8/contrib/less/configure ============================================================================== --- stable/8/contrib/less/configure Wed Sep 5 06:02:54 2012 (r240126) +++ stable/8/contrib/less/configure Wed Sep 5 06:15:15 2012 (r240127) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for less 1. +# Generated by GNU Autoconf 2.68 for less 1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -1067,7 +1075,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1281,7 +1289,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-secure Compile in secure mode --with-no-float Do not use floating point - --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library auto + --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none} Select a regular expression library auto --with-editor=PROGRAM use PROGRAM as the default editor vi Some influential environment variables: @@ -1361,7 +1369,7 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF less configure 1 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1407,7 +1415,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1453,7 +1461,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1490,7 +1498,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1532,7 +1540,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1545,10 +1553,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1611,7 +1619,7 @@ $as_echo "$as_me: WARNING: $2: proceedin esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1620,7 +1628,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1633,7 +1641,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1651,7 +1659,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1664,7 +1672,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1705,7 +1713,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1717,7 +1725,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1772,7 +1780,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF @@ -1780,7 +1788,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by less $as_me 1, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2142,7 +2150,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2182,7 +2190,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2235,7 +2243,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2275,7 +2283,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2334,7 +2342,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2378,7 +2386,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2661,7 +2669,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_ex ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2712,7 +2720,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2749,7 +2757,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2827,7 +2835,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2925,7 +2933,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -2959,11 +2967,11 @@ for ac_lib in '' cposix; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then : + if ${ac_cv_search_strerror+:} false; then : break fi done -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no @@ -2991,7 +2999,7 @@ if test -n "$CPP" && test -d "$CPP"; the CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3119,7 +3127,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3182,7 +3190,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3250,7 +3258,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -3335,7 +3343,7 @@ ac_configure="$SHELL $ac_aux_dir/configu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3422,7 +3430,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -3473,7 +3481,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3542,7 +3550,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3615,7 +3623,7 @@ fi # Checks for general libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -ltinfo" >&5 $as_echo_n "checking for tgoto in -ltinfo... " >&6; } -if test "${ac_cv_lib_tinfo_tgoto+set}" = set; then : +if ${ac_cv_lib_tinfo_tgoto+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3649,7 +3657,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgoto" >&5 $as_echo "$ac_cv_lib_tinfo_tgoto" >&6; } -if test "x$ac_cv_lib_tinfo_tgoto" = x""yes; then : +if test "x$ac_cv_lib_tinfo_tgoto" = xyes; then : have_tinfo=yes else have_tinfo=no @@ -3657,7 +3665,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lxcurses" >&5 $as_echo_n "checking for initscr in -lxcurses... " >&6; } -if test "${ac_cv_lib_xcurses_initscr+set}" = set; then : +if ${ac_cv_lib_xcurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3691,7 +3699,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcurses_initscr" >&5 $as_echo "$ac_cv_lib_xcurses_initscr" >&6; } -if test "x$ac_cv_lib_xcurses_initscr" = x""yes; then : +if test "x$ac_cv_lib_xcurses_initscr" = xyes; then : have_xcurses=yes else have_xcurses=no @@ -3699,7 +3707,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 $as_echo_n "checking for initscr in -lncursesw... " >&6; } -if test "${ac_cv_lib_ncursesw_initscr+set}" = set; then : +if ${ac_cv_lib_ncursesw_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3733,7 +3741,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 $as_echo "$ac_cv_lib_ncursesw_initscr" >&6; } -if test "x$ac_cv_lib_ncursesw_initscr" = x""yes; then : +if test "x$ac_cv_lib_ncursesw_initscr" = xyes; then : have_ncursesw=yes else have_ncursesw=no @@ -3741,7 +3749,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 $as_echo_n "checking for initscr in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_initscr+set}" = set; then : +if ${ac_cv_lib_ncurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3775,7 +3783,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } -if test "x$ac_cv_lib_ncurses_initscr" = x""yes; then : +if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : have_ncurses=yes *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 06:49:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DFA51065673; Wed, 5 Sep 2012 06:49:58 +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 DD6F48FC12; Wed, 5 Sep 2012 06:49:56 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA13029; Wed, 05 Sep 2012 09:49:55 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T99Qx-0002NK-2N; Wed, 05 Sep 2012 09:49:55 +0300 Message-ID: <5046F612.5090500@FreeBSD.org> Date: Wed, 05 Sep 2012 09:49:54 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120901 Thunderbird/15.0 MIME-Version: 1.0 To: John Baldwin References: <201208222002.q7MK2gVY089435@svn.freebsd.org> In-Reply-To: <201208222002.q7MK2gVY089435@svn.freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239587 - 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, 05 Sep 2012 06:49:58 -0000 on 22/08/2012 23:02 John Baldwin said the following: > Author: jhb > Date: Wed Aug 22 20:02:42 2012 > New Revision: 239587 > URL: http://svn.freebsd.org/changeset/base/239587 > > Log: > Assert that system calls do not leak a pinned thread (via sched_pin()) to > userland. > > Modified: > head/sys/kern/subr_syscall.c > > Modified: head/sys/kern/subr_syscall.c > ============================================================================== > --- head/sys/kern/subr_syscall.c Wed Aug 22 20:01:57 2012 (r239586) > +++ head/sys/kern/subr_syscall.c Wed Aug 22 20:02:42 2012 (r239587) > @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, I wonder if userret() would be a better place for this assert as well as the asserts that were already there. userret seems to cover more cases and includes the syscallret case. > KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, > ("System call %s returning with sleep disabled", > syscallname(p, sa->code))); > + KASSERT(td->td_pinned == 0, > + ("System call %s returning with pinned thread", > + syscallname(p, sa->code))); > > /* > * Handle reschedule and other end-of-syscall issues > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 06:51:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DCBA1065670; Wed, 5 Sep 2012 06:51:29 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08F858FC15; Wed, 5 Sep 2012 06:51:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q856pSIg090890; Wed, 5 Sep 2012 06:51:28 GMT (envelope-from silby@svn.freebsd.org) Received: (from silby@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q856pSNB090888; Wed, 5 Sep 2012 06:51:28 GMT (envelope-from silby@svn.freebsd.org) Message-Id: <201209050651.q856pSNB090888@svn.freebsd.org> From: Mike Silbersack Date: Wed, 5 Sep 2012 06:51: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: r240128 - head/sys/dev/bxe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 06:51:29 -0000 Author: silby Date: Wed Sep 5 06:51:28 2012 New Revision: 240128 URL: http://svn.freebsd.org/changeset/base/240128 Log: Only stop the BXE controller if it was first started. Stopping an uninitialized controller can cause IPMI bus errors on some systems. Reviewed by: yongari Obtained from: McAfee, Inc. MFC after: 2 weeks Modified: head/sys/dev/bxe/if_bxe.c Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Wed Sep 5 06:15:15 2012 (r240127) +++ head/sys/dev/bxe/if_bxe.c Wed Sep 5 06:51:28 2012 (r240128) @@ -3554,8 +3554,14 @@ bxe_shutdown(device_t dev) sc = device_get_softc(dev); DBENTER(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD); + /* Stop the controller, but only if it was ever started. + * Stopping an uninitialized controller can cause + * IPMI bus errors on some systems. + */ BXE_CORE_LOCK(sc); - bxe_stop_locked(sc, UNLOAD_NORMAL); + if (sc->state != BXE_STATE_CLOSED) { + bxe_stop_locked(sc, UNLOAD_NORMAL); + } BXE_CORE_UNLOCK(sc); DBEXIT(BXE_INFO_LOAD | BXE_INFO_RESET | BXE_INFO_UNLOAD); From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 07:47:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6521D106564A; Wed, 5 Sep 2012 07:47:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FBD68FC15; Wed, 5 Sep 2012 07:47:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q857lAQv097745; Wed, 5 Sep 2012 07:47:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q857lAqD097741; Wed, 5 Sep 2012 07:47:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209050747.q857lAqD097741@svn.freebsd.org> From: Michael Tuexen Date: Wed, 5 Sep 2012 07:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240129 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 07:47:10 -0000 Author: tuexen Date: Wed Sep 5 07:47:09 2012 New Revision: 240129 URL: http://svn.freebsd.org/changeset/base/240129 Log: MFC r240007: Fix a typo which results in RTT to be off by a factor of 10, if the RTT is larger than 1 second. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Wed Sep 5 06:51:28 2012 (r240128) +++ stable/9/sys/netinet/sctputil.c Wed Sep 5 07:47:09 2012 (r240129) @@ -2384,7 +2384,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb } timevalsub(&now, old); /* store the current RTT in us */ - net->rtt = (uint64_t) 10000000 *(uint64_t) now.tv_sec + + net->rtt = (uint64_t) 1000000 *(uint64_t) now.tv_sec + (uint64_t) now.tv_usec; /* computer rtt in ms */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 11:55:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015A5106564A; Wed, 5 Sep 2012 11:55:54 +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 E0A148FC17; Wed, 5 Sep 2012 11:55:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85Btrwd032890; Wed, 5 Sep 2012 11:55:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85Btrd0032888; Wed, 5 Sep 2012 11:55:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209051155.q85Btrd0032888@svn.freebsd.org> From: John Baldwin Date: Wed, 5 Sep 2012 11:55: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: r240132 - 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: Wed, 05 Sep 2012 11:55:54 -0000 Author: jhb Date: Wed Sep 5 11:55:53 2012 New Revision: 240132 URL: http://svn.freebsd.org/changeset/base/240132 Log: When WIFCONTINUED was added, the number of "first" macros grew from three to four. MFC after: 1 week Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Wed Sep 5 09:02:18 2012 (r240131) +++ head/lib/libc/sys/wait.2 Wed Sep 5 11:55:53 2012 (r240132) @@ -177,7 +177,7 @@ with a value of -1. .Pp The following macros may be used to test the manner of exit of the process. -One of the first three macros will evaluate to a non-zero (true) value: +One of the first four macros will evaluate to a non-zero (true) value: .Bl -tag -width Ds .It Fn WIFCONTINUED status True if the process has not terminated, and From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 12:02:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED086106567B; Wed, 5 Sep 2012 12:02:09 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D373B8FC23; Wed, 5 Sep 2012 12:02:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85C29oF033821; Wed, 5 Sep 2012 12:02:09 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85C29Wj033805; Wed, 5 Sep 2012 12:02:09 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209051202.q85C29Wj033805@svn.freebsd.org> From: Martin Matuska Date: Wed, 5 Sep 2012 12:02: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: r240133 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 12:02:10 -0000 Author: mm Date: Wed Sep 5 12:02:09 2012 New Revision: 240133 URL: http://svn.freebsd.org/changeset/base/240133 Log: Merge recent vendor changes and sync code: 1862 incremental zfs receive fails for sparse file > 8PB 3112 ztest does not honor ZFS_DEBUG 3122 zfs destroy filesystem should prefetch blocks 3129 'zpool reopen' restarts resilvers 3130 ztest failure: Assertion failed: 0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10) References: https://www.illumos.org/issues/1862 https://www.illumos.org/issues/3112 https://www.illumos.org/issues/3122 https://www.illumos.org/issues/3129 https://www.illumos.org/issues/3130 Obtained from: illumos (vendor/illumos, vendor/illumos-sys) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Sep 5 12:02:09 2012 (r240133) @@ -5862,6 +5862,8 @@ main(int argc, char **argv) (void) setvbuf(stdout, NULL, _IOLBF, 0); + dprintf_setup(&argc, argv); + if (!ischild) { process_options(argc, argv); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Sep 5 12:02:09 2012 (r240133) @@ -135,6 +135,14 @@ #include +#ifdef illumos +#ifndef _KERNEL +/* set with ZFS_DEBUG=watch, to enable watchpoints on frozen buffers */ +boolean_t arc_watch = B_FALSE; +int arc_procfd; +#endif +#endif /* illumos */ + static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; @@ -534,6 +542,9 @@ static void arc_get_data_buf(arc_buf_t * static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock); static int arc_evict_needed(arc_buf_contents_t type); static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes); +#ifdef illumos +static void arc_buf_watch(arc_buf_t *buf); +#endif /* illumos */ static boolean_t l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *ab); @@ -1069,8 +1080,56 @@ arc_cksum_compute(arc_buf_t *buf, boolea fletcher_2_native(buf->b_data, buf->b_hdr->b_size, buf->b_hdr->b_freeze_cksum); mutex_exit(&buf->b_hdr->b_freeze_lock); +#ifdef illumos + arc_buf_watch(buf); +#endif /* illumos */ +} + +#ifdef illumos +#ifndef _KERNEL +typedef struct procctl { + long cmd; + prwatch_t prwatch; +} procctl_t; +#endif + +/* ARGSUSED */ +static void +arc_buf_unwatch(arc_buf_t *buf) +{ +#ifndef _KERNEL + if (arc_watch) { + int result; + procctl_t ctl; + ctl.cmd = PCWATCH; + ctl.prwatch.pr_vaddr = (uintptr_t)buf->b_data; + ctl.prwatch.pr_size = 0; + ctl.prwatch.pr_wflags = 0; + result = write(arc_procfd, &ctl, sizeof (ctl)); + ASSERT3U(result, ==, sizeof (ctl)); + } +#endif } +/* ARGSUSED */ +static void +arc_buf_watch(arc_buf_t *buf) +{ +#ifndef _KERNEL + if (arc_watch) { + int result; + procctl_t ctl; + ctl.cmd = PCWATCH; + ctl.prwatch.pr_vaddr = (uintptr_t)buf->b_data; + ctl.prwatch.pr_size = buf->b_hdr->b_size; + ctl.prwatch.pr_wflags = WA_WRITE; + result = write(arc_procfd, &ctl, sizeof (ctl)); + ASSERT3U(result, ==, sizeof (ctl)); + } +#endif +} +#endif /* illumos */ + void arc_buf_thaw(arc_buf_t *buf) { @@ -1095,6 +1154,10 @@ arc_buf_thaw(arc_buf_t *buf) } mutex_exit(&buf->b_hdr->b_freeze_lock); + +#ifdef illumos + arc_buf_unwatch(buf); +#endif /* illumos */ } void @@ -1112,6 +1175,7 @@ arc_buf_freeze(arc_buf_t *buf) buf->b_hdr->b_state == arc_anon); arc_cksum_compute(buf, B_FALSE); mutex_exit(hash_lock); + } static void @@ -1496,21 +1560,22 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta * the buffer is placed on l2arc_free_on_write to be freed later. */ static void -arc_buf_data_free(arc_buf_hdr_t *hdr, void (*free_func)(void *, size_t), - void *data, size_t size) +arc_buf_data_free(arc_buf_t *buf, void (*free_func)(void *, size_t)) { + arc_buf_hdr_t *hdr = buf->b_hdr; + if (HDR_L2_WRITING(hdr)) { l2arc_data_free_t *df; df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP); - df->l2df_data = data; - df->l2df_size = size; + df->l2df_data = buf->b_data; + df->l2df_size = hdr->b_size; df->l2df_func = free_func; mutex_enter(&l2arc_free_on_write_mtx); list_insert_head(l2arc_free_on_write, df); mutex_exit(&l2arc_free_on_write_mtx); ARCSTAT_BUMP(arcstat_l2_free_on_write); } else { - free_func(data, size); + free_func(buf->b_data, hdr->b_size); } } @@ -1526,16 +1591,17 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ arc_buf_contents_t type = buf->b_hdr->b_type; arc_cksum_verify(buf); +#ifdef illumos + arc_buf_unwatch(buf); +#endif /* illumos */ if (!recycle) { if (type == ARC_BUFC_METADATA) { - arc_buf_data_free(buf->b_hdr, zio_buf_free, - buf->b_data, size); + arc_buf_data_free(buf, zio_buf_free); arc_space_return(size, ARC_SPACE_DATA); } else { ASSERT(type == ARC_BUFC_DATA); - arc_buf_data_free(buf->b_hdr, - zio_data_buf_free, buf->b_data, size); + arc_buf_data_free(buf, zio_data_buf_free); ARCSTAT_INCR(arcstat_data_size, -size); atomic_add_64(&arc_size, -size); } @@ -2803,6 +2869,9 @@ arc_read_done(zio_t *zio) } arc_cksum_compute(buf, B_FALSE); +#ifdef illumos + arc_buf_watch(buf); +#endif /* illumos */ if (hash_lock && zio->io_error == 0 && hdr->b_state == arc_anon) { /* @@ -3367,6 +3436,9 @@ arc_release(arc_buf_t *buf, void *tag) } hdr->b_datacnt -= 1; arc_cksum_verify(buf); +#ifdef illumos + arc_buf_unwatch(buf); +#endif /* illumos */ mutex_exit(hash_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c Wed Sep 5 12:02:09 2012 (r240133) @@ -189,7 +189,8 @@ bptree_iterate(objset_t *os, uint64_t ob break; err = traverse_dataset_destroyed(os->os_spa, &bte.be_bp, - bte.be_birth_txg, &bte.be_zb, TRAVERSE_POST, + bte.be_birth_txg, &bte.be_zb, + TRAVERSE_PREFETCH_METADATA | TRAVERSE_POST, bptree_visit_cb, &ba); if (free) { ASSERT(err == 0 || err == ERESTART); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Wed Sep 5 12:02:09 2012 (r240133) @@ -63,6 +63,8 @@ typedef struct traverse_data { static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *buf, uint64_t objset, uint64_t object); +static void prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *, + arc_buf_t *buf, uint64_t objset, uint64_t object); static int traverse_zil_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) @@ -178,9 +180,34 @@ traverse_pause(traverse_data_t *td, cons bcopy(zb, td->td_resume, sizeof (*td->td_resume)); } +static void +traverse_prefetch_metadata(traverse_data_t *td, + arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) +{ + uint32_t flags = ARC_NOWAIT | ARC_PREFETCH; + + if (!(td->td_flags & TRAVERSE_PREFETCH_METADATA)) + return; + /* + * If we are in the process of resuming, don't prefetch, because + * some children will not be needed (and in fact may have already + * been freed). + */ + if (td->td_resume != NULL && !ZB_IS_ZERO(td->td_resume)) + return; + if (BP_IS_HOLE(bp) || bp->blk_birth <= td->td_min_txg) + return; + if (BP_GET_LEVEL(bp) == 0 && BP_GET_TYPE(bp) != DMU_OT_DNODE) + return; + + (void) arc_read(NULL, td->td_spa, bp, + pbuf, NULL, NULL, ZIO_PRIORITY_ASYNC_READ, + ZIO_FLAG_CANFAIL, &flags, zb); +} + static int traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, - arc_buf_t *pbuf, blkptr_t *bp, const zbookmark_t *zb) + arc_buf_t *pbuf, const blkptr_t *bp, const zbookmark_t *zb) { zbookmark_t czb; int err = 0, lasterr = 0; @@ -243,14 +270,21 @@ traverse_visitbp(traverse_data_t *td, co ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); + cbp = buf->b_data; + + for (i = 0; i < epb; i++) { + SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, + zb->zb_level - 1, + zb->zb_blkid * epb + i); + traverse_prefetch_metadata(td, buf, &cbp[i], &czb); + } /* recursively visitbp() blocks below this */ - cbp = buf->b_data; - for (i = 0; i < epb; i++, cbp++) { + for (i = 0; i < epb; i++) { SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, zb->zb_level - 1, zb->zb_blkid * epb + i); - err = traverse_visitbp(td, dnp, buf, cbp, &czb); + err = traverse_visitbp(td, dnp, buf, &cbp[i], &czb); if (err) { if (!hard) break; @@ -267,11 +301,16 @@ traverse_visitbp(traverse_data_t *td, co ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err) return (err); + dnp = buf->b_data; + + for (i = 0; i < epb; i++) { + prefetch_dnode_metadata(td, &dnp[i], buf, zb->zb_objset, + zb->zb_blkid * epb + i); + } /* recursively visitbp() blocks below this */ - dnp = buf->b_data; - for (i = 0; i < epb; i++, dnp++) { - err = traverse_dnode(td, dnp, buf, zb->zb_objset, + for (i = 0; i < epb; i++) { + err = traverse_dnode(td, &dnp[i], buf, zb->zb_objset, zb->zb_blkid * epb + i); if (err) { if (!hard) @@ -292,6 +331,15 @@ traverse_visitbp(traverse_data_t *td, co osp = buf->b_data; dnp = &osp->os_meta_dnode; + prefetch_dnode_metadata(td, dnp, buf, zb->zb_objset, + DMU_META_DNODE_OBJECT); + if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { + prefetch_dnode_metadata(td, &osp->os_userused_dnode, + buf, zb->zb_objset, DMU_USERUSED_OBJECT); + prefetch_dnode_metadata(td, &osp->os_groupused_dnode, + buf, zb->zb_objset, DMU_USERUSED_OBJECT); + } + err = traverse_dnode(td, dnp, buf, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err && hard) { @@ -334,6 +382,24 @@ post: return (err != 0 ? err : lasterr); } +static void +prefetch_dnode_metadata(traverse_data_t *td, const dnode_phys_t *dnp, + arc_buf_t *buf, uint64_t objset, uint64_t object) +{ + int j; + zbookmark_t czb; + + for (j = 0; j < dnp->dn_nblkptr; j++) { + SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); + traverse_prefetch_metadata(td, buf, &dnp->dn_blkptr[j], &czb); + } + + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { + SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); + traverse_prefetch_metadata(td, buf, &dnp->dn_spill, &czb); + } +} + static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp, arc_buf_t *buf, uint64_t objset, uint64_t object) @@ -344,8 +410,7 @@ traverse_dnode(traverse_data_t *td, cons for (j = 0; j < dnp->dn_nblkptr; j++) { SET_BOOKMARK(&czb, objset, object, dnp->dn_nlevels - 1, j); - err = traverse_visitbp(td, dnp, buf, - (blkptr_t *)&dnp->dn_blkptr[j], &czb); + err = traverse_visitbp(td, dnp, buf, &dnp->dn_blkptr[j], &czb); if (err) { if (!hard) break; @@ -354,10 +419,8 @@ traverse_dnode(traverse_data_t *td, cons } if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { - SET_BOOKMARK(&czb, objset, - object, 0, DMU_SPILL_BLKID); - err = traverse_visitbp(td, dnp, buf, - (blkptr_t *)&dnp->dn_spill, &czb); + SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); + err = traverse_visitbp(td, dnp, buf, &dnp->dn_spill, &czb); if (err) { if (!hard) return (err); @@ -438,6 +501,12 @@ traverse_impl(spa_t *spa, dsl_dataset_t ASSERT(ds == NULL || objset == ds->ds_object); ASSERT(!(flags & TRAVERSE_PRE) || !(flags & TRAVERSE_POST)); + /* + * The data prefetching mechanism (the prefetch thread) is incompatible + * with resuming from a bookmark. + */ + ASSERT(resume == NULL || !(flags & TRAVERSE_PREFETCH_DATA)); + td.td_spa = spa; td.td_objset = objset; td.td_rootbp = rootbp; @@ -464,7 +533,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t traverse_zil(&td, &os->os_zil_header); } - if (!(flags & TRAVERSE_PREFETCH) || + if (!(flags & TRAVERSE_PREFETCH_DATA) || 0 == taskq_dispatch(system_taskq, traverse_prefetch_thread, &td, TQ_NOQUEUE)) pd.pd_exited = B_TRUE; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Wed Sep 5 12:02:09 2012 (r240133) @@ -429,6 +429,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; spa_t *spa = txh->txh_tx->tx_pool->dp_spa; int epbs; + uint64_t l0span = 0, nl1blks = 0; if (dn->dn_nlevels == 0) return; @@ -461,6 +462,7 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui nblks = dn->dn_maxblkid - blkid; } + l0span = nblks; /* save for later use to calc level > 1 overhead */ if (dn->dn_nlevels == 1) { int i; for (i = 0; i < nblks; i++) { @@ -473,24 +475,10 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui } unref += BP_GET_ASIZE(bp); } + nl1blks = 1; nblks = 0; } - /* - * Add in memory requirements of higher-level indirects. - * This assumes a worst-possible scenario for dn_nlevels. - */ - { - uint64_t blkcnt = 1 + ((nblks >> epbs) >> epbs); - int level = (dn->dn_nlevels > 1) ? 2 : 1; - - while (level++ < DN_MAX_LEVELS) { - txh->txh_memory_tohold += blkcnt << dn->dn_indblkshift; - blkcnt = 1 + (blkcnt >> epbs); - } - ASSERT(blkcnt <= dn->dn_nblkptr); - } - lastblk = blkid + nblks - 1; while (nblks) { dmu_buf_impl_t *dbuf; @@ -561,11 +549,35 @@ dmu_tx_count_free(dmu_tx_hold_t *txh, ui } dbuf_rele(dbuf, FTAG); + ++nl1blks; blkid += tochk; nblks -= tochk; } rw_exit(&dn->dn_struct_rwlock); + /* + * Add in memory requirements of higher-level indirects. + * This assumes a worst-possible scenario for dn_nlevels and a + * worst-possible distribution of l1-blocks over the region to free. + */ + { + uint64_t blkcnt = 1 + ((l0span >> epbs) >> epbs); + int level = 2; + /* + * Here we don't use DN_MAX_LEVEL, but calculate it with the + * given datablkshift and indblkshift. This makes the + * difference between 19 and 8 on large files. + */ + int maxlevel = 2 + (DN_MAX_OFFSET_SHIFT - dn->dn_datablkshift) / + (dn->dn_indblkshift - SPA_BLKPTRSHIFT); + + while (level++ < maxlevel) { + txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs)) + << dn->dn_indblkshift; + blkcnt = 1 + (blkcnt >> epbs); + } + } + /* account for new level 1 indirect blocks that might show up */ if (skipped > 0) { txh->txh_fudge += skipped << dn->dn_indblkshift; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Wed Sep 5 12:02:09 2012 (r240133) @@ -2343,7 +2343,6 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvl } } } - ratio = ds->ds_phys->ds_compressed_bytes == 0 ? 100 : (ds->ds_phys->ds_uncompressed_bytes * 100 / ds->ds_phys->ds_compressed_bytes); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Wed Sep 5 12:02:09 2012 (r240133) @@ -462,12 +462,14 @@ dsl_dir_destroy_check(void *arg1, void * /* * There should be exactly two holds, both from * dsl_dataset_destroy: one on the dd directory, and one on its - * head ds. Otherwise, someone is trying to lookup something - * inside this dir while we want to destroy it. The - * config_rwlock ensures that nobody else opens it after we - * check. + * head ds. If there are more holds, then a concurrent thread is + * performing a lookup inside this dir while we're trying to destroy + * it. To minimize this possibility, we perform this check only + * in syncing context and fail the operation if we encounter + * additional holds. The dp_config_rwlock ensures that nobody else + * opens it after we check. */ - if (dmu_buf_refcount(dd->dd_dbuf) > 2) + if (dmu_tx_is_syncing(tx) && dmu_buf_refcount(dd->dd_dbuf) > 2) return (EBUSY); err = zap_count(mos, dd->dd_phys->dd_child_dir_zapobj, &count); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c Wed Sep 5 12:02:09 2012 (r240133) @@ -228,12 +228,7 @@ dsl_sync_task_do_nowait(dsl_pool_t *dp, dsl_checkfunc_t *checkfunc, dsl_syncfunc_t *syncfunc, void *arg1, void *arg2, int blocks_modified, dmu_tx_t *tx) { - dsl_sync_task_group_t *dstg; - - if (!spa_writeable(dp->dp_spa)) - return; - - dstg = dsl_sync_task_group_create(dp); + dsl_sync_task_group_t *dstg = dsl_sync_task_group_create(dp); dsl_sync_task_create(dstg, checkfunc, syncfunc, arg1, arg2, blocks_modified); dsl_sync_task_group_nowait(dstg, tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c Wed Sep 5 12:02:09 2012 (r240133) @@ -306,6 +306,9 @@ spa_history_log(spa_t *spa, const char * ASSERT(what != LOG_INTERNAL); + if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY || !spa_writeable(spa)) + return (EINVAL); + tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); err = dmu_tx_assign(tx, TXG_WAIT); if (err) { @@ -435,8 +438,9 @@ log_internal(history_internal_events_t e /* * If this is part of creating a pool, not everything is * initialized yet, so don't bother logging the internal events. + * Likewise if the pool is not writeable. */ - if (tx->tx_txg == TXG_INITIAL) + if (tx->tx_txg == TXG_INITIAL || !spa_writeable(spa)) return; va_copy(adx2, adx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Wed Sep 5 12:02:09 2012 (r240133) @@ -1604,6 +1604,19 @@ spa_init(int mode) spa_mode_global = mode; +#ifdef illumos +#ifndef _KERNEL + if (spa_mode_global != FREAD && dprintf_find_string("watch")) { + arc_procfd = open("/proc/self/ctl", O_WRONLY); + if (arc_procfd == -1) { + perror("could not enable watchpoints: " + "opening /proc/self/ctl failed: "); + } else { + arc_watch = B_TRUE; + } + } +#endif +#endif /* illumos */ refcount_sysinit(); unique_init(); zio_init(); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Wed Sep 5 12:02:09 2012 (r240133) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_ARC_H @@ -135,6 +136,13 @@ void l2arc_fini(void); void l2arc_start(void); void l2arc_stop(void); +#ifdef illumos +#ifndef _KERNEL +extern boolean_t arc_watch; +extern int arc_procfd; +#endif +#endif /* illumos */ + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Wed Sep 5 12:02:09 2012 (r240133) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_DNODE_H @@ -276,7 +277,6 @@ void dnode_byteswap(dnode_phys_t *dnp); void dnode_buf_byteswap(void *buf, size_t size); void dnode_verify(dnode_t *dn); int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx); -uint64_t dnode_current_max_length(dnode_t *dn); void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx); void dnode_clear_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h Wed Sep 5 12:02:09 2012 (r240133) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_ZFS_DEBUG_H @@ -75,6 +76,12 @@ extern void zfs_dbgmsg_init(void); extern void zfs_dbgmsg_fini(void); extern void zfs_dbgmsg(const char *fmt, ...); +#ifdef illumos +#ifndef _KERNEL +extern int dprintf_find_string(const char *string); +#endif +#endif /* illumos */ + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Sep 5 12:02:09 2012 (r240133) @@ -4149,7 +4149,17 @@ zfs_ioc_pool_reopen(zfs_cmd_t *zc) return (error); spa_vdev_state_enter(spa, SCL_NONE); + + /* + * If a resilver is already in progress then set the + * spa_scrub_reopen flag to B_TRUE so that we don't restart + * the scan as a side effect of the reopen. Otherwise, let + * vdev_open() decided if a resilver is required. + */ + spa->spa_scrub_reopen = dsl_scan_resilvering(spa->spa_dsl_pool); vdev_reopen(spa->spa_root_vdev); + spa->spa_scrub_reopen = B_FALSE; + (void) spa_vdev_state_exit(spa, NULL, 0); spa_close(spa, FTAG); return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Sep 5 11:55:53 2012 (r240132) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Wed Sep 5 12:02:09 2012 (r240133) @@ -130,11 +130,23 @@ zio_init(void) while (p2 & (p2 - 1)) p2 &= p2 - 1; +#ifdef illumos +#ifndef _KERNEL + /* + * If we are using watchpoints, put each buffer on its own page, + * to eliminate the performance overhead of trapping to the + * kernel when modifying a non-watched buffer that shares the + * page with a watched buffer. + */ + if (arc_watch && !IS_P2ALIGNED(size, PAGESIZE)) + continue; +#endif +#endif /* illumos */ if (size <= 4 * SPA_MINBLOCKSIZE) { align = SPA_MINBLOCKSIZE; - } else if (P2PHASE(size, PAGESIZE) == 0) { + } else if (IS_P2ALIGNED(size, PAGESIZE)) { align = PAGESIZE; - } else if (P2PHASE(size, p2 >> 2) == 0) { + } else if (IS_P2ALIGNED(size, p2 >> 2)) { align = p2 >> 2; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 12:24:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C425D1065670; Wed, 5 Sep 2012 12:24:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA7F8FC16; Wed, 5 Sep 2012 12:24:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85COoKi036888; Wed, 5 Sep 2012 12:24:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85COoO8036886; Wed, 5 Sep 2012 12:24:50 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209051224.q85COoO8036886@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 5 Sep 2012 12:24: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: r240134 - 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, 05 Sep 2012 12:24:50 -0000 Author: des Date: Wed Sep 5 12:24:50 2012 New Revision: 240134 URL: http://svn.freebsd.org/changeset/base/240134 Log: Whitespace cleanup. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Wed Sep 5 12:02:09 2012 (r240133) +++ head/sys/vm/swap_pager.c Wed Sep 5 12:24:50 2012 (r240134) @@ -50,7 +50,7 @@ * * - on the fly reallocation of swap during putpages. The new system * does not try to keep previously allocated swap blocks for dirty - * pages. + * pages. * * - on the fly deallocation of swap * @@ -154,13 +154,13 @@ int swap_pager_avail; static int swdev_syscall_active = 0; /* serialize swap(on|off) */ static vm_ooffset_t swap_total; -SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_total, CTLFLAG_RD, &swap_total, 0, "Total amount of available swap storage."); static vm_ooffset_t swap_reserved; -SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, +SYSCTL_QUAD(_vm, OID_AUTO, swap_reserved, CTLFLAG_RD, &swap_reserved, 0, "Amount of swap storage needed to back all allocated anonymous memory."); static int overcommit = 0; -SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, +SYSCTL_INT(_vm, OID_AUTO, overcommit, CTLFLAG_RW, &overcommit, 0, "Configure virtual memory overcommit behavior. See tuning(7) " "for details."); @@ -184,7 +184,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, static int curfail; static struct timeval lastfail; struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (incr & PAGE_MASK) @@ -285,7 +285,7 @@ void swap_release_by_cred(vm_ooffset_t decr, struct ucred *cred) { struct uidinfo *uip; - + uip = cred->cr_ruidinfo; if (decr & PAGE_MASK) @@ -328,7 +328,7 @@ static struct sx sw_alloc_sx; SYSCTL_INT(_vm, OID_AUTO, swap_async_max, - CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); + CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); /* * "named" and "unnamed" anon region objects. Try to reduce the overhead @@ -340,7 +340,7 @@ SYSCTL_INT(_vm, OID_AUTO, swap_async_max #define NOBJLIST(handle) \ (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) -static struct mtx sw_alloc_mtx; /* protect list manipulation */ +static struct mtx sw_alloc_mtx; /* protect list manipulation */ static struct pagerlst swap_pager_object_list[NOBJLISTS]; static uma_zone_t swap_zone; static struct vm_object swap_zone_obj; @@ -419,7 +419,7 @@ swp_pager_free_nrpage(vm_page_t m) /* * SWP_SIZECHECK() - update swap_pager_full indication - * + * * update the swap_pager_almost_full indication and warn when we are * about to run out of swap space, using lowat/hiwat hysteresis. * @@ -474,7 +474,7 @@ swp_pager_hash(vm_object_t object, vm_pi /* * SWAP_PAGER_INIT() - initialize the swap pager! * - * Expected to be started from system init. NOTE: This code is run + * Expected to be started from system init. NOTE: This code is run * before much else so be careful what you depend on. Most of the VM * system has yet to be initialized at this point. */ @@ -519,7 +519,7 @@ swap_pager_swap_init(void) * MAX_PAGEOUT_CLUSTER. Also be aware that swap ops are * constrained by the swap device interleave stripe size. * - * Currently we hardwire nsw_wcount_async to 4. This limit is + * Currently we hardwire nsw_wcount_async to 4. This limit is * designed to prevent other I/O from having high latencies due to * our pageout I/O. The value 4 works well for one or two active swap * devices but is probably a little low if you have more. Even so, @@ -568,7 +568,7 @@ swap_pager_swap_init(void) /* * Initialize our meta-data hash table. The swapper does not need to - * be quite as efficient as the VM system, so we do not use an + * be quite as efficient as the VM system, so we do not use an * oversized hash table. * * n: size of hash table, must be power of 2 @@ -654,7 +654,7 @@ swap_pager_alloc(void *handle, vm_ooffse /* * SWAP_PAGER_DEALLOC() - remove swap metadata from object * - * The swap backing for the object is destroyed. The code is + * The swap backing for the object is destroyed. The code is * designed such that we can reinstantiate it later, but this * routine is typically called only when the entire object is * about to be destroyed. @@ -679,7 +679,7 @@ swap_pager_dealloc(vm_object_t object) vm_object_pip_wait(object, "swpdea"); /* - * Free all remaining metadata. We only bother to free it from + * Free all remaining metadata. We only bother to free it from * the swap meta data. We do not attempt to free swapblk's still * associated with vm_page_t's for this object. We do not care * if paging is still in progress on some objects. @@ -748,7 +748,7 @@ swp_pager_isondev(daddr_t blk, struct sw return (blk >= sp->sw_first && blk < sp->sw_end); } - + static void swp_pager_strategy(struct buf *bp) { @@ -764,10 +764,10 @@ swp_pager_strategy(struct buf *bp) } panic("Swapdev not found"); } - + /* - * SWP_PAGER_FREESWAPSPACE() - free raw swap space + * SWP_PAGER_FREESWAPSPACE() - free raw swap space * * This routine returns the specified swap blocks back to the bitmap. * @@ -785,7 +785,7 @@ swp_pager_freeswapspace(daddr_t blk, int /* * If we are attempting to stop swapping on * this device, we don't want to mark any - * blocks free lest they be reused. + * blocks free lest they be reused. */ if ((sp->sw_flags & SW_CLOSING) == 0) { blist_free(sp->sw_blist, blk - sp->sw_first, @@ -808,8 +808,8 @@ swp_pager_freeswapspace(daddr_t blk, int * * This routine removes swapblk assignments from swap metadata. * - * The external callers of this routine typically have already destroyed - * or renamed vm_page_t's associated with this range in the object so + * The external callers of this routine typically have already destroyed + * or renamed vm_page_t's associated with this range in the object so * we should be ok. */ void @@ -823,7 +823,7 @@ swap_pager_freespace(vm_object_t object, /* * SWAP_PAGER_RESERVE() - reserve swap blocks in object * - * Assigns swap blocks to the specified range within the object. The + * Assigns swap blocks to the specified range within the object. The * swap blocks are not zerod. Any previous swap assignment is destroyed. * * Returns 0 on success, -1 on failure. @@ -869,7 +869,7 @@ swap_pager_reserve(vm_object_t object, v * * This routine is allowed to sleep. It may sleep allocating metadata * indirectly through swp_pager_meta_build() or if paging is still in - * progress on the source. + * progress on the source. * * The source object contains no vm_page_t's (which is just as well) * @@ -888,8 +888,8 @@ swap_pager_copy(vm_object_t srcobject, v VM_OBJECT_LOCK_ASSERT(dstobject, MA_OWNED); /* - * If destroysource is set, we remove the source object from the - * swap_pager internal queue now. + * If destroysource is set, we remove the source object from the + * swap_pager internal queue now. */ if (destroysource) { if (srcobject->handle != NULL) { @@ -925,7 +925,7 @@ swap_pager_copy(vm_object_t srcobject, v daddr_t srcaddr; srcaddr = swp_pager_meta_ctl( - srcobject, + srcobject, i + offset, SWM_POP ); @@ -947,7 +947,7 @@ swap_pager_copy(vm_object_t srcobject, v * Destination has valid swapblk or it is represented * by a resident page. We destroy the sourceblock. */ - + swp_pager_meta_ctl(srcobject, i + offset, SWM_FREE); } } @@ -1042,7 +1042,7 @@ swap_pager_haspage(vm_object_t object, v * SWAP_PAGER_PAGE_UNSWAPPED() - remove swap backing store related to page * * This removes any associated swap backing store, whether valid or - * not, from the page. + * not, from the page. * * This routine is typically called when a page is made dirty, at * which point any associated swap can be freed. MADV_FREE also @@ -1071,7 +1071,7 @@ swap_pager_unswapped(vm_page_t m) * a chunk surrounding m[reqpage] as is contiguous in swap and which * belongs to the same object. * - * The code is designed for asynchronous operation and + * The code is designed for asynchronous operation and * immediate-notification of 'reqpage' but tends not to be * used that way. Please do not optimize-out this algorithmic * feature, I intend to improve on it in the future. @@ -1101,7 +1101,7 @@ swap_pager_getpages(vm_object_t object, * Calculate range to retrieve. The pages have already been assigned * their swapblks. We require a *contiguous* range but we know it to * not span devices. If we do not supply it, bad things - * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the + * happen. Note that blk, iblk & jblk can be SWAPBLK_NONE, but the * loops are set up such that the case(s) are handled implicitly. * * The swp_*() calls must be made with the object locked. @@ -1139,7 +1139,7 @@ swap_pager_getpages(vm_object_t object, } /* - * Return VM_PAGER_FAIL if we have nothing to do. Return mreq + * Return VM_PAGER_FAIL if we have nothing to do. Return mreq * still busy, but the others unbusied. */ if (blk == SWAPBLK_NONE) @@ -1234,21 +1234,21 @@ swap_pager_getpages(vm_object_t object, /* * A final note: in a low swap situation, we cannot deallocate swap * and mark a page dirty here because the caller is likely to mark - * the page clean when we return, causing the page to possibly revert + * the page clean when we return, causing the page to possibly revert * to all-zero's later. */ } /* - * swap_pager_putpages: + * swap_pager_putpages: * * Assign swap (if necessary) and initiate I/O on the specified pages. * * We support both OBJT_DEFAULT and OBJT_SWAP objects. DEFAULT objects * are automatically converted to SWAP objects. * - * In a low memory situation we may block in VOP_STRATEGY(), but the new - * vm_page reservation system coupled with properly written VFS devices + * In a low memory situation we may block in VOP_STRATEGY(), but the new + * vm_page reservation system coupled with properly written VFS devices * should ensure that no low-memory deadlock occurs. This is an area * which needs work. * @@ -1269,8 +1269,8 @@ swap_pager_putpages(vm_object_t object, int n = 0; if (count && m[0]->object != object) { - panic("swap_pager_putpages: object mismatch %p/%p", - object, + panic("swap_pager_putpages: object mismatch %p/%p", + object, m[0]->object ); } @@ -1292,7 +1292,7 @@ swap_pager_putpages(vm_object_t object, /* * Step 2 * - * Update nsw parameters from swap_async_max sysctl values. + * Update nsw parameters from swap_async_max sysctl values. * Do not let the sysop crash the machine with bogus numbers. */ mtx_lock(&pbuf_mtx); @@ -1384,7 +1384,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t mreq = m[i+j]; swp_pager_meta_build( - mreq->object, + mreq->object, mreq->pindex, blk + j ); @@ -1453,10 +1453,10 @@ swap_pager_putpages(vm_object_t object, * Completion routine for asynchronous reads and writes from/to swap. * Also called manually by synchronous code to finish up a bp. * - * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, - * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY - * unbusy all pages except the 'main' request page. For WRITE - * operations, we vm_page_t->busy'd unbusy all pages ( we can do this + * For READ operations, the pages are VPO_BUSY'd. For WRITE operations, + * the pages are vm_page_t->busy'd. For READ operations, we VPO_BUSY + * unbusy all pages except the 'main' request page. For WRITE + * operations, we vm_page_t->busy'd unbusy all pages ( we can do this * because we marked them all VM_PAGER_PEND on return from putpages ). * * This routine may not sleep. @@ -1475,7 +1475,7 @@ swp_pager_async_iodone(struct buf *bp) "swap_pager: I/O error - %s failed; blkno %ld," "size %ld, error %d\n", ((bp->b_iocmd == BIO_READ) ? "pagein" : "pageout"), - (long)bp->b_blkno, + (long)bp->b_blkno, (long)bp->b_bcount, bp->b_error ); @@ -1495,7 +1495,7 @@ swp_pager_async_iodone(struct buf *bp) * cleanup pages. If an error occurs writing to swap, we are in * very serious trouble. If it happens to be a disk error, though, * we may be able to recover by reassigning the swap later on. So - * in this case we remove the m->swapblk assignment for the page + * in this case we remove the m->swapblk assignment for the page * but do not free it in the rlist. The errornous block(s) are thus * never reallocated as swap. Redirty the page and continue. */ @@ -1508,7 +1508,7 @@ swp_pager_async_iodone(struct buf *bp) /* * If an error occurs I'd love to throw the swapblk * away without freeing it back to swapspace, so it - * can never be used again. But I can't from an + * can never be used again. But I can't from an * interrupt. */ if (bp->b_iocmd == BIO_READ) { @@ -1517,7 +1517,7 @@ swp_pager_async_iodone(struct buf *bp) * locked for the parent, but all other * pages can be freed. We still want to * wakeup the parent waiting on the page, - * though. ( also: pg_reqpage can be -1 and + * though. ( also: pg_reqpage can be -1 and * not match anything ). * * We have to wake specifically requested pages @@ -1534,7 +1534,7 @@ swp_pager_async_iodone(struct buf *bp) else vm_page_flash(m); /* - * If i == bp->b_pager.pg_reqpage, do not wake + * If i == bp->b_pager.pg_reqpage, do not wake * the page up. The caller needs to. */ } else { @@ -1551,7 +1551,7 @@ swp_pager_async_iodone(struct buf *bp) } } else if (bp->b_iocmd == BIO_READ) { /* - * NOTE: for reads, m->dirty will probably be + * NOTE: for reads, m->dirty will probably be * overridden by the original caller of getpages so * we cannot set them in order to free the underlying * swap in a low-swap situation. I don't think we'd @@ -1563,7 +1563,7 @@ swp_pager_async_iodone(struct buf *bp) * * Note that the requested page, reqpage, is left * busied, but we still have to wake it up. The - * other pages are released (unbusied) by + * other pages are released (unbusied) by * vm_page_wakeup(). */ KASSERT(!pmap_page_is_mapped(m), @@ -1577,7 +1577,7 @@ swp_pager_async_iodone(struct buf *bp) * up too because we cleared VPO_SWAPINPROG and * could be waiting for it in getpages. However, * be sure to not unbusy getpages specifically - * requested page - getpages expects it to be + * requested page - getpages expects it to be * left busy. */ if (i != bp->b_pager.pg_reqpage) { @@ -1590,7 +1590,7 @@ swp_pager_async_iodone(struct buf *bp) } else { /* * For write success, clear the dirty - * status, then finish the I/O ( which decrements the + * status, then finish the I/O ( which decrements the * busy count and possibly wakes waiter's up ). */ KASSERT(!pmap_page_is_write_mapped(m), @@ -1615,8 +1615,8 @@ swp_pager_async_iodone(struct buf *bp) VM_OBJECT_UNLOCK(object); } - /* - * swapdev_strategy() manually sets b_vp and b_bufobj before calling + /* + * swapdev_strategy() manually sets b_vp and b_bufobj before calling * bstrategy(). Set them back to NULL now we're done with it, or we'll * trigger a KASSERT in relpbuf(). */ @@ -1628,10 +1628,10 @@ swp_pager_async_iodone(struct buf *bp) * release the physical I/O buffer */ relpbuf( - bp, - ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : - ((bp->b_flags & B_ASYNC) ? - &nsw_wcount_async : + bp, + ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : + ((bp->b_flags & B_ASYNC) ? + &nsw_wcount_async : &nsw_wcount_sync ) ) @@ -1744,8 +1744,8 @@ restart: for (swap = swhash[i]; swap != NULL; swap = swap->swb_hnext) { vm_object_t object = swap->swb_object; vm_pindex_t pindex = swap->swb_index; - for (j = 0; j < SWAP_META_PAGES; ++j) { - if (swp_pager_isondev(swap->swb_pages[j], sp)) { + for (j = 0; j < SWAP_META_PAGES; ++j) { + if (swp_pager_isondev(swap->swb_pages[j], sp)) { /* avoid deadlock */ if (!VM_OBJECT_TRYLOCK(object)) { break; @@ -1758,7 +1758,7 @@ restart: goto restart; } } - } + } } } mtx_unlock(&swhash_mtx); @@ -1783,7 +1783,7 @@ restart: * SWAP META DATA * ************************************************************************ * - * These routines manipulate the swap metadata stored in the + * These routines manipulate the swap metadata stored in the * OBJT_SWAP object. * * Swap metadata is implemented with a global hash and not directly @@ -1821,13 +1821,13 @@ swp_pager_meta_build(vm_object_t object, mtx_lock(&sw_alloc_mtx); TAILQ_INSERT_TAIL( NOBJLIST(object->handle), - object, + object, pager_object_list ); mtx_unlock(&sw_alloc_mtx); } } - + /* * Locate hash entry. If not found create, but if we aren't adding * anything just return. If we run out of space in the map we wait @@ -1896,10 +1896,10 @@ done: /* * SWP_PAGER_META_FREE() - free a range of blocks in the object's swap metadata * - * The requested range of blocks is freed, with any associated swap + * The requested range of blocks is freed, with any associated swap * returned to the swap bitmap. * - * This routine will free swap metadata structures as they are cleaned + * This routine will free swap metadata structures as they are cleaned * out. This routine does *NOT* operate on swap metadata associated * with resident pages. */ @@ -1991,14 +1991,14 @@ swp_pager_meta_free_all(vm_object_t obje * swapblk assignments in the swap meta data or in the vm_page_t. * The routine typically returns the swapblk being looked-up, or popped, * or SWAPBLK_NONE if the block was freed, or SWAPBLK_NONE if the block - * was invalid. This routine will automatically free any invalid + * was invalid. This routine will automatically free any invalid * meta-data swapblks. * * It is not possible to store invalid swapblks in the swap meta data * (other then a literal 'SWAPBLK_NONE'), so we don't bother checking. * - * When acting on a busy resident page and paging is in progress, we - * have to wait until paging is complete but otherwise can act on the + * When acting on a busy resident page and paging is in progress, we + * have to wait until paging is complete but otherwise can act on the * busy page. * * SWM_FREE remove and free swap block from metadata @@ -2014,7 +2014,7 @@ swp_pager_meta_ctl(vm_object_t object, v VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); /* - * The meta data only exists of the object is OBJT_SWAP + * The meta data only exists of the object is OBJT_SWAP * and even then might not be allocated yet. */ if (object->type != OBJT_SWAP) @@ -2040,7 +2040,7 @@ swp_pager_meta_ctl(vm_object_t object, v uma_zfree(swap_zone, swap); --object->un_pager.swp.swp_bcount; } - } + } } } mtx_unlock(&swhash_mtx); @@ -2058,7 +2058,7 @@ struct swapon_args { }; #endif -/* +/* * MPSAFE */ /* ARGSUSED */ @@ -2153,7 +2153,7 @@ swaponsomething(struct vnode *vp, void * /* * nblks is in DEV_BSIZE'd chunks, convert to PAGE_SIZE'd chunks. * First chop nblks off to page-align it, then convert. - * + * * sw->sw_nblks is in page-sized chunks now too. */ nblks &= ~(ctodb(1) - 1); @@ -2342,12 +2342,12 @@ swapoff_all(void) struct swdevt *sp, *spt; const char *devname; int error; - + mtx_lock(&Giant); while (swdev_syscall_active) tsleep(&swdev_syscall_active, PUSER - 1, "swpoff", 0); swdev_syscall_active = 1; - + mtx_lock(&sw_dev_mtx); TAILQ_FOREACH_SAFE(sp, &swtailq, sw_list, spt) { mtx_unlock(&sw_dev_mtx); @@ -2365,7 +2365,7 @@ swapoff_all(void) mtx_lock(&sw_dev_mtx); } mtx_unlock(&sw_dev_mtx); - + swdev_syscall_active = 0; wakeup_one(&swdev_syscall_active); mtx_unlock(&Giant); @@ -2709,7 +2709,7 @@ swaponvp(struct thread *td, struct vnode } } mtx_unlock(&sw_dev_mtx); - + (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_system_check_swapon(td->td_ucred, vp); From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 13:18:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4380B106566B; Wed, 5 Sep 2012 13:18:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CEF78FC0A; Wed, 5 Sep 2012 13:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85DIq7A044084; Wed, 5 Sep 2012 13:18:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85DIpRS044073; Wed, 5 Sep 2012 13:18:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209051318.q85DIpRS044073@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 13:18: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: r240135 - in head/sys: amd64/conf conf dev/random i386/conf modules/random X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 13:18:52 -0000 Author: kib Date: Wed Sep 5 13:18:51 2012 New Revision: 240135 URL: http://svn.freebsd.org/changeset/base/240135 Log: Add support for new Intel on-CPU Bull Mountain random number generator, found on IvyBridge and supposedly later CPUs, accessible with RDRAND instruction. From the Intel whitepapers and articles about Bull Mountain, it seems that we do not need to perform post-processing of RDRAND results, like AES-encryption of the data with random IV and keys, which was done for Padlock. Intel claims that sanitization is performed in hardware. Make both Padlock and Bull Mountain random generators support code covered by kernel config options, for the benefit of people who prefer minimal kernels. Also add the tunables to disable hardware generator even if detected. Reviewed by: markm, secteam (simon) Tested by: bapt, Michael Moll MFC after: 3 weeks Added: head/sys/dev/random/ivy.c (contents, props changed) Deleted: head/sys/dev/random/nehemiah.h Modified: head/sys/amd64/conf/GENERIC head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/i386/conf/GENERIC head/sys/modules/random/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/amd64/conf/GENERIC Wed Sep 5 13:18:51 2012 (r240135) @@ -292,6 +292,8 @@ device wpi # Intel 3945ABG wireless NI # Pseudo devices. device loop # Network loopback device random # Entropy device +options PADLOCK_RNG # VIA Padlock RNG +options IVY_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/conf/files.amd64 Wed Sep 5 13:18:51 2012 (r240135) @@ -213,7 +213,8 @@ dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa -dev/random/nehemiah.c optional random +dev/random/ivy.c optional random ivy_rng +dev/random/nehemiah.c optional random padlock_rng dev/qlxgb/qla_dbg.c optional qlxgb pci dev/qlxgb/qla_hw.c optional qlxgb pci dev/qlxgb/qla_ioctl.c optional qlxgb pci Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/conf/files.i386 Wed Sep 5 13:18:51 2012 (r240135) @@ -226,7 +226,8 @@ dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/nvram/nvram.c optional nvram isa dev/pcf/pcf_isa.c optional pcf -dev/random/nehemiah.c optional random +dev/random/ivy.c optional random ivy_rng +dev/random/nehemiah.c optional random padlock_rng dev/sbni/if_sbni.c optional sbni dev/sbni/if_sbni_isa.c optional sbni isa dev/sbni/if_sbni_pci.c optional sbni pci Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/conf/options.amd64 Wed Sep 5 13:18:51 2012 (r240135) @@ -68,3 +68,7 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h + +# hw random number generators for random(4) +PADLOCK_RNG opt_cpu.h +IVY_RNG opt_cpu.h Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/conf/options.i386 Wed Sep 5 13:18:51 2012 (r240135) @@ -123,3 +123,7 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h + +# hw random number generators for random(4) +PADLOCK_RNG opt_cpu.h +IVY_RNG opt_cpu.h Added: head/sys/dev/random/ivy.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/ivy.c Wed Sep 5 13:18:51 2012 (r240135) @@ -0,0 +1,117 @@ +/*- + * Copyright (c) 2012 Konstantin Belousov + * 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 + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_cpu.h" + +#ifdef IVY_RNG + +#include +#include +#include +#include +#include +#include +#include + +#define RETRY_COUNT 10 + +static void random_ivy_init(void); +static void random_ivy_deinit(void); +static int random_ivy_read(void *, int); + +struct random_systat random_ivy = { + .ident = "Hardware, Intel IvyBridge+ RNG", + .init = random_ivy_init, + .deinit = random_ivy_deinit, + .read = random_ivy_read, + .write = (random_write_func_t *)random_null_func, + .reseed = (random_reseed_func_t *)random_null_func, + .seeded = 1, +}; + +static inline int +ivy_rng_store(long *tmp) +{ +#ifdef __GNUCLIKE_ASM + uint32_t count; + + __asm __volatile( +#ifdef __amd64__ + ".byte\t0x48,0x0f,0xc7,0xf0\n\t" /* rdrand %rax */ + "jnc\t1f\n\t" + "movq\t%%rax,%1\n\t" + "movl\t$8,%%eax\n" +#else /* i386 */ + ".byte\t0x0f,0xc7,0xf0\n\t" /* rdrand %eax */ + "jnc\t1f\n\t" + "movl\t%%eax,%1\n\t" + "movl\t$4,%%eax\n" +#endif + "1:\n" /* %eax is cleared by processor on failure */ + : "=a" (count), "=g" (*tmp) : "a" (0) : "cc"); + return (count); +#else /* __GNUCLIKE_ASM */ + return (0); +#endif +} + +static void +random_ivy_init(void) +{ +} + +void +random_ivy_deinit(void) +{ +} + +static int +random_ivy_read(void *buf, int c) +{ + char *b; + long tmp; + int count, res, retry; + + for (count = c, b = buf; count > 0; count -= res, b += res) { + for (retry = 0; retry < RETRY_COUNT; retry++) { + res = ivy_rng_store(&tmp); + if (res != 0) + break; + } + if (res == 0) + break; + if (res > count) + res = count; + memcpy(b, &tmp, res); + } + return (c - count); +} + +#endif Modified: head/sys/dev/random/nehemiah.c ============================================================================== --- head/sys/dev/random/nehemiah.c Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/dev/random/nehemiah.c Wed Sep 5 13:18:51 2012 (r240135) @@ -28,6 +28,10 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cpu.h" + +#ifdef PADLOCK_RNG + #include #include #include @@ -203,3 +207,5 @@ random_nehemiah_read(void *buf, int c) mtx_unlock(&random_nehemiah_mtx); return (c); } + +#endif Modified: head/sys/dev/random/probe.c ============================================================================== --- head/sys/dev/random/probe.c Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/dev/random/probe.c Wed Sep 5 13:18:51 2012 (r240135) @@ -28,12 +28,17 @@ #include __FBSDID("$FreeBSD$"); +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#include "opt_cpu.h" +#endif + #include #include +#include +#include #include #include #include -#include #include #if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) @@ -45,7 +50,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include + +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#ifdef PADLOCK_RNG +extern struct random_systat random_nehemiah; +#endif +#ifdef IVY_RNG +extern struct random_systat random_ivy; +#endif +#endif void random_ident_hardware(struct random_systat *systat) @@ -56,8 +69,25 @@ random_ident_hardware(struct random_syst /* Then go looking for hardware */ #if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#ifdef PADLOCK_RNG if (via_feature_rng & VIA_HAS_RNG) { - *systat = random_nehemiah; + int enable; + + enable = 1; + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); + if (enable) + *systat = random_nehemiah; } #endif +#ifdef IVY_RNG + if (cpu_feature2 & CPUID2_RDRAND) { + int enable; + + enable = 1; + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); + if (enable) + *systat = random_ivy; + } +#endif +#endif } Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/i386/conf/GENERIC Wed Sep 5 13:18:51 2012 (r240135) @@ -305,6 +305,8 @@ device wpi # Intel 3945ABG wireless NI # Pseudo devices. device loop # Network loopback device random # Entropy device +options PADLOCK_RNG # VIA Padlock RNG +options IVY_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/modules/random/Makefile ============================================================================== --- head/sys/modules/random/Makefile Wed Sep 5 12:24:50 2012 (r240134) +++ head/sys/modules/random/Makefile Wed Sep 5 13:18:51 2012 (r240135) @@ -8,10 +8,11 @@ KMOD= random SRCS= randomdev.c probe.c .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" SRCS+= nehemiah.c +SRCS+= ivy.c .endif SRCS+= randomdev_soft.c yarrow.c hash.c SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c -SRCS+= bus_if.h device_if.h vnode_if.h +SRCS+= bus_if.h device_if.h vnode_if.h opt_cpu.h CFLAGS+= -I${.CURDIR}/../.. From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 13:54:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB0F21065678; Wed, 5 Sep 2012 13:54:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B0B778FC08; Wed, 5 Sep 2012 13:54:56 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1FE12B95E; Wed, 5 Sep 2012 09:54:56 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 5 Sep 2012 08:07:32 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209051155.q85Btrd0032888@svn.freebsd.org> In-Reply-To: <201209051155.q85Btrd0032888@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209050807.32344.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 05 Sep 2012 09:54:56 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240132 - 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: Wed, 05 Sep 2012 13:54:57 -0000 On Wednesday, September 05, 2012 7:55:53 am John Baldwin wrote: > Author: jhb > Date: Wed Sep 5 11:55:53 2012 > New Revision: 240132 > URL: http://svn.freebsd.org/changeset/base/240132 > > Log: > When WIFCONTINUED was added, the number of "first" macros grew from > three to four. FYI, by my reading the state used for to mark a continued process makes both WIFCONTINUED() and WIFSIGNALED() true. I think that is probably a bug, albeit harmless. We could fix it by explicitly excluding SIGCONT from WIFSIGNALED(). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 13:54:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D07861065673; Wed, 5 Sep 2012 13:54:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A2E028FC12; Wed, 5 Sep 2012 13:54:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0696BB972; Wed, 5 Sep 2012 09:54:57 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Wed, 5 Sep 2012 08:14:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208222002.q7MK2gVY089435@svn.freebsd.org> <5046F612.5090500@FreeBSD.org> In-Reply-To: <5046F612.5090500@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209050814.14578.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 05 Sep 2012 09:54:57 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239587 - 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, 05 Sep 2012 13:54:57 -0000 On Wednesday, September 05, 2012 2:49:54 am Andriy Gapon wrote: > on 22/08/2012 23:02 John Baldwin said the following: > > Author: jhb > > Date: Wed Aug 22 20:02:42 2012 > > New Revision: 239587 > > URL: http://svn.freebsd.org/changeset/base/239587 > > > > Log: > > Assert that system calls do not leak a pinned thread (via sched_pin()) to > > userland. > > > > Modified: > > head/sys/kern/subr_syscall.c > > > > Modified: head/sys/kern/subr_syscall.c > > ============================================================================== > > --- head/sys/kern/subr_syscall.c Wed Aug 22 20:01:57 2012 (r239586) > > +++ head/sys/kern/subr_syscall.c Wed Aug 22 20:02:42 2012 (r239587) > > @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, > > I wonder if userret() would be a better place for this assert as well as the > asserts that were already there. userret seems to cover more cases and includes > the syscallret case. The one caveat of moving this to userret() is that you lose detail in the panic message (i.e., the name of the system call that caused the problem). However, it would be perfectly logical to move this entire block of assertions to the bottom of userret() to catch any lock or other leaks from ast() or traps. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 14:31:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 696AE106566C; Wed, 5 Sep 2012 14:31:59 +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 49E548FC17; Wed, 5 Sep 2012 14:31:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85EVxsE053474; Wed, 5 Sep 2012 14:31:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85EVxqm053471; Wed, 5 Sep 2012 14:31:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209051431.q85EVxqm053471@svn.freebsd.org> From: John Baldwin Date: Wed, 5 Sep 2012 14:31: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: r240137 - head/sys/dev/twe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 14:31:59 -0000 Author: jhb Date: Wed Sep 5 14:31:58 2012 New Revision: 240137 URL: http://svn.freebsd.org/changeset/base/240137 Log: - Explicitly call twe_done() to poll the hardware when looping in twe_start() to simulate the behavior on 4.x where the driver dropped spl to allow interrupts to run to free up space in the command queue. Be careful to only poll if we are going to make at least one more attempt to queue the current command. Also, when polling, be careful to not call twe_startio() to queue more commands to avoid recursion. - Move the buffer for formatting AEN messages into the softc instead of using a single driver-wide static buffer. Requested by: scottl (1) Tested by: Mike Tancsa @ Sentex Modified: head/sys/dev/twe/twe.c head/sys/dev/twe/twevar.h Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Wed Sep 5 13:51:36 2012 (r240136) +++ head/sys/dev/twe/twe.c Wed Sep 5 14:31:58 2012 (r240137) @@ -68,7 +68,7 @@ static int twe_del_unit(struct twe_softc /* * Command I/O to controller. */ -static void twe_done(struct twe_softc *sc); +static void twe_done(struct twe_softc *sc, int startio); static void twe_complete(struct twe_softc *sc); static int twe_wait_status(struct twe_softc *sc, u_int32_t status, int timeout); static int twe_drain_response_queue(struct twe_softc *sc); @@ -388,7 +388,7 @@ twe_intr(struct twe_softc *sc) if (status_reg & TWE_STATUS_COMMAND_INTERRUPT) twe_command_intr(sc); if (status_reg & TWE_STATUS_RESPONSE_INTERRUPT) - twe_done(sc); + twe_done(sc, 1); }; /******************************************************************************** @@ -996,7 +996,7 @@ twe_immediate_request(struct twe_request /* Wait up to 5 seconds for the command to complete */ while ((count++ < 5000) && (tr->tr_status == TWE_CMD_BUSY)){ DELAY(1000); - twe_done(sc); + twe_done(sc, 1); } if (usetmp && (tr->tr_data != NULL)) bcopy(sc->twe_immediate, tr->tr_data, tr->tr_length); @@ -1144,7 +1144,8 @@ twe_start(struct twe_request *tr) } #endif return(0); - } + } else if (!(status_reg & TWE_STATUS_RESPONSE_QUEUE_EMPTY) && i > 1) + twe_done(sc, 0); } /* @@ -1162,7 +1163,7 @@ twe_start(struct twe_request *tr) * Can be called at any interrupt level, with or without interrupts enabled. */ static void -twe_done(struct twe_softc *sc) +twe_done(struct twe_softc *sc, int startio) { TWE_Response_Queue rq; TWE_Command *cmd; @@ -1198,7 +1199,7 @@ twe_done(struct twe_softc *sc) } /* if we've completed any commands, try posting some more */ - if (found) + if (found && startio) twe_startio(sc); /* handle completion and timeouts */ @@ -1768,7 +1769,6 @@ twe_check_bits(struct twe_softc *sc, u_i static char * twe_format_aen(struct twe_softc *sc, u_int16_t aen) { - static char buf[80]; device_t child; char *code, *msg; @@ -1785,25 +1785,28 @@ twe_format_aen(struct twe_softc *sc, u_i case 'c': if ((child = sc->twe_drive[TWE_AEN_UNIT(aen)].td_disk) != NULL) { - sprintf(buf, "twed%d: %s", device_get_unit(child), msg); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), "twed%d: %s", + device_get_unit(child), msg); } else { - sprintf(buf, "twe%d: %s for unknown unit %d", device_get_unit(sc->twe_dev), - msg, TWE_AEN_UNIT(aen)); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), + "twe%d: %s for unknown unit %d", device_get_unit(sc->twe_dev), + msg, TWE_AEN_UNIT(aen)); } - return(buf); + return(sc->twe_aen_buf); case 'p': - sprintf(buf, "twe%d: port %d: %s", device_get_unit(sc->twe_dev), TWE_AEN_UNIT(aen), - msg); - return(buf); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), + "twe%d: port %d: %s", device_get_unit(sc->twe_dev), + TWE_AEN_UNIT(aen), msg); + return(sc->twe_aen_buf); case 'x': default: break; } - sprintf(buf, "unknown AEN 0x%x", aen); - return(buf); + snprintf(sc->twe_aen_buf, sizeof(sc->twe_aen_buf), "unknown AEN 0x%x", aen); + return(sc->twe_aen_buf); } /******************************************************************************** Modified: head/sys/dev/twe/twevar.h ============================================================================== --- head/sys/dev/twe/twevar.h Wed Sep 5 13:51:36 2012 (r240136) +++ head/sys/dev/twe/twevar.h Wed Sep 5 14:31:58 2012 (r240137) @@ -125,6 +125,7 @@ struct twe_softc u_int16_t twe_aen_queue[TWE_Q_LENGTH]; /* AENs queued for userland tool(s) */ int twe_aen_head, twe_aen_tail; /* ringbuffer pointers for AEN queue */ int twe_wait_aen; /* wait-for-aen notification */ + char twe_aen_buf[80]; /* AEN format buffer */ /* controller status */ int twe_state; From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 14:52:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD17A106566B; Wed, 5 Sep 2012 14:52: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 AEAB88FC15; Wed, 5 Sep 2012 14:52:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85EqslL056115; Wed, 5 Sep 2012 14:52:54 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85EqsKd056114; Wed, 5 Sep 2012 14:52:54 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209051452.q85EqsKd056114@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 5 Sep 2012 14:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240138 - vendor/NetBSD/atf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 14:52:55 -0000 Author: marcel Date: Wed Sep 5 14:52:54 2012 New Revision: 240138 URL: http://svn.freebsd.org/changeset/base/240138 Log: Remove atf. We get it from the source, not from NetBSD. Deleted: vendor/NetBSD/atf/ From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 15:55:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB2A81065673; Wed, 5 Sep 2012 15:55:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60538FC16; Wed, 5 Sep 2012 15:55:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85FtptJ064255; Wed, 5 Sep 2012 15:55:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85Ftpcw064252; Wed, 5 Sep 2012 15:55:51 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201209051555.q85Ftpcw064252@svn.freebsd.org> From: Brooks Davis Date: Wed, 5 Sep 2012 15:55: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: r240139 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 15:55:51 -0000 Author: brooks Date: Wed Sep 5 15:55:51 2012 New Revision: 240139 URL: http://svn.freebsd.org/changeset/base/240139 Log: Don't hardcode paths to MFS_IMAGE in the kernel config. When they don't exist they don't cause "make tinderbox" to fail. Reported by: jhb Modified: head/sys/mips/conf/BERI_DE4_MDROOT head/sys/mips/conf/BERI_SIM_MDROOT Modified: head/sys/mips/conf/BERI_DE4_MDROOT ============================================================================== --- head/sys/mips/conf/BERI_DE4_MDROOT Wed Sep 5 14:52:54 2012 (r240138) +++ head/sys/mips/conf/BERI_DE4_MDROOT Wed Sep 5 15:55:51 2012 (r240139) @@ -18,7 +18,6 @@ hints "BERI_DE4.hints" #Default places # options MD_ROOT # MD is a potential root device options MD_ROOT_SIZE=8192 -makeoptions MFS_IMAGE=/local/scratch/rnw24/mdroot.img options ROOTDEVNAME=\"ufs:md0\" device altera_avgen Modified: head/sys/mips/conf/BERI_SIM_MDROOT ============================================================================== --- head/sys/mips/conf/BERI_SIM_MDROOT Wed Sep 5 14:52:54 2012 (r240138) +++ head/sys/mips/conf/BERI_SIM_MDROOT Wed Sep 5 15:55:51 2012 (r240139) @@ -17,7 +17,6 @@ hints "BERI_SIM.hints" #Default places # options MD_ROOT # MD is a potential root device options MD_ROOT_SIZE=8192 -makeoptions MFS_IMAGE=/local/scratch/rnw24/mdroot.img options ROOTDEVNAME=\"ufs:md0\" device altera_avgen From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 15:58:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DD40106566B; Wed, 5 Sep 2012 15:58:40 +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 6D0548FC08; Wed, 5 Sep 2012 15:58:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85FweRS064675; Wed, 5 Sep 2012 15:58:40 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85FweQ1064673; Wed, 5 Sep 2012 15:58:40 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209051558.q85FweQ1064673@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 5 Sep 2012 15:58:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240140 - in vendor/atf: . atf-0.16 atf-0.16/atf-c atf-0.16/atf-c++ atf-0.16/atf-sh atf-0.16/bootstrap atf-0.16/m4 dist dist/atf-c dist/atf-c++ dist/atf-sh dist/bootstrap dist/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 15:58:40 -0000 Author: marcel Date: Wed Sep 5 15:58:39 2012 New Revision: 240140 URL: http://svn.freebsd.org/changeset/base/240140 Log: 1. Add README.txt with upgrade instructions as well as license info and governance. 2. Add FREEBSD-Xlist to prune the distribution. 3. Remove files & directories not used by FreeBSD. Added: vendor/atf/FREEBSD-Xlist vendor/atf/README.txt Deleted: vendor/atf/atf-0.16/INSTALL vendor/atf/atf-0.16/TODO vendor/atf/atf-0.16/aclocal.m4 vendor/atf/atf-0.16/atf-c++/atf-c++.m4 vendor/atf/atf-0.16/atf-c++/atf-c++.pc.in vendor/atf/atf-0.16/atf-c/atf-c.m4 vendor/atf/atf-0.16/atf-c/atf-c.pc.in vendor/atf/atf-0.16/atf-c/atf-common.m4 vendor/atf/atf-0.16/atf-sh/atf-sh.m4 vendor/atf/atf-0.16/atf-sh/atf-sh.pc.in vendor/atf/atf-0.16/bootstrap/ vendor/atf/atf-0.16/m4/ vendor/atf/dist/INSTALL vendor/atf/dist/TODO vendor/atf/dist/aclocal.m4 vendor/atf/dist/atf-c++/atf-c++.m4 vendor/atf/dist/atf-c++/atf-c++.pc.in vendor/atf/dist/atf-c/atf-c.m4 vendor/atf/dist/atf-c/atf-c.pc.in vendor/atf/dist/atf-c/atf-common.m4 vendor/atf/dist/atf-sh/atf-sh.m4 vendor/atf/dist/atf-sh/atf-sh.pc.in vendor/atf/dist/bootstrap/ vendor/atf/dist/m4/ Added: vendor/atf/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/FREEBSD-Xlist Wed Sep 5 15:58:39 2012 (r240140) @@ -0,0 +1,7 @@ +bootstrap/ +m4/ +INSTALL +TODO +aclocal.m4 +atf-*/atf-*.m4 +atf-*/atf-*.pc.in Added: vendor/atf/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/atf/README.txt Wed Sep 5 15:58:39 2012 (r240140) @@ -0,0 +1,14 @@ +Import tree for ATF: the Automated Testing Framework. + +Governance: http://code.google.com/p/kyua/wiki/ATF +License: BSD (3-Clause) + +Upgrade instructions: +1. Download a newer version from the URL given above +2. Extract the tarball as per the guidelines +3. Run the following command to remove extraneous files: + sh -c 'for F in `cat FREEBSD-Xlist`; do rm -rf ./$F ; done' +4. Make sure to delete files that ere not present in the new version! +5. Commit vendor/atf (this should update dist and create a new 'tag') +6. Merge vendor/atf/dist to head/contrib/atf, and re-run configure +7. Commit head/contrib/atf From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 15:59:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F121106564A; Wed, 5 Sep 2012 15:59:50 +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 6A7068FC1C; Wed, 5 Sep 2012 15:59:46 +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 D761825D38A0; Wed, 5 Sep 2012 15:59:44 +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 E5EA2BE84BE; Wed, 5 Sep 2012 15:59:43 +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 0eSabfhWI39x; Wed, 5 Sep 2012 15:59:42 +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 C6B83BE84BC; Wed, 5 Sep 2012 15:59:41 +0000 (UTC) Date: Wed, 5 Sep 2012 15:59:41 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mikolaj Golub In-Reply-To: <201209011033.q81AXsGb094283@svn.freebsd.org> Message-ID: References: <201209011033.q81AXsGb094283@svn.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r239983 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 15:59:50 -0000 On Sat, 1 Sep 2012, Mikolaj Golub wrote: > Author: trociny > Date: Sat Sep 1 10:33:53 2012 > New Revision: 239983 > URL: http://svn.freebsd.org/changeset/base/239983 > > Log: > MFC r239075: > > In tcp timers, check INP_DROPPED flag a little later, after > callout_deactivate(), so if INP_DROPPED is set we return with the > timer active flag cleared. > > For me this fixes negative keep timer values reported by `netstat -x' > for connections in CLOSE state. panic: Lock tcp not read locked @ /w/src/sys/netinet/tcp_timer.c:497 reproducable on the cluster. Probably wrong all the way up to HEAD? > Modified: > stable/8/sys/netinet/tcp_timer.c > Directory Properties: > stable/8/sys/ (props changed) > > Modified: stable/8/sys/netinet/tcp_timer.c > ============================================================================== > --- stable/8/sys/netinet/tcp_timer.c Sat Sep 1 10:32:40 2012 (r239982) > +++ stable/8/sys/netinet/tcp_timer.c Sat Sep 1 10:33:53 2012 (r239983) > @@ -176,13 +176,18 @@ tcp_timer_delack(void *xtp) > return; > } > INP_WLOCK(inp); > - if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_delack) > - || !callout_active(&tp->t_timers->tt_delack)) { > + if (callout_pending(&tp->t_timers->tt_delack) || > + !callout_active(&tp->t_timers->tt_delack)) { > INP_WUNLOCK(inp); > CURVNET_RESTORE(); > return; > } > callout_deactivate(&tp->t_timers->tt_delack); > + if ((inp->inp_flags & INP_DROPPED) != 0) { > + INP_WUNLOCK(inp); > + CURVNET_RESTORE(); > + return; > + } > > tp->t_flags |= TF_ACKNOW; > TCPSTAT_INC(tcps_delack); > @@ -222,7 +227,7 @@ tcp_timer_2msl(void *xtp) > } > INP_WLOCK(inp); > tcp_free_sackholes(tp); > - if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_2msl) || > + if (callout_pending(&tp->t_timers->tt_2msl) || > !callout_active(&tp->t_timers->tt_2msl)) { > INP_WUNLOCK(tp->t_inpcb); > INP_INFO_WUNLOCK(&V_tcbinfo); > @@ -230,6 +235,12 @@ tcp_timer_2msl(void *xtp) > return; > } > callout_deactivate(&tp->t_timers->tt_2msl); > + if ((inp->inp_flags & INP_DROPPED) != 0) { > + INP_WUNLOCK(inp); > + INP_INFO_WUNLOCK(&V_tcbinfo); > + CURVNET_RESTORE(); > + return; > + } > /* > * 2 MSL timeout in shutdown went off. If we're closed but > * still waiting for peer to close and connection has been idle > @@ -293,14 +304,20 @@ tcp_timer_keep(void *xtp) > return; > } > INP_WLOCK(inp); > - if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_keep) > - || !callout_active(&tp->t_timers->tt_keep)) { > + if (callout_pending(&tp->t_timers->tt_keep) || > + !callout_active(&tp->t_timers->tt_keep)) { > INP_WUNLOCK(inp); > INP_INFO_WUNLOCK(&V_tcbinfo); > CURVNET_RESTORE(); > return; > } > callout_deactivate(&tp->t_timers->tt_keep); > + if ((inp->inp_flags & INP_DROPPED) != 0) { > + INP_WUNLOCK(inp); > + INP_INFO_WUNLOCK(&V_tcbinfo); > + CURVNET_RESTORE(); > + return; > + } > /* > * Keep-alive timer went off; send something > * or drop connection if idle for too long. > @@ -388,14 +405,20 @@ tcp_timer_persist(void *xtp) > return; > } > INP_WLOCK(inp); > - if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_persist) > - || !callout_active(&tp->t_timers->tt_persist)) { > + if (callout_pending(&tp->t_timers->tt_persist) || > + !callout_active(&tp->t_timers->tt_persist)) { > INP_WUNLOCK(inp); > INP_INFO_WUNLOCK(&V_tcbinfo); > CURVNET_RESTORE(); > return; > } > callout_deactivate(&tp->t_timers->tt_persist); > + if ((inp->inp_flags & INP_DROPPED) != 0) { > + INP_WUNLOCK(inp); > + INP_INFO_WUNLOCK(&V_tcbinfo); > + CURVNET_RESTORE(); > + return; > + } > /* > * Persistance timer into zero window. > * Force a byte to be output, if possible. > @@ -461,14 +484,20 @@ tcp_timer_rexmt(void * xtp) > return; > } > INP_WLOCK(inp); > - if ((inp->inp_flags & INP_DROPPED) || callout_pending(&tp->t_timers->tt_rexmt) > - || !callout_active(&tp->t_timers->tt_rexmt)) { > + if (callout_pending(&tp->t_timers->tt_rexmt) || > + !callout_active(&tp->t_timers->tt_rexmt)) { > INP_WUNLOCK(inp); > INP_INFO_WUNLOCK(&V_tcbinfo); > CURVNET_RESTORE(); > return; > } > callout_deactivate(&tp->t_timers->tt_rexmt); > + if ((inp->inp_flags & INP_DROPPED) != 0) { > + INP_WUNLOCK(inp); > + INP_INFO_RUNLOCK(&V_tcbinfo); > + CURVNET_RESTORE(); > + return; > + } > tcp_free_sackholes(tp); > /* > * Retransmission timer went off. Message has not > -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 16:01:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 937BD1065675; Wed, 5 Sep 2012 16:01:08 +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 7E4298FC18; Wed, 5 Sep 2012 16:01:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85G18kM065092; Wed, 5 Sep 2012 16:01:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85G186D065091; Wed, 5 Sep 2012 16:01:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201209051601.q85G186D065091@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 5 Sep 2012 16:01: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: r240141 - in head/contrib/atf: . atf-c atf-c++ atf-sh bootstrap m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 16:01:08 -0000 Author: marcel Date: Wed Sep 5 16:01:08 2012 New Revision: 240141 URL: http://svn.freebsd.org/changeset/base/240141 Log: Update to a pruned 0.16. Deleted: head/contrib/atf/INSTALL head/contrib/atf/TODO head/contrib/atf/aclocal.m4 head/contrib/atf/atf-c++/atf-c++.m4 head/contrib/atf/atf-c++/atf-c++.pc.in head/contrib/atf/atf-c/atf-c.m4 head/contrib/atf/atf-c/atf-c.pc.in head/contrib/atf/atf-c/atf-common.m4 head/contrib/atf/atf-sh/atf-sh.m4 head/contrib/atf/atf-sh/atf-sh.pc.in head/contrib/atf/bootstrap/ head/contrib/atf/m4/ Modified: Directory Properties: head/contrib/atf/ (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 16:35:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58A3B1065670; Wed, 5 Sep 2012 16:35:38 +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 42A778FC08; Wed, 5 Sep 2012 16:35:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85GZcW7068982; Wed, 5 Sep 2012 16:35:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85GZcN5068978; Wed, 5 Sep 2012 16:35:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209051635.q85GZcN5068978@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 16:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240142 - in stable/9/sys: 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, 05 Sep 2012 16:35:38 -0000 Author: kib Date: Wed Sep 5 16:35:37 2012 New Revision: 240142 URL: http://svn.freebsd.org/changeset/base/240142 Log: MFC r238212: Drop page queues mutex on each iteration of vm_pageout_scan over the inactive queue, unless busy page is found. MFC r238258: Avoid vm page queues lock leak after r238212. Modified: stable/9/sys/sys/vmmeter.h stable/9/sys/vm/vm_pageout.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/vmmeter.h ============================================================================== --- stable/9/sys/sys/vmmeter.h Wed Sep 5 16:01:08 2012 (r240141) +++ stable/9/sys/sys/vmmeter.h Wed Sep 5 16:35:37 2012 (r240142) @@ -79,7 +79,7 @@ struct vmmeter { u_int v_pdpages; /* (q) pages analyzed by daemon */ u_int v_tcached; /* (p) total pages cached */ - u_int v_dfree; /* (q) pages freed by daemon */ + u_int v_dfree; /* (p) pages freed by daemon */ u_int v_pfree; /* (p) pages freed by exiting processes */ u_int v_tfree; /* (p) total pages freed */ /* Modified: stable/9/sys/vm/vm_pageout.c ============================================================================== --- stable/9/sys/vm/vm_pageout.c Wed Sep 5 16:01:08 2012 (r240141) +++ stable/9/sys/vm/vm_pageout.c Wed Sep 5 16:35:37 2012 (r240142) @@ -743,6 +743,7 @@ vm_pageout_scan(int pass) int actcount; int vnodes_skipped = 0; int maxlaunder; + boolean_t queues_locked; /* * Decrease registered cache sizes. @@ -784,6 +785,7 @@ vm_pageout_scan(int pass) if (pass) maxlaunder = 10000; vm_page_lock_queues(); + queues_locked = TRUE; rescan0: addl_page_shortage = addl_page_shortage_init; maxscan = cnt.v_inactive_count; @@ -791,6 +793,8 @@ rescan0: for (m = TAILQ_FIRST(&vm_page_queues[PQ_INACTIVE].pl); m != NULL && maxscan-- > 0 && page_shortage > 0; m = next) { + KASSERT(queues_locked, ("unlocked queues")); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); cnt.v_pdpages++; @@ -850,6 +854,16 @@ rescan0: } /* + * We unlock vm_page_queue_mtx, invalidating the + * 'next' pointer. Use our marker to remember our + * place. + */ + TAILQ_INSERT_AFTER(&vm_page_queues[PQ_INACTIVE].pl, + m, &marker, pageq); + vm_page_unlock_queues(); + queues_locked = FALSE; + + /* * If the object is not being used, we ignore previous * references. */ @@ -873,7 +887,7 @@ rescan0: vm_page_unlock(m); m->act_count += actcount + ACT_ADVANCE; VM_OBJECT_UNLOCK(object); - continue; + goto relock_queues; } /* @@ -889,7 +903,7 @@ rescan0: vm_page_unlock(m); m->act_count += actcount + ACT_ADVANCE + 1; VM_OBJECT_UNLOCK(object); - continue; + goto relock_queues; } /* @@ -924,7 +938,7 @@ rescan0: * Invalid pages can be easily freed */ vm_page_free(m); - cnt.v_dfree++; + PCPU_INC(cnt.v_dfree); --page_shortage; } else if (m->dirty == 0) { /* @@ -947,6 +961,8 @@ rescan0: * the thrash point for a heavily loaded machine. */ m->flags |= PG_WINATCFLS; + vm_page_lock_queues(); + queues_locked = TRUE; vm_page_requeue(m); } else if (maxlaunder > 0) { /* @@ -976,21 +992,13 @@ rescan0: if (!swap_pageouts_ok || (object->flags & OBJ_DEAD)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); + vm_page_lock_queues(); + queues_locked = TRUE; vm_page_requeue(m); - continue; + goto relock_queues; } /* - * Following operations may unlock - * vm_page_queue_mtx, invalidating the 'next' - * pointer. To prevent an inordinate number - * of restarts we use our marker to remember - * our place. - * - */ - TAILQ_INSERT_AFTER(&vm_page_queues[PQ_INACTIVE].pl, - m, &marker, pageq); - /* * The object is already known NOT to be dead. It * is possible for the vget() to block the whole * pageout daemon, but the new low-memory handling @@ -1014,7 +1022,6 @@ rescan0: * of time. */ if (object->type == OBJT_VNODE) { - vm_page_unlock_queues(); vm_page_unlock(m); vp = object->handle; if (vp->v_type == VREG && @@ -1023,7 +1030,6 @@ rescan0: ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; - vm_page_lock_queues(); goto unlock_and_continue; } KASSERT(mp != NULL, @@ -1034,7 +1040,6 @@ rescan0: if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, curthread)) { VM_OBJECT_LOCK(object); - vm_page_lock_queues(); ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; @@ -1044,6 +1049,7 @@ rescan0: VM_OBJECT_LOCK(object); vm_page_lock(m); vm_page_lock_queues(); + queues_locked = TRUE; /* * The page might have been moved to another * queue during potential blocking in vget() @@ -1081,6 +1087,8 @@ rescan0: vnodes_skipped++; goto unlock_and_continue; } + vm_page_unlock_queues(); + queues_locked = FALSE; } /* @@ -1093,32 +1101,37 @@ rescan0: * the (future) cleaned page. Otherwise we could wind * up laundering or cleaning too many pages. */ - vm_page_unlock_queues(); if (vm_pageout_clean(m) != 0) { --page_shortage; --maxlaunder; } - vm_page_lock_queues(); unlock_and_continue: vm_page_lock_assert(m, MA_NOTOWNED); VM_OBJECT_UNLOCK(object); if (mp != NULL) { - vm_page_unlock_queues(); + if (queues_locked) { + vm_page_unlock_queues(); + queues_locked = FALSE; + } if (vp != NULL) vput(vp); VFS_UNLOCK_GIANT(vfslocked); vm_object_deallocate(object); vn_finished_write(mp); - vm_page_lock_queues(); } - next = TAILQ_NEXT(&marker, pageq); - TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl, - &marker, pageq); vm_page_lock_assert(m, MA_NOTOWNED); - continue; + goto relock_queues; } vm_page_unlock(m); VM_OBJECT_UNLOCK(object); +relock_queues: + if (!queues_locked) { + vm_page_lock_queues(); + queues_locked = TRUE; + } + next = TAILQ_NEXT(&marker, pageq); + TAILQ_REMOVE(&vm_page_queues[PQ_INACTIVE].pl, + &marker, pageq); } /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 16:47:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBB4A106566C; Wed, 5 Sep 2012 16:47:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C72628FC0A; Wed, 5 Sep 2012 16:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85Gl00P070330; Wed, 5 Sep 2012 16:47:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85Gl0VJ070328; Wed, 5 Sep 2012 16:47:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209051647.q85Gl0VJ070328@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 16:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240143 - stable/9/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, 05 Sep 2012 16:47:01 -0000 Author: kib Date: Wed Sep 5 16:47:00 2012 New Revision: 240143 URL: http://svn.freebsd.org/changeset/base/240143 Log: MFC r238604: Do not restart scan of the inactive queue when non-inactive page is found. Rather, we shall not find such pages on inactive queue at all. Modified: stable/9/sys/vm/vm_pageout.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_pageout.c ============================================================================== --- stable/9/sys/vm/vm_pageout.c Wed Sep 5 16:35:37 2012 (r240142) +++ stable/9/sys/vm/vm_pageout.c Wed Sep 5 16:47:00 2012 (r240143) @@ -786,7 +786,6 @@ vm_pageout_scan(int pass) maxlaunder = 10000; vm_page_lock_queues(); queues_locked = TRUE; -rescan0: addl_page_shortage = addl_page_shortage_init; maxscan = cnt.v_inactive_count; @@ -795,12 +794,9 @@ rescan0: m = next) { KASSERT(queues_locked, ("unlocked queues")); mtx_assert(&vm_page_queue_mtx, MA_OWNED); + KASSERT(m->queue == PQ_INACTIVE, ("Inactive queue %p", m)); cnt.v_pdpages++; - - if (m->queue != PQ_INACTIVE) - goto rescan0; - next = TAILQ_NEXT(m, pageq); /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 17:13:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2E7B106564A; Wed, 5 Sep 2012 17:13:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEAD68FC15; Wed, 5 Sep 2012 17:13:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85HD8DL073284; Wed, 5 Sep 2012 17:13:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85HD8xr073281; Wed, 5 Sep 2012 17:13:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209051713.q85HD8xr073281@svn.freebsd.org> From: Dimitry Andric Date: Wed, 5 Sep 2012 17:13: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: r240144 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 17:13:09 -0000 Author: dim Date: Wed Sep 5 17:13:08 2012 New Revision: 240144 URL: http://svn.freebsd.org/changeset/base/240144 Log: After r240104, make sure the hpt27xx driver also compiles with clang, when it is statically linked into the kernel. MFC after: 2 weeks X-MFC-With: r240104 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Sep 5 16:47:00 2012 (r240143) +++ head/sys/conf/files.amd64 Wed Sep 5 17:13:08 2012 (r240144) @@ -190,7 +190,8 @@ dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard dev/hpt27xx/os_bsd.c optional hpt27xx -dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx \ + compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}" dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Sep 5 16:47:00 2012 (r240143) +++ head/sys/conf/files.i386 Wed Sep 5 17:13:08 2012 (r240144) @@ -181,7 +181,8 @@ dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb dev/hpt27xx/os_bsd.c optional hpt27xx -dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx \ + compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}" dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:19:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59A2106564A; Wed, 5 Sep 2012 18:19:54 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C10608FC0C; Wed, 5 Sep 2012 18:19:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85IJsg3080770; Wed, 5 Sep 2012 18:19:54 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85IJsA6080768; Wed, 5 Sep 2012 18:19:54 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209051819.q85IJsA6080768@svn.freebsd.org> From: Andrey Zonov Date: Wed, 5 Sep 2012 18:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240145 - 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, 05 Sep 2012 18:19:54 -0000 Author: zont Date: Wed Sep 5 18:19:54 2012 New Revision: 240145 URL: http://svn.freebsd.org/changeset/base/240145 Log: - Simplify VM code by using vmspace_wired_count() for counting wired memory of a process. Reviewed by: avg Approved by: kib (mentor) MFC after: 2 weeks Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Sep 5 17:13:08 2012 (r240144) +++ head/sys/vm/vm_mmap.c Wed Sep 5 18:19:54 2012 (r240145) @@ -1050,8 +1050,7 @@ sys_mlock(td, uap) return (ENOMEM); proc = td->td_proc; PROC_LOCK(proc); - nsize = ptoa(npages + - pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map))); + nsize = ptoa(npages + vmspace_wired_count(proc->p_vmspace)); if (nsize > lim_cur(proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(proc); return (ENOMEM); @@ -1072,7 +1071,7 @@ sys_mlock(td, uap) if (error != KERN_SUCCESS) { PROC_LOCK(proc); racct_set(proc, RACCT_MEMLOCK, - ptoa(pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map)))); + ptoa(vmspace_wired_count(proc->p_vmspace))); PROC_UNLOCK(proc); } #endif @@ -1148,7 +1147,7 @@ sys_mlockall(td, uap) if (error != KERN_SUCCESS) { PROC_LOCK(td->td_proc); racct_set(td->td_proc, RACCT_MEMLOCK, - ptoa(pmap_wired_count(vm_map_pmap(&td->td_proc->p_vmspace->vm_map)))); + ptoa(vmspace_wired_count(td->td_proc->p_vmspace))); PROC_UNLOCK(td->td_proc); } #endif From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:27:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7C8C106566B; Wed, 5 Sep 2012 18:27:45 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D06848FC18; Wed, 5 Sep 2012 18:27:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85IRjjH081766; Wed, 5 Sep 2012 18:27:45 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85IRjhk081764; Wed, 5 Sep 2012 18:27:45 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209051827.q85IRjhk081764@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 Sep 2012 18:27: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: r240146 - head/usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 18:27:46 -0000 Author: gavin Date: Wed Sep 5 18:27:45 2012 New Revision: 240146 URL: http://svn.freebsd.org/changeset/base/240146 Log: - If the PCIe "SLOT" flag is set, include this in the capability output - Fix printing of PCIe interrupt number, the shift was incorrect. MFC after: 1 week Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Wed Sep 5 18:19:54 2012 (r240145) +++ head/usr.sbin/pciconf/cap.c Wed Sep 5 18:27:45 2012 (r240146) @@ -403,8 +403,10 @@ cap_express(int fd, struct pci_conf *p, printf("type %d", (flags & PCIM_EXP_FLAGS_TYPE) >> 4); break; } + if (flags & PCIM_EXP_FLAGS_SLOT) + printf(" slot"); if (flags & PCIM_EXP_FLAGS_IRQ) - printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 8); + printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 9); val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CAP, 4); flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CTL, 2); printf(" max data %d(%d)", From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:31:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D95106564A; Wed, 5 Sep 2012 18:31:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1E98FC14; Wed, 5 Sep 2012 18:31:20 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B4E2C46B09; Wed, 5 Sep 2012 14:31:19 -0400 (EDT) Date: Wed, 5 Sep 2012 19:31:19 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bjoern A. Zeeb" In-Reply-To: Message-ID: References: <201209011033.q81AXsGb094283@svn.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 Cc: Mikolaj Golub , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r239983 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 18:31:20 -0000 On Wed, 5 Sep 2012, Bjoern A. Zeeb wrote: >> Log: >> MFC r239075: >> >> In tcp timers, check INP_DROPPED flag a little later, after >> callout_deactivate(), so if INP_DROPPED is set we return with the >> timer active flag cleared. >> >> For me this fixes negative keep timer values reported by `netstat -x' >> for connections in CLOSE state. > > panic: Lock tcp not read locked @ /w/src/sys/netinet/tcp_timer.c:497 > > reproducable on the cluster. Probably wrong all the way up to HEAD? This looks like a mis-merge -- in 8.x, read-locking of the inpcbinfo is not used in the TCP timer code, whereas in 9.x and later it is. There are important and subtle differences between inpcb/inpcb/inpcbhash locking across all supported major FreeBSD versions, as we have substantially refined our approach to improve performance and stability over the years. As a result, it is generally not safe to MFC TCP/UDP locking changes without extreme care. I would recommend seeking at least one, if not multiple, reviewers for changes and MFCs along these lines. Even with you and others doing line-by-line reviews of much of the original work, we ran into quite a few bugs due to the complexity and difficulty in reviewing the code. Robert > > >> Modified: >> stable/8/sys/netinet/tcp_timer.c >> Directory Properties: >> stable/8/sys/ (props changed) >> >> Modified: stable/8/sys/netinet/tcp_timer.c >> ============================================================================== >> --- stable/8/sys/netinet/tcp_timer.c Sat Sep 1 10:32:40 2012 >> (r239982) >> +++ stable/8/sys/netinet/tcp_timer.c Sat Sep 1 10:33:53 2012 >> (r239983) >> @@ -176,13 +176,18 @@ tcp_timer_delack(void *xtp) >> return; >> } >> INP_WLOCK(inp); >> - if ((inp->inp_flags & INP_DROPPED) || >> callout_pending(&tp->t_timers->tt_delack) >> - || !callout_active(&tp->t_timers->tt_delack)) { >> + if (callout_pending(&tp->t_timers->tt_delack) || >> + !callout_active(&tp->t_timers->tt_delack)) { >> INP_WUNLOCK(inp); >> CURVNET_RESTORE(); >> return; >> } >> callout_deactivate(&tp->t_timers->tt_delack); >> + if ((inp->inp_flags & INP_DROPPED) != 0) { >> + INP_WUNLOCK(inp); >> + CURVNET_RESTORE(); >> + return; >> + } >> >> tp->t_flags |= TF_ACKNOW; >> TCPSTAT_INC(tcps_delack); >> @@ -222,7 +227,7 @@ tcp_timer_2msl(void *xtp) >> } >> INP_WLOCK(inp); >> tcp_free_sackholes(tp); >> - if ((inp->inp_flags & INP_DROPPED) || >> callout_pending(&tp->t_timers->tt_2msl) || >> + if (callout_pending(&tp->t_timers->tt_2msl) || >> !callout_active(&tp->t_timers->tt_2msl)) { >> INP_WUNLOCK(tp->t_inpcb); >> INP_INFO_WUNLOCK(&V_tcbinfo); >> @@ -230,6 +235,12 @@ tcp_timer_2msl(void *xtp) >> return; >> } >> callout_deactivate(&tp->t_timers->tt_2msl); >> + if ((inp->inp_flags & INP_DROPPED) != 0) { >> + INP_WUNLOCK(inp); >> + INP_INFO_WUNLOCK(&V_tcbinfo); >> + CURVNET_RESTORE(); >> + return; >> + } >> /* >> * 2 MSL timeout in shutdown went off. If we're closed but >> * still waiting for peer to close and connection has been idle >> @@ -293,14 +304,20 @@ tcp_timer_keep(void *xtp) >> return; >> } >> INP_WLOCK(inp); >> - if ((inp->inp_flags & INP_DROPPED) || >> callout_pending(&tp->t_timers->tt_keep) >> - || !callout_active(&tp->t_timers->tt_keep)) { >> + if (callout_pending(&tp->t_timers->tt_keep) || >> + !callout_active(&tp->t_timers->tt_keep)) { >> INP_WUNLOCK(inp); >> INP_INFO_WUNLOCK(&V_tcbinfo); >> CURVNET_RESTORE(); >> return; >> } >> callout_deactivate(&tp->t_timers->tt_keep); >> + if ((inp->inp_flags & INP_DROPPED) != 0) { >> + INP_WUNLOCK(inp); >> + INP_INFO_WUNLOCK(&V_tcbinfo); >> + CURVNET_RESTORE(); >> + return; >> + } >> /* >> * Keep-alive timer went off; send something >> * or drop connection if idle for too long. >> @@ -388,14 +405,20 @@ tcp_timer_persist(void *xtp) >> return; >> } >> INP_WLOCK(inp); >> - if ((inp->inp_flags & INP_DROPPED) || >> callout_pending(&tp->t_timers->tt_persist) >> - || !callout_active(&tp->t_timers->tt_persist)) { >> + if (callout_pending(&tp->t_timers->tt_persist) || >> + !callout_active(&tp->t_timers->tt_persist)) { >> INP_WUNLOCK(inp); >> INP_INFO_WUNLOCK(&V_tcbinfo); >> CURVNET_RESTORE(); >> return; >> } >> callout_deactivate(&tp->t_timers->tt_persist); >> + if ((inp->inp_flags & INP_DROPPED) != 0) { >> + INP_WUNLOCK(inp); >> + INP_INFO_WUNLOCK(&V_tcbinfo); >> + CURVNET_RESTORE(); >> + return; >> + } >> /* >> * Persistance timer into zero window. >> * Force a byte to be output, if possible. >> @@ -461,14 +484,20 @@ tcp_timer_rexmt(void * xtp) >> return; >> } >> INP_WLOCK(inp); >> - if ((inp->inp_flags & INP_DROPPED) || >> callout_pending(&tp->t_timers->tt_rexmt) >> - || !callout_active(&tp->t_timers->tt_rexmt)) { >> + if (callout_pending(&tp->t_timers->tt_rexmt) || >> + !callout_active(&tp->t_timers->tt_rexmt)) { >> INP_WUNLOCK(inp); >> INP_INFO_WUNLOCK(&V_tcbinfo); >> CURVNET_RESTORE(); >> return; >> } >> callout_deactivate(&tp->t_timers->tt_rexmt); >> + if ((inp->inp_flags & INP_DROPPED) != 0) { >> + INP_WUNLOCK(inp); >> + INP_INFO_RUNLOCK(&V_tcbinfo); >> + CURVNET_RESTORE(); >> + return; >> + } >> tcp_free_sackholes(tp); >> /* >> * Retransmission timer went off. Message has not >> > > -- > Bjoern A. Zeeb You have to have visions! > Stop bit received. Insert coin for new address family. > From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:49:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A79BD106566C; Wed, 5 Sep 2012 18:49:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91C958FC0A; Wed, 5 Sep 2012 18:49:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85In0WJ084693; Wed, 5 Sep 2012 18:49:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85In0II084690; Wed, 5 Sep 2012 18:49:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209051849.q85In0II084690@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 18:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240147 - stable/9/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, 05 Sep 2012 18:49:00 -0000 Author: kib Date: Wed Sep 5 18:49:00 2012 New Revision: 240147 URL: http://svn.freebsd.org/changeset/base/240147 Log: MFC r238732 (by alc): Addendum to r238604. If the inactive queue scan isn't restarted, then the variable "addl_page_shortage_init" isn't needed. Modified: stable/9/sys/vm/vm_pageout.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_pageout.c ============================================================================== --- stable/9/sys/vm/vm_pageout.c Wed Sep 5 18:27:45 2012 (r240146) +++ stable/9/sys/vm/vm_pageout.c Wed Sep 5 18:49:00 2012 (r240147) @@ -738,7 +738,7 @@ vm_pageout_scan(int pass) vm_page_t m, next; struct vm_page marker; int page_shortage, maxscan, pcount; - int addl_page_shortage, addl_page_shortage_init; + int addl_page_shortage; vm_object_t object; int actcount; int vnodes_skipped = 0; @@ -754,13 +754,13 @@ vm_pageout_scan(int pass) */ uma_reclaim(); - addl_page_shortage_init = atomic_readandclear_int(&vm_pageout_deficit); + addl_page_shortage = atomic_readandclear_int(&vm_pageout_deficit); /* * Calculate the number of pages we want to either free or move * to the cache. */ - page_shortage = vm_paging_target() + addl_page_shortage_init; + page_shortage = vm_paging_target() + addl_page_shortage; vm_pageout_init_marker(&marker, PQ_INACTIVE); @@ -786,7 +786,6 @@ vm_pageout_scan(int pass) maxlaunder = 10000; vm_page_lock_queues(); queues_locked = TRUE; - addl_page_shortage = addl_page_shortage_init; maxscan = cnt.v_inactive_count; for (m = TAILQ_FIRST(&vm_page_queues[PQ_INACTIVE].pl); From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:52:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 046B6106566B; Wed, 5 Sep 2012 18:52:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2D6C8FC1E; Wed, 5 Sep 2012 18:52:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85Iq1pr085181; Wed, 5 Sep 2012 18:52:01 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85Iq1Pm085170; Wed, 5 Sep 2012 18:52:01 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209051852.q85Iq1Pm085170@svn.freebsd.org> From: Michael Tuexen Date: Wed, 5 Sep 2012 18:52: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: r240148 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 18:52:02 -0000 Author: tuexen Date: Wed Sep 5 18:52:01 2012 New Revision: 240148 URL: http://svn.freebsd.org/changeset/base/240148 Log: Using %p in a format string requires a void *. MFC after: 10 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_asconf.c Wed Sep 5 18:52:01 2012 (r240148) @@ -2278,7 +2278,7 @@ sctp_set_primary_ip_address_sa(struct sc /* set primary queuing succeeded */ SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address_sa: queued on tcb=%p, ", - stcb); + (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { #ifdef SCTP_TIMER_BASED_ASCONF @@ -2291,7 +2291,7 @@ sctp_set_primary_ip_address_sa(struct sc } } else { SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address_sa: failed to add to queue on tcb=%p, ", - stcb); + (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); return (-1); } @@ -2314,7 +2314,7 @@ sctp_set_primary_ip_address(struct sctp_ SCTP_SET_PRIM_ADDR)) { /* set primary queuing succeeded */ SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address: queued on stcb=%p, ", - stcb); + (void *)stcb); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &ifa->address.sa); if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) { #ifdef SCTP_TIMER_BASED_ASCONF Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_auth.c Wed Sep 5 18:52:01 2012 (r240148) @@ -591,7 +591,7 @@ sctp_auth_key_acquire(struct sctp_tcb *s atomic_add_int(&skey->refcount, 1); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u refcount acquire to %d\n", - __FUNCTION__, stcb, key_id, skey->refcount); + __FUNCTION__, (void *)stcb, key_id, skey->refcount); } } @@ -612,7 +612,7 @@ sctp_auth_key_release(struct sctp_tcb *s sctp_free_sharedkey(skey); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u refcount release to %d\n", - __FUNCTION__, stcb, key_id, skey->refcount); + __FUNCTION__, (void *)stcb, key_id, skey->refcount); /* see if a notification should be generated */ if ((skey->refcount <= 1) && (skey->deactivated)) { @@ -621,7 +621,7 @@ sctp_auth_key_release(struct sctp_tcb *s key_id, 0, so_locked); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u no longer used, %d\n", - __FUNCTION__, stcb, key_id, skey->refcount); + __FUNCTION__, (void *)stcb, key_id, skey->refcount); } } } Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_cc_functions.c Wed Sep 5 18:52:01 2012 (r240148) @@ -984,7 +984,7 @@ sctp_cwnd_update_exit_pf_common(struct s stcb->asoc.my_vtag, ((stcb->sctp_ep->sctp_lport << 16) | (stcb->rport)), net, old_cwnd, net->cwnd); SCTPDBG(SCTP_DEBUG_INDATA1, "Destination %p moved from PF to reachable with cwnd %d.\n", - net, net->cwnd); + (void *)net, net->cwnd); } Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_indata.c Wed Sep 5 18:52:01 2012 (r240148) @@ -4420,7 +4420,7 @@ sctp_handle_sack(struct mbuf *m, int off cum_ack, send_s); if (tp1) { SCTP_PRINTF("Got send_s from tsn:%x + 1 of tp1:%p\n", - tp1->rec.data.TSN_seq, tp1); + tp1->rec.data.TSN_seq, (void *)tp1); } hopeless_peer: *abort_now = 1; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_input.c Wed Sep 5 18:52:01 2012 (r240148) @@ -91,7 +91,7 @@ sctp_handle_init(struct mbuf *m, int iph struct mbuf *op_err; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_init: handling INIT tcb:%p\n", - stcb); + (void *)stcb); if (stcb == NULL) { SCTP_INP_RLOCK(inp); } @@ -2652,7 +2652,7 @@ sctp_handle_cookie_echo(struct mbuf *m, SCTP_INP_INCR_REF((*stcb)->sctp_ep); if ((*stcb)->sctp_ep != l_inp) { SCTP_PRINTF("Huh? ep:%p diff then l_inp:%p?\n", - (*stcb)->sctp_ep, l_inp); + (void *)(*stcb)->sctp_ep, (void *)l_inp); } } } @@ -4404,7 +4404,7 @@ __attribute__((noinline)) #endif SCTPDBG(SCTP_DEBUG_INPUT1, "sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%p\n", - iphlen, *offset, length, stcb); + iphlen, *offset, length, (void *)stcb); /* validate chunk header length... */ if (ntohs(ch->chunk_length) < sizeof(*ch)) { @@ -5023,7 +5023,7 @@ process_control_chunks: break; case SCTP_ABORT_ASSOCIATION: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_ABORT, stcb %p\n", - stcb); + (void *)stcb); if ((stcb) && netp && *netp) sctp_handle_abort((struct sctp_abort_chunk *)ch, stcb, *netp); @@ -5032,7 +5032,7 @@ process_control_chunks: break; case SCTP_SHUTDOWN: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN, stcb %p\n", - stcb); + (void *)stcb); if ((stcb == NULL) || (chk_length != sizeof(struct sctp_shutdown_chunk))) { *offset = length; if (locked_tcb) { @@ -5052,7 +5052,7 @@ process_control_chunks: } break; case SCTP_SHUTDOWN_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-ACK, stcb %p\n", stcb); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-ACK, stcb %p\n", (void *)stcb); if ((stcb) && (netp) && (*netp)) sctp_handle_shutdown_ack((struct sctp_shutdown_ack_chunk *)ch, stcb, *netp); *offset = length; @@ -5068,7 +5068,7 @@ process_control_chunks: break; case SCTP_COOKIE_ECHO: SCTPDBG(SCTP_DEBUG_INPUT3, - "SCTP_COOKIE-ECHO, stcb %p\n", stcb); + "SCTP_COOKIE-ECHO, stcb %p\n", (void *)stcb); if ((stcb) && (stcb->asoc.total_output_queue_size)) { ; } else { @@ -5170,7 +5170,7 @@ process_control_chunks: } break; case SCTP_COOKIE_ACK: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_COOKIE-ACK, stcb %p\n", stcb); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_COOKIE-ACK, stcb %p\n", (void *)stcb); if ((stcb == NULL) || chk_length != sizeof(struct sctp_cookie_ack_chunk)) { if (locked_tcb) { SCTP_TCB_UNLOCK(locked_tcb); @@ -5260,7 +5260,7 @@ process_control_chunks: } break; case SCTP_SHUTDOWN_COMPLETE: - SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-COMPLETE, stcb %p\n", stcb); + SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_SHUTDOWN-COMPLETE, stcb %p\n", (void *)stcb); /* must be first and only chunk */ if ((num_chunks > 1) || (length - *offset > (int)SCTP_SIZE32(chk_length))) { @@ -5619,7 +5619,7 @@ sctp_common_input_processing(struct mbuf sh->checksum = check; if (calc_check != check) { SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", - calc_check, check, m, length, iphlen); + calc_check, check, (void *)m, length, iphlen); stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); if ((net != NULL) && (port != 0)) { @@ -5724,13 +5724,13 @@ sctp_common_input_processing(struct mbuf } #endif SCTPDBG(SCTP_DEBUG_INPUT1, "Ok, Common input processing called, m:%p iphlen:%d offset:%d length:%d stcb:%p\n", - m, iphlen, offset, length, stcb); + (void *)m, iphlen, offset, length, (void *)stcb); if (stcb) { /* always clear this before beginning a packet */ stcb->asoc.authenticated = 0; stcb->asoc.seen_a_sack_this_pkt = 0; SCTPDBG(SCTP_DEBUG_INPUT1, "stcb:%p state:%x\n", - stcb, stcb->asoc.state); + (void *)stcb, stcb->asoc.state); if ((stcb->asoc.state & SCTP_STATE_WAS_ABORTED) || (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED)) { @@ -5968,9 +5968,9 @@ static void sctp_print_mbuf_chain(struct mbuf *m) { for (; m; m = SCTP_BUF_NEXT(m)) { - SCTP_PRINTF("%p: m_len = %ld\n", m, SCTP_BUF_LEN(m)); + SCTP_PRINTF("%p: m_len = %ld\n", (void *)m, SCTP_BUF_LEN(m)); if (SCTP_BUF_IS_EXTENDED(m)) - SCTP_PRINTF("%p: extend_size = %d\n", m, SCTP_BUF_EXTEND_SIZE(m)); + SCTP_PRINTF("%p: extend_size = %d\n", (void *)m, SCTP_BUF_EXTEND_SIZE(m)); } } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_output.c Wed Sep 5 18:52:01 2012 (r240148) @@ -2985,7 +2985,7 @@ bound_all_plan_b: } SCTPDBG(SCTP_DEBUG_OUTPUT2, "num preferred:%d on interface:%p cur_addr_num:%d\n", - num_preferred, sctp_ifn, cur_addr_num); + num_preferred, (void *)sctp_ifn, cur_addr_num); /* * Ok we have num_eligible_addr set with how many we can @@ -3022,7 +3022,7 @@ again_with_private_addresses_allowed: goto plan_d; } LIST_FOREACH(sctp_ifa, &emit_ifn->ifalist, next_ifa) { - SCTPDBG(SCTP_DEBUG_OUTPUT2, "ifa:%p\n", sctp_ifa); + SCTPDBG(SCTP_DEBUG_OUTPUT2, "ifa:%p\n", (void *)sctp_ifa); if ((sctp_ifa->localifa_flags & SCTP_ADDR_DEFER_USE) && (non_asoc_addr_ok == 0)) { SCTPDBG(SCTP_DEBUG_OUTPUT2, "Defer\n"); @@ -3072,7 +3072,7 @@ plan_d: * out and see if we can find an acceptable address somewhere * amongst all interfaces. */ - SCTPDBG(SCTP_DEBUG_OUTPUT2, "Trying Plan D looked_at is %p\n", looked_at); + SCTPDBG(SCTP_DEBUG_OUTPUT2, "Trying Plan D looked_at is %p\n", (void *)looked_at); LIST_FOREACH(sctp_ifn, &vrf->ifnlist, next_ifn) { if (dest_is_loop == 0 && SCTP_IFN_IS_IFT_LOOP(sctp_ifn)) { /* wrong base scope */ @@ -3812,7 +3812,7 @@ sctp_handle_no_route(struct sctp_tcb *st SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT1, &net->ro._l_addr.sa); if (net->dest_state & SCTP_ADDR_CONFIRMED) { if ((net->dest_state & SCTP_ADDR_REACHABLE) && stcb) { - SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", net); + SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", (void *)net); sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, (void *)net, @@ -4106,7 +4106,7 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTPDBG(SCTP_DEBUG_OUTPUT3, "Destination is %x\n", (uint32_t) (ntohl(ip->ip_dst.s_addr))); SCTPDBG(SCTP_DEBUG_OUTPUT3, "RTP route is %p through\n", - ro->ro_rt); + (void *)ro->ro_rt); if (SCTP_GET_HEADER_FOR_OUTPUT(o_pak)) { /* failed to prepend data, give up */ @@ -12157,7 +12157,7 @@ sctp_lower_sosend(struct socket *so, sndlen = SCTP_HEADER_LEN(i_pak); } SCTPDBG(SCTP_DEBUG_OUTPUT1, "Send called addr:%p send length %d\n", - addr, + (void *)addr, sndlen); if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (inp->sctp_socket->so_qlimit)) { Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_pcb.c Wed Sep 5 18:52:01 2012 (r240148) @@ -553,7 +553,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo (sctp_ifap->ifn_p->ifn_index == ifn_index)) { SCTPDBG(SCTP_DEBUG_PCB4, "Using existing ifn %s (0x%x) for ifa %p\n", sctp_ifap->ifn_p->ifn_name, ifn_index, - sctp_ifap); + (void *)sctp_ifap); if (new_ifn_af) { /* Remove the created one that we don't want */ sctp_delete_ifn(sctp_ifnp, SCTP_ADDR_LOCKED); @@ -575,7 +575,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo * old one */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", - sctp_ifap, sctp_ifap->ifn_p->ifn_name, + (void *)sctp_ifap, sctp_ifap->ifn_p->ifn_name, sctp_ifap->ifn_p->ifn_index, if_name, ifn_index); /* remove the address from the old ifn */ @@ -587,7 +587,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo /* repair ifnp which was NULL ? */ sctp_ifap->localifa_flags = SCTP_ADDR_VALID; SCTPDBG(SCTP_DEBUG_PCB4, "Repairing ifn %p for ifa %p\n", - sctp_ifnp, sctp_ifap); + (void *)sctp_ifnp, (void *)sctp_ifap); sctp_add_ifa_to_ifn(sctp_ifnp, sctp_ifap); } goto exit_stage_left; @@ -763,7 +763,7 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, return; } } - SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", sctp_ifap); + SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", (void *)sctp_ifap); sctp_ifap->localifa_flags &= SCTP_ADDR_VALID; sctp_ifap->localifa_flags |= SCTP_BEING_DELETED; vrf->total_ifa_count--; @@ -1678,7 +1678,7 @@ sctp_endpoint_probe(struct sockaddr *nam continue; } SCTPDBG(SCTP_DEBUG_PCB1, "Ok laddr->ifa:%p is possible, ", - laddr->ifa); + (void *)laddr->ifa); if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) { SCTPDBG(SCTP_DEBUG_PCB1, "Huh IFA being deleted\n"); continue; @@ -2181,7 +2181,7 @@ sctp_findassociation_addr(struct mbuf *m retval = sctp_findassociation_addr_sa(src, dst, &inp, netp, find_tcp_pool, vrf_id); } - SCTPDBG(SCTP_DEBUG_PCB1, "retval:%p inp:%p\n", retval, inp); + SCTPDBG(SCTP_DEBUG_PCB1, "retval:%p inp:%p\n", (void *)retval, (void *)inp); if (retval == NULL && inp) { /* Found a EP but not this address */ if ((ch->chunk_type == SCTP_INITIATION) || @@ -2207,7 +2207,7 @@ sctp_findassociation_addr(struct mbuf *m } } } - SCTPDBG(SCTP_DEBUG_PCB1, "retval is %p\n", retval); + SCTPDBG(SCTP_DEBUG_PCB1, "retval is %p\n", (void *)retval); return (retval); } @@ -3100,7 +3100,7 @@ continue_anyway: /* put it in the bucket */ LIST_INSERT_HEAD(head, inp, sctp_hash); SCTPDBG(SCTP_DEBUG_PCB1, "Main hash to bind at head:%p, bound port:%d - in tcp_pool=%d\n", - head, ntohs(lport), port_reuse_active); + (void *)head, ntohs(lport), port_reuse_active); /* set in the port */ inp->sctp_lport = lport; @@ -3368,7 +3368,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, sctp_streamhead); if (sp == NULL) { SCTP_PRINTF("Error, sp is NULL, locked on sending is %p strm:%d\n", - asoc->asoc.locked_on_sending, + (void *)asoc->asoc.locked_on_sending, asoc->asoc.locked_on_sending->stream_no); } else { if ((sp->length == 0) && (sp->msg_is_complete == 0)) @@ -4341,7 +4341,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, LIST_INSERT_HEAD(head, stcb, sctp_tcbhash); } SCTP_INP_WUNLOCK(inp); - SCTPDBG(SCTP_DEBUG_PCB1, "Association %p now allocated\n", stcb); + SCTPDBG(SCTP_DEBUG_PCB1, "Association %p now allocated\n", (void *)stcb); return (stcb); } Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctp_timer.c Wed Sep 5 18:52:01 2012 (r240148) @@ -90,7 +90,7 @@ sctp_threshold_management(struct sctp_in if (net) { net->error_count++; SCTPDBG(SCTP_DEBUG_TIMER4, "Error count for %p now %d thresh:%d\n", - net, net->error_count, + (void *)net, net->error_count, net->failure_threshold); if (net->error_count > net->failure_threshold) { /* We had a threshold failure */ @@ -138,7 +138,7 @@ sctp_threshold_management(struct sctp_in stcb->asoc.overall_error_count++; } SCTPDBG(SCTP_DEBUG_TIMER4, "Overall error count for %p now %d thresh:%u state:%x\n", - &stcb->asoc, stcb->asoc.overall_error_count, + (void *)&stcb->asoc, stcb->asoc.overall_error_count, (uint32_t) threshold, ((net == NULL) ? (uint32_t) 0 : (uint32_t) net->dest_state)); /* @@ -439,7 +439,7 @@ sctp_recover_sent_list(struct sctp_tcb * TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { if (SCTP_TSN_GE(asoc->last_acked_seq, chk->rec.data.TSN_seq)) { SCTP_PRINTF("Found chk:%p tsn:%x <= last_acked_seq:%x\n", - chk, chk->rec.data.TSN_seq, asoc->last_acked_seq); + (void *)chk, chk->rec.data.TSN_seq, asoc->last_acked_seq); TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); if (chk->pr_sctp_on) { if (asoc->pr_sctp_cnt != 0) @@ -460,7 +460,7 @@ sctp_recover_sent_list(struct sctp_tcb * } SCTP_PRINTF("after recover order is as follows\n"); TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { - SCTP_PRINTF("chk:%p TSN:%x\n", chk, chk->rec.data.TSN_seq); + SCTP_PRINTF("chk:%p TSN:%x\n", (void *)chk, chk->rec.data.TSN_seq); } } @@ -767,7 +767,7 @@ start_again: if (audit_tf) { SCTPDBG(SCTP_DEBUG_TIMER4, "Audit total flight due to negative value net:%p\n", - net); + (void *)net); stcb->asoc.total_flight = 0; stcb->asoc.total_flight_count = 0; /* Clear all networks flight size */ @@ -775,7 +775,7 @@ start_again: lnets->flight_size = 0; SCTPDBG(SCTP_DEBUG_TIMER4, "Net:%p c-f cwnd:%d ssthresh:%d\n", - lnets, lnets->cwnd, lnets->ssthresh); + (void *)lnets, lnets->cwnd, lnets->ssthresh); } TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { if (chk->sent < SCTP_DATAGRAM_RESEND) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Sep 5 18:49:00 2012 (r240147) +++ head/sys/netinet/sctputil.c Wed Sep 5 18:52:01 2012 (r240148) @@ -686,7 +686,7 @@ sctp_auditing(int from, struct sctp_inpc } if (lnet->flight_size != tot_out) { SCTP_PRINTF("net:%p flight was %d corrected to %d\n", - lnet, lnet->flight_size, + (void *)lnet, lnet->flight_size, tot_out); lnet->flight_size = tot_out; } @@ -1434,7 +1434,7 @@ sctp_timeout_handler(void *t) if (tmr->self != (void *)tmr) { /* * SCTP_PRINTF("Stale SCTP timer fired (%p), ignoring...\n", - * tmr); + * (void *)tmr); */ CURVNET_RESTORE(); return; @@ -2112,7 +2112,7 @@ sctp_timer_start(int t_type, struct sctp } if ((to_ticks <= 0) || (tmr == NULL)) { SCTPDBG(SCTP_DEBUG_TIMER1, "%s: %d:software error to_ticks:%d tmr:%p not set ??\n", - __FUNCTION__, t_type, to_ticks, tmr); + __FUNCTION__, t_type, to_ticks, (void *)tmr); return; } if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 18:55:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1CDF1065670; Wed, 5 Sep 2012 18:55:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3C08FC08; Wed, 5 Sep 2012 18:55:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85ItZPY085678; Wed, 5 Sep 2012 18:55:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85ItZYB085676; Wed, 5 Sep 2012 18:55:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209051855.q85ItZYB085676@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 18:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240149 - stable/9/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, 05 Sep 2012 18:55:35 -0000 Author: kib Date: Wed Sep 5 18:55:35 2012 New Revision: 240149 URL: http://svn.freebsd.org/changeset/base/240149 Log: MFC r238791: Do not requeue held page or page for which locking failed, just leave them alone. Process the act_count updates for the held pages in the vm_pageout loop over the inactive queue, instead of refusing to do anything with such page. Clarify the intent of the addl_page_shortage counter and change its use for pages which are not processed in the loop according to the description. Modified: stable/9/sys/vm/vm_pageout.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_pageout.c ============================================================================== --- stable/9/sys/vm/vm_pageout.c Wed Sep 5 18:52:01 2012 (r240148) +++ stable/9/sys/vm/vm_pageout.c Wed Sep 5 18:55:35 2012 (r240149) @@ -754,6 +754,12 @@ vm_pageout_scan(int pass) */ uma_reclaim(); + /* + * The addl_page_shortage is the the number of temporarily + * stuck pages in the inactive queue. In other words, the + * number of pages from cnt.v_inactive_count that should be + * discounted in setting the target for the active queue scan. + */ addl_page_shortage = atomic_readandclear_int(&vm_pageout_deficit); /* @@ -810,38 +816,31 @@ vm_pageout_scan(int pass) ("Unmanaged page %p cannot be in inactive queue", m)); /* - * Lock the page. + * The page or object lock acquisitions fail if the + * page was removed from the queue or moved to a + * different position within the queue. In either + * case, addl_page_shortage should not be incremented. */ if (!vm_pageout_page_lock(m, &next)) { vm_page_unlock(m); - addl_page_shortage++; continue; } - - /* - * A held page may be undergoing I/O, so skip it. - */ - if (m->hold_count) { + object = m->object; + if (!VM_OBJECT_TRYLOCK(object) && + !vm_pageout_fallback_object_lock(m, &next)) { vm_page_unlock(m); - vm_page_requeue(m); - addl_page_shortage++; + VM_OBJECT_UNLOCK(object); continue; } /* - * Don't mess with busy pages, keep in the front of the - * queue, most likely are being paged out. + * Don't mess with busy pages, keep them at at the + * front of the queue, most likely they are being + * paged out. Increment addl_page_shortage for busy + * pages, because they may leave the inactive queue + * shortly after page scan is finished. */ - object = m->object; - if (!VM_OBJECT_TRYLOCK(object) && - (!vm_pageout_fallback_object_lock(m, &next) || - m->hold_count != 0)) { - VM_OBJECT_UNLOCK(object); - vm_page_unlock(m); - addl_page_shortage++; - continue; - } - if (m->busy || (m->oflags & VPO_BUSY)) { + if (m->busy != 0 || (m->oflags & VPO_BUSY) != 0) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); addl_page_shortage++; @@ -901,6 +900,21 @@ vm_pageout_scan(int pass) goto relock_queues; } + if (m->hold_count != 0) { + vm_page_unlock(m); + VM_OBJECT_UNLOCK(object); + + /* + * Held pages are essentially stuck in the + * queue. So, they ought to be discounted + * from cnt.v_inactive_count. See the + * calculation of the page_shortage for the + * loop over the active queue below. + */ + addl_page_shortage++; + goto relock_queues; + } + /* * If the upper level VM system does not believe that the page * is fully dirty, but it is mapped for write access, then we From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 19:01:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17AC4106564A; Wed, 5 Sep 2012 19:01:40 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDA288FC0C; Wed, 5 Sep 2012 19:01:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85J1dPL086505; Wed, 5 Sep 2012 19:01:39 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85J1d7u086503; Wed, 5 Sep 2012 19:01:39 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209051901.q85J1d7u086503@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 Sep 2012 19:01: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: r240150 - 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: Wed, 05 Sep 2012 19:01:40 -0000 Author: gavin Date: Wed Sep 5 19:01:39 2012 New Revision: 240150 URL: http://svn.freebsd.org/changeset/base/240150 Log: Add #defines for the bits in the PCI Express SLOT registers. Names have been chosen based on the bit names in the PCI Express Base Specification 3.0, and to match the predominant style of the existing bit definitions. MFC after: 1 week Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Wed Sep 5 18:55:35 2012 (r240149) +++ head/sys/dev/pci/pcireg.h Wed Sep 5 19:01:39 2012 (r240150) @@ -663,8 +663,40 @@ #define PCIM_LINK_STA_TRAINING 0x0800 #define PCIM_LINK_STA_SLOT_CLOCK 0x1000 #define PCIR_EXPRESS_SLOT_CAP 0x14 +#define PCIM_EXP_SLOT_CAP_APB 0x00000001 +#define PCIM_EXP_SLOT_CAP_PCP 0x00000002 +#define PCIM_EXP_SLOT_CAP_MRLSP 0x00000004 +#define PCIM_EXP_SLOT_CAP_AIP 0x00000008 +#define PCIM_EXP_SLOT_CAP_PIP 0x00000010 +#define PCIM_EXP_SLOT_CAP_HPS 0x00000020 +#define PCIM_EXP_SLOT_CAP_HPC 0x00000040 +#define PCIM_EXP_SLOT_CAP_SPLV 0x00007f80 +#define PCIM_EXP_SLOT_CAP_SPLS 0x00018000 +#define PCIM_EXP_SLOT_CAP_EIP 0x00020000 +#define PCIM_EXP_SLOT_CAP_NCCS 0x00040000 +#define PCIM_EXP_SLOT_CAP_PSN 0xfff80000 #define PCIR_EXPRESS_SLOT_CTL 0x18 +#define PCIM_EXP_SLOT_CTL_ABPE 0x0001 +#define PCIM_EXP_SLOT_CTL_PFDE 0x0002 +#define PCIM_EXP_SLOT_CTL_MRLSCE 0x0004 +#define PCIM_EXP_SLOT_CTL_PDCE 0x0008 +#define PCIM_EXP_SLOT_CTL_CCIE 0x0010 +#define PCIM_EXP_SLOT_CTL_HPIE 0x0020 +#define PCIM_EXP_SLOT_CTL_AIC 0x00c0 +#define PCIM_EXP_SLOT_CTL_PIC 0x0300 +#define PCIM_EXP_SLOT_CTL_PCC 0x0400 +#define PCIM_EXP_SLOT_CTL_EIC 0x0800 +#define PCIM_EXP_SLOT_CTL_DLLSCE 0x1000 #define PCIR_EXPRESS_SLOT_STA 0x1a +#define PCIM_EXP_SLOT_STA_ABP 0x0001 +#define PCIM_EXP_SLOT_STA_PFD 0x0002 +#define PCIM_EXP_SLOT_STA_MRLSC 0x0004 +#define PCIM_EXP_SLOT_STA_PDC 0x0008 +#define PCIM_EXP_SLOT_STA_CC 0x0010 +#define PCIM_EXP_SLOT_STA_MRLSS 0x0020 +#define PCIM_EXP_SLOT_STA_PDS 0x0040 +#define PCIM_EXP_SLOT_STA_EIS 0x0080 +#define PCIM_EXP_SLOT_STA_DLLSC 0x0100 #define PCIR_EXPRESS_ROOT_CTL 0x1c #define PCIR_EXPRESS_ROOT_STA 0x20 #define PCIR_EXPRESS_DEVICE_CTL2 40 From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 20:13:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CBBF106564A; Wed, 5 Sep 2012 20:13:15 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by mx1.freebsd.org (Postfix) with ESMTP id 22F688FC17; Wed, 5 Sep 2012 20:13:14 +0000 (UTC) Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0M9W00H2X85WJJ30@smtp4.clear.net.nz>; Thu, 06 Sep 2012 08:13:08 +1200 (NZST) Received: from 202-0-48-19.paradise.net.nz (HELO localhost) ([202.0.48.19]) by smtpin1.paradise.net.nz with ESMTP; Thu, 06 Sep 2012 08:13:08 +1200 Date: Thu, 06 Sep 2012 08:12:24 +1200 From: Andrew Turner In-reply-to: <07899894-3253-4F16-9CAB-8339E23D57F8@semihalf.com> To: Rafal Jaworowski Message-id: <20120906081224.3c3676c6@fubar.geek.nz> MIME-version: 1.0 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Pirate: Arrrr References: <201209020148.q821ml0M018010@svn.freebsd.org> <07899894-3253-4F16-9CAB-8339E23D57F8@semihalf.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 05 Sep 2012 20:13:15 -0000 On Tue, 4 Sep 2012 20:14:23 +0200 Rafal Jaworowski wrote: > > On 2012-09-02, at 03:48, Andrew Turner wrote: > > > Author: andrew > > Date: Sun Sep 2 01:48:47 2012 > > New Revision: 239998 > > URL: http://svn.freebsd.org/changeset/base/239998 > > > > Log: > > Fix a logic inversion in an assert to allow us to use dts files > > that include other files. > > > > Modified: > > head/contrib/dtc/dtc-lexer.l > > Is this a bug in the dtc that should be upstreamed perhaps, or is it > fixed at the point beyond our recent import of the vendor package? No, it is a local change as we are missing yypush_buffer_state and yypush_buffer_state and this code emulates them. Andrew From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 20:40:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B3F7106566B; Wed, 5 Sep 2012 20:40:12 +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 4367E8FC0A; Wed, 5 Sep 2012 20:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85KeCtO098724; Wed, 5 Sep 2012 20:40:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85KeCTe098721; Wed, 5 Sep 2012 20:40:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209052040.q85KeCTe098721@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 Sep 2012 20:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240151 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/xen kern mips/mips sparc64/sparc64 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, 05 Sep 2012 20:40:12 -0000 Author: kib Date: Wed Sep 5 20:40:11 2012 New Revision: 240151 URL: http://svn.freebsd.org/changeset/base/240151 Log: MFC r233122,r237086,r237228,r237264,r237290,r237404,r237414,r237513,r237551, r237592,r237604,r237623,r237684,r237733,r237813,r237855,r238124,r238126, r238163,r238414,r238610,r238889,r238970,r239072,r239137,r240126 (all by alc): Add fine-grained PV chunk and list locking to the amd64 pmap, enabling concurrent execution of the following functions on different pmaps: pmap_change_wiring() pmap_copy() pmap_enter() pmap_enter_object() pmap_enter_quick() pmap_page_exists_quick() pmap_page_is_mapped() pmap_protect() pmap_remove() pmap_remove_pages() Requested and approved by: alc Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/include/cpufunc.h stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c stable/9/sys/kern/subr_witness.c stable/9/sys/mips/mips/pmap.c stable/9/sys/sparc64/sparc64/pmap.c stable/9/sys/vm/vm_map.c stable/9/sys/vm/vm_page.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Wed Sep 5 19:01:39 2012 (r240150) +++ stable/9/sys/amd64/amd64/pmap.c Wed Sep 5 20:40:11 2012 (r240151) @@ -168,6 +168,39 @@ __FBSDID("$FreeBSD$"); #define pa_index(pa) ((pa) >> PDRSHIFT) #define pa_to_pvh(pa) (&pv_table[pa_index(pa)]) +#define NPV_LIST_LOCKS MAXCPU + +#define PHYS_TO_PV_LIST_LOCK(pa) \ + (&pv_list_locks[pa_index(pa) % NPV_LIST_LOCKS]) + +#define CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa) do { \ + struct rwlock **_lockp = (lockp); \ + struct rwlock *_new_lock; \ + \ + _new_lock = PHYS_TO_PV_LIST_LOCK(pa); \ + if (_new_lock != *_lockp) { \ + if (*_lockp != NULL) \ + rw_wunlock(*_lockp); \ + *_lockp = _new_lock; \ + rw_wlock(*_lockp); \ + } \ +} while (0) + +#define CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m) \ + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, VM_PAGE_TO_PHYS(m)) + +#define RELEASE_PV_LIST_LOCK(lockp) do { \ + struct rwlock **_lockp = (lockp); \ + \ + if (*_lockp != NULL) { \ + rw_wunlock(*_lockp); \ + *_lockp = NULL; \ + } \ +} while (0) + +#define VM_PAGE_TO_PV_LIST_LOCK(m) \ + PHYS_TO_PV_LIST_LOCK(VM_PAGE_TO_PHYS(m)) + struct pmap kernel_pmap_store; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ @@ -214,7 +247,8 @@ static struct { * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); -static long pv_entry_count; +static struct mtx pv_chunks_mutex; +static struct rwlock pv_list_locks[NPV_LIST_LOCKS]; static struct md_page *pv_table; /* @@ -230,10 +264,17 @@ static caddr_t crashdumpmap; static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); -static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); -static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); -static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); +static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); +static int popcnt_pc_map_elem(uint64_t elem); +static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); +static void reserve_pv_entries(pmap_t pmap, int needed, + struct rwlock **lockp); +static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp); +static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp); +static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -241,12 +282,14 @@ static int pmap_pvh_wired_mappings(struc static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static boolean_t pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, + vm_offset_t va, struct rwlock **lockp); static boolean_t pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_offset_t va); static boolean_t pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_prot_t prot); + vm_prot_t prot, struct rwlock **lockp); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, - vm_page_t m, vm_prot_t prot, vm_page_t mpte); + vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); @@ -254,32 +297,34 @@ static boolean_t pmap_is_referenced_pvh( static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); -static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + struct rwlock **lockp); static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot); static void pmap_pte_attr(pt_entry_t *pte, int cache_bits); static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, - vm_page_t *free); + vm_page_t *free, struct rwlock **lockp); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, - vm_offset_t sva, pd_entry_t ptepde, vm_page_t *free); + vm_offset_t sva, pd_entry_t ptepde, vm_page_t *free, + struct rwlock **lockp); static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, vm_page_t *free); -static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, - vm_offset_t va); -static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, - vm_page_t m); + vm_page_t m, struct rwlock **lockp); static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde); static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); -static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags); -static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); +static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, + struct rwlock **lockp); +static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, + struct rwlock **lockp); +static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, + struct rwlock **lockp); -static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, int flags); -static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_page_t* free); +static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, + vm_page_t *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); @@ -597,7 +642,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* * Initialize the global pv list lock. */ - rw_init(&pvh_global_lock, "pvh global"); + rw_init(&pvh_global_lock, "pmap pv global"); /* * Reserve some special page table entries/VA space for temporary @@ -763,6 +808,17 @@ pmap_init(void) } /* + * Initialize the pv chunk list mutex. + */ + mtx_init(&pv_chunks_mutex, "pmap pv chunk list", NULL, MTX_DEF); + + /* + * Initialize the pool of pv list locks. + */ + for (i = 0; i < NPV_LIST_LOCKS; i++) + rw_init(&pv_list_locks[i], "pmap pv list"); + + /* * Calculate the size of the pv head table for superpages. */ for (i = 0; phys_avail[i + 1]; i += 2); @@ -1501,23 +1557,25 @@ pmap_remove_pt_page(pmap_t pmap, vm_page } /* - * This routine unholds page table pages, and if the hold count - * drops to zero, then it decrements the wire count. + * Decrements a page table page's wire count, which is used to record the + * number of valid page table entries within the page. If the wire count + * drops to zero, then the page table page is unmapped. Returns TRUE if the + * page table page was unmapped and FALSE otherwise. */ -static __inline int -pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) +static inline boolean_t +pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { --m->wire_count; - if (m->wire_count == 0) - return (_pmap_unwire_pte_hold(pmap, va, m, free)); - else - return (0); + if (m->wire_count == 0) { + _pmap_unwire_ptp(pmap, va, m, free); + return (TRUE); + } else + return (FALSE); } -static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, - vm_page_t *free) +static void +_pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t *free) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1546,14 +1604,14 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of vm_page_t pdpg; pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); - pmap_unwire_pte_hold(pmap, va, pdpg, free); + pmap_unwire_ptp(pmap, va, pdpg, free); } if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) { /* We just released a PD, unhold the matching PDP */ vm_page_t pdppg; pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME); - pmap_unwire_pte_hold(pmap, va, pdppg, free); + pmap_unwire_ptp(pmap, va, pdppg, free); } /* @@ -1568,8 +1626,6 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_of * *ALL* TLB shootdown is done */ pmap_add_delayed_free_list(m, free, TRUE); - - return (1); } /* @@ -1585,7 +1641,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (0); KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return (pmap_unwire_pte_hold(pmap, va, mpte, free)); + return (pmap_unwire_ptp(pmap, va, mpte, free)); } void @@ -1644,8 +1700,10 @@ pmap_pinit(pmap_t pmap) } /* - * this routine is called if the page table page is not - * mapped correctly. + * This routine is called if the desired page table page does not exist. + * + * If page table page allocation fails, this routine may sleep before + * returning NULL. It sleeps only if a lock pointer was given. * * Note: If a page allocation fails at page table level two or three, * one or two pages may be held during the wait, only to be released @@ -1653,25 +1711,23 @@ pmap_pinit(pmap_t pmap) * race conditions. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) { vm_page_t m, pdppg, pdpg; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* * Allocate a page table page. */ if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { - if (flags & M_WAITOK) { + if (lockp != NULL) { + RELEASE_PV_LIST_LOCK(lockp); PMAP_UNLOCK(pmap); - rw_wunlock(&pvh_global_lock); + rw_runlock(&pvh_global_lock); VM_WAIT; - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -1712,7 +1768,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pdp, recurse */ if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); @@ -1745,7 +1801,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pd, recurse */ if (_pmap_allocpte(pmap, NUPDE + pdpindex, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); @@ -1759,7 +1815,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ if (_pmap_allocpte(pmap, NUPDE + pdpindex, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); @@ -1785,15 +1841,12 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t } static vm_page_t -pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags) +pmap_allocpde(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t pdpindex, ptepindex; pdp_entry_t *pdpe; vm_page_t pdpg; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpde: flags is neither M_NOWAIT nor M_WAITOK")); retry: pdpe = pmap_pdpe(pmap, va); if (pdpe != NULL && (*pdpe & PG_V) != 0) { @@ -1804,24 +1857,20 @@ retry: /* Allocate a pd page. */ ptepindex = pmap_pde_pindex(va); pdpindex = ptepindex >> NPDPEPGSHIFT; - pdpg = _pmap_allocpte(pmap, NUPDE + pdpindex, flags); - if (pdpg == NULL && (flags & M_WAITOK)) + pdpg = _pmap_allocpte(pmap, NUPDE + pdpindex, lockp); + if (pdpg == NULL && lockp != NULL) goto retry; } return (pdpg); } static vm_page_t -pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) +pmap_allocpte(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t ptepindex; pd_entry_t *pd; vm_page_t m; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - /* * Calculate pagetable page index */ @@ -1837,7 +1886,7 @@ retry: * normal 4K page. */ if (pd != NULL && (*pd & (PG_PS | PG_V)) == (PG_PS | PG_V)) { - if (!pmap_demote_pde(pmap, pd, va)) { + if (!pmap_demote_pde_locked(pmap, pd, va, lockp)) { /* * Invalidation of the 2MB page mapping may have caused * the deallocation of the underlying PD page. @@ -1858,8 +1907,8 @@ retry: * Here if the pte page isn't mapped, or if it has been * deallocated. */ - m = _pmap_allocpte(pmap, ptepindex, flags); - if (m == NULL && (flags & M_WAITOK)) + m = _pmap_allocpte(pmap, ptepindex, lockp); + if (m == NULL && lockp != NULL) goto retry; } return (m); @@ -2023,9 +2072,6 @@ pv_to_chunk(pv_entry_t pv) static const uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; -SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, - "Current number of pv entries"); - #ifdef PV_STATS static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; @@ -2038,13 +2084,15 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_ SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_tryfail, CTLFLAG_RD, &pc_chunk_tryfail, 0, "Number of times tried to get a chunk page but failed."); -static long pv_entry_frees, pv_entry_allocs; +static long pv_entry_frees, pv_entry_allocs, pv_entry_count; static int pv_entry_spare; SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_frees, CTLFLAG_RD, &pv_entry_frees, 0, "Current number of pv entry frees"); SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_allocs, CTLFLAG_RD, &pv_entry_allocs, 0, "Current number of pv entry allocs"); +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, + "Current number of pv entries"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); #endif @@ -2054,14 +2102,16 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_ * drastic measures to free some pages so we can allocate * another pv entry chunk. * + * Returns NULL if PV entries were reclaimed from the specified pmap. + * * We do not, however, unmap 2mpages because subsequent accesses will * allocate per-page pv entries until repromotion occurs, thereby * exacerbating the shortage of free pv entries. */ static vm_page_t -pmap_pv_reclaim(pmap_t locked_pmap) +reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) { - struct pch newtail; + struct pch new_tail; struct pv_chunk *pc; struct md_page *pvh; pd_entry_t *pde; @@ -2073,13 +2123,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) uint64_t inuse; int bit, field, freed; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL")); pmap = NULL; free = m_pc = NULL; - TAILQ_INIT(&newtail); + TAILQ_INIT(&new_tail); + mtx_lock(&pv_chunks_mutex); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && free == NULL) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + mtx_unlock(&pv_chunks_mutex); if (pmap != pc->pc_pmap) { if (pmap != NULL) { pmap_invalidate_all(pmap); @@ -2088,11 +2141,14 @@ pmap_pv_reclaim(pmap_t locked_pmap) } pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ - if (pmap > locked_pmap) + if (pmap > locked_pmap) { + RELEASE_PV_LIST_LOCK(lockp); PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + } else if (pmap != locked_pmap && + !PMAP_TRYLOCK(pmap)) { pmap = NULL; - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); continue; } } @@ -2121,6 +2177,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) vm_page_dirty(m); if ((tpte & PG_A) != 0) vm_page_aflag_set(m, PGA_REFERENCED); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { @@ -2136,32 +2193,36 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } if (freed == 0) { - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); continue; } /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); - PV_STAT(pv_entry_frees += freed); - PV_STAT(pv_entry_spare += freed); - pv_entry_count -= freed; + PV_STAT(atomic_add_long(&pv_entry_frees, freed)); + PV_STAT(atomic_add_int(&pv_entry_spare, freed)); + PV_STAT(atomic_subtract_long(&pv_entry_count, freed)); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && pc->pc_map[2] == PC_FREE2) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); + PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); + PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* Entire chunk is free; return it. */ m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m_pc->phys_addr); + mtx_lock(&pv_chunks_mutex); break; } TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); /* One freed pv entry in locked_pmap is sufficient. */ if (pmap == locked_pmap) break; } - TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + TAILQ_CONCAT(&pv_chunks, &new_tail, pc_lru); + mtx_unlock(&pv_chunks_mutex); if (pmap != NULL) { pmap_invalidate_all(pmap); if (pmap != locked_pmap) @@ -2187,11 +2248,11 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - PV_STAT(pv_entry_frees++); - PV_STAT(pv_entry_spare++); - pv_entry_count--; + PV_STAT(atomic_add_long(&pv_entry_frees, 1)); + PV_STAT(atomic_add_int(&pv_entry_spare, 1)); + PV_STAT(atomic_subtract_long(&pv_entry_count, 1)); pc = pv_to_chunk(pv); idx = pv - &pc->pc_pventry[0]; field = idx / 64; @@ -2215,10 +2276,12 @@ free_pv_chunk(struct pv_chunk *pc) { vm_page_t m; + mtx_lock(&pv_chunks_mutex); TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); + mtx_unlock(&pv_chunks_mutex); + PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); + PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); @@ -2227,20 +2290,24 @@ free_pv_chunk(struct pv_chunk *pc) } /* - * get a new pv_entry, allocating a block from the system - * when needed. + * Returns a new PV entry, allocating a new PV chunk from the system when + * needed. If this PV chunk allocation fails and a PV list lock pointer was + * given, a PV chunk is reclaimed from an arbitrary pmap. Otherwise, NULL is + * returned. + * + * The given PV list lock may be released. */ static pv_entry_t -get_pv_entry(pmap_t pmap, boolean_t try) +get_pv_entry(pmap_t pmap, struct rwlock **lockp) { int bit, field; pv_entry_t pv; struct pv_chunk *pc; vm_page_t m; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - PV_STAT(pv_entry_allocs++); + PV_STAT(atomic_add_long(&pv_entry_allocs, 1)); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2260,8 +2327,8 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } - pv_entry_count++; - PV_STAT(pv_entry_spare--); + PV_STAT(atomic_add_long(&pv_entry_count, 1)); + PV_STAT(atomic_subtract_int(&pv_entry_spare, 1)); return (pv); } } @@ -2269,31 +2336,121 @@ retry: m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { - if (try) { + if (lockp == NULL) { PV_STAT(pc_chunk_tryfail++); return (NULL); } - m = pmap_pv_reclaim(pmap); + m = reclaim_pv_chunk(pmap, lockp); if (m == NULL) goto retry; } - PV_STAT(pc_chunk_count++); - PV_STAT(pc_chunk_allocs++); + PV_STAT(atomic_add_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ pc->pc_map[1] = PC_FREE1; pc->pc_map[2] = PC_FREE2; + mtx_lock(&pv_chunks_mutex); TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + mtx_unlock(&pv_chunks_mutex); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); - pv_entry_count++; - PV_STAT(pv_entry_spare += _NPCPV - 1); + PV_STAT(atomic_add_long(&pv_entry_count, 1)); + PV_STAT(atomic_add_int(&pv_entry_spare, _NPCPV - 1)); return (pv); } /* + * Returns the number of one bits within the given PV chunk map element. + */ +static int +popcnt_pc_map_elem(uint64_t elem) +{ + int count; + + /* + * This simple method of counting the one bits performs well because + * the given element typically contains more zero bits than one bits. + */ + count = 0; + for (; elem != 0; elem &= elem - 1) + count++; + return (count); +} + +/* + * Ensure that the number of spare PV entries in the specified pmap meets or + * exceeds the given count, "needed". + * + * The given PV list lock may be released. + */ +static void +reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp) +{ + struct pch new_tail; + struct pv_chunk *pc; + int avail, free; + vm_page_t m; + + rw_assert(&pvh_global_lock, RA_LOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(lockp != NULL, ("reserve_pv_entries: lockp is NULL")); + + /* + * Newly allocated PV chunks must be stored in a private list until + * the required number of PV chunks have been allocated. Otherwise, + * reclaim_pv_chunk() could recycle one of these chunks. In + * contrast, these chunks must be added to the pmap upon allocation. + */ + TAILQ_INIT(&new_tail); +retry: + avail = 0; + TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { + if ((cpu_feature2 & CPUID2_POPCNT) == 0) { + free = popcnt_pc_map_elem(pc->pc_map[0]); + free += popcnt_pc_map_elem(pc->pc_map[1]); + free += popcnt_pc_map_elem(pc->pc_map[2]); + } else { + free = popcntq(pc->pc_map[0]); + free += popcntq(pc->pc_map[1]); + free += popcntq(pc->pc_map[2]); + } + if (free == 0) + break; + avail += free; + if (avail >= needed) + break; + } + for (; avail < needed; avail += _NPCPV) { + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED); + if (m == NULL) { + m = reclaim_pv_chunk(pmap, lockp); + if (m == NULL) + goto retry; + } + PV_STAT(atomic_add_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); + dump_add_page(m->phys_addr); + pc = (void *)PHYS_TO_DMAP(m->phys_addr); + pc->pc_pmap = pmap; + pc->pc_map[0] = PC_FREE0; + pc->pc_map[1] = PC_FREE1; + pc->pc_map[2] = PC_FREE2; + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + PV_STAT(atomic_add_int(&pv_entry_spare, _NPCPV)); + } + if (!TAILQ_EMPTY(&new_tail)) { + mtx_lock(&pv_chunks_mutex); + TAILQ_CONCAT(&pv_chunks, &new_tail, pc_lru); + mtx_unlock(&pv_chunks_mutex); + } +} + +/* * First find and then remove the pv entry for the specified pmap and virtual * address from the specified pv list. Returns the pv entry if found and NULL * otherwise. This operation can be performed on pv lists for either 4KB or @@ -2304,7 +2461,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2320,20 +2477,26 @@ pmap_pvh_remove(struct md_page *pvh, pma * entries for each of the 4KB page mappings. */ static void -pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp) { struct md_page *pvh; + struct pv_chunk *pc; pv_entry_t pv; vm_offset_t va_last; vm_page_t m; + int bit, field; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); /* * Transfer the 2mpage's pv entry for this mapping to the first - * page's pv list. + * page's pv list. Once this transfer begins, the pv list lock + * must not be released until the last pv entry is reinstantiated. */ pvh = pa_to_pvh(pa); va = trunc_2mpage(va); @@ -2342,14 +2505,37 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse m = PHYS_TO_VM_PAGE(pa); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); /* Instantiate the remaining NPTEPG - 1 pv entries. */ + PV_STAT(atomic_add_long(&pv_entry_allocs, NPTEPG - 1)); va_last = va + NBPDR - PAGE_SIZE; - do { - m++; - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_pv_demote_pde: page %p is not managed", m)); - va += PAGE_SIZE; - pmap_insert_entry(pmap, va, m); - } while (va < va_last); + for (;;) { + pc = TAILQ_FIRST(&pmap->pm_pvchunk); + KASSERT(pc->pc_map[0] != 0 || pc->pc_map[1] != 0 || + pc->pc_map[2] != 0, ("pmap_pv_demote_pde: missing spare")); + for (field = 0; field < _NPCM; field++) { + while (pc->pc_map[field]) { + bit = bsfq(pc->pc_map[field]); + pc->pc_map[field] &= ~(1ul << bit); + pv = &pc->pc_pventry[field * 64 + bit]; + va += PAGE_SIZE; + pv->pv_va = va; + m++; + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("pmap_pv_demote_pde: page %p is not managed", m)); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + if (va == va_last) + goto out; + } + } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + } +out: + if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 && pc->pc_map[2] == 0) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + } + PV_STAT(atomic_add_long(&pv_entry_count, NPTEPG - 1)); + PV_STAT(atomic_subtract_int(&pv_entry_spare, NPTEPG - 1)); } /* @@ -2358,23 +2544,25 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse * for the 2MB page mapping. */ static void -pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp) { struct md_page *pvh; pv_entry_t pv; vm_offset_t va_last; vm_page_t m; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 2mpage aligned")); + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); /* - * Transfer the first page's pv entry for this mapping to the - * 2mpage's pv list. Aside from avoiding the cost of a call - * to get_pv_entry(), a transfer avoids the possibility that - * get_pv_entry() calls pmap_collect() and that pmap_collect() - * removes one of the mappings that is being promoted. + * Transfer the first page's pv entry for this mapping to the 2mpage's + * pv list. Aside from avoiding the cost of a call to get_pv_entry(), + * a transfer avoids the possibility that get_pv_entry() calls + * reclaim_pv_chunk() and that reclaim_pv_chunk() removes one of the + * mappings that is being promoted. */ m = PHYS_TO_VM_PAGE(pa); va = trunc_2mpage(va); @@ -2406,48 +2594,22 @@ pmap_pvh_free(struct md_page *pvh, pmap_ free_pv_entry(pmap, pv); } -static void -pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) -{ - struct md_page *pvh; - - rw_assert(&pvh_global_lock, RA_WLOCKED); - pmap_pvh_free(&m->md, pmap, va); - if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - if (TAILQ_EMPTY(&pvh->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); - } -} - /* - * Create a pv entry for page at pa for - * (pmap, va). - */ -static void -pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m) -{ - pv_entry_t pv; - - rw_assert(&pvh_global_lock, RA_WLOCKED); - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - pv = get_pv_entry(pmap, FALSE); - pv->pv_va = va; - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); -} - -/* - * Conditionally create a pv entry. + * Conditionally create the PV entry for a 4KB page mapping if the required + * memory can be allocated without resorting to reclamation. */ static boolean_t -pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m) +pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m, + struct rwlock **lockp) { pv_entry_t pv; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { + /* Pass NULL instead of the lock pointer to disable reclamation. */ + if ((pv = get_pv_entry(pmap, NULL)) != NULL) { pv->pv_va = va; + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); return (TRUE); } else @@ -2455,17 +2617,22 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm } /* - * Create the pv entry for a 2MB page mapping. + * Conditionally create the PV entry for a 2MB page mapping if the required + * memory can be allocated without resorting to reclamation. */ static boolean_t -pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp) { struct md_page *pvh; pv_entry_t pv; - rw_assert(&pvh_global_lock, RA_WLOCKED); - if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { + rw_assert(&pvh_global_lock, RA_LOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* Pass NULL instead of the lock pointer to disable reclamation. */ + if ((pv = get_pv_entry(pmap, NULL)) != NULL) { pv->pv_va = va; + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); pvh = pa_to_pvh(pa); TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); return (TRUE); @@ -2494,6 +2661,20 @@ pmap_fill_ptp(pt_entry_t *firstpte, pt_e static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { + struct rwlock *lock; + boolean_t rv; + + lock = NULL; + rv = pmap_demote_pde_locked(pmap, pde, va, &lock); + if (lock != NULL) + rw_wunlock(lock); + return (rv); +} + +static boolean_t +pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + struct rwlock **lockp) +{ pd_entry_t newpde, oldpde; pt_entry_t *firstpte, newpte; vm_paddr_t mptepa; @@ -2528,7 +2709,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { free = NULL; - pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free); + pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free, + lockp); pmap_invalidate_page(pmap, trunc_2mpage(va)); pmap_free_zero_pages(free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" @@ -2568,6 +2750,17 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t pmap_fill_ptp(firstpte, newpte); /* + * The spare PV entries must be reserved prior to demoting the + * mapping, that is, prior to changing the PDE. Otherwise, the state + * of the PDE and the PV lists will be inconsistent, which can result + * in reclaim_pv_chunk() attempting to remove a PV entry from the + * wrong PV list and pmap_pv_demote_pde() failing to find the expected + * PV entry for the 2MB page mapping that is being demoted. + */ + if ((oldpde & PG_MANAGED) != 0) + reserve_pv_entries(pmap, NPTEPG - 1, lockp); + + /* * Demote the mapping. This pmap is locked. The old PDE has * PG_A set. If the old PDE has PG_RW set, it also has PG_M * set. Thus, there is no danger of a race with another @@ -2586,18 +2779,12 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); /* - * Demote the pv entry. This depends on the earlier demotion - * of the mapping. Specifically, the (re)creation of a per- - * page pv entry might trigger the execution of pmap_collect(), - * which might reclaim a newly (re)created per-page pv entry - * and destroy the associated mapping. In order to destroy - * the mapping, the PDE must have already changed from mapping - * the 2mpage to referencing the page table page. + * Demote the PV entry. */ if ((oldpde & PG_MANAGED) != 0) - pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME); + pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME, lockp); - pmap_pde_demotions++; + atomic_add_long(&pmap_pde_demotions, 1); CTR2(KTR_PMAP, "pmap_demote_pde: success for va %#lx" " in pmap %p", va, pmap); return (TRUE); @@ -2608,7 +2795,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t */ static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, - vm_page_t *free) + vm_page_t *free, struct rwlock **lockp) { struct md_page *pvh; pd_entry_t oldpde; @@ -2630,6 +2817,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t pmap_invalidate_page(kernel_pmap, sva); pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); pvh = pa_to_pvh(oldpde & PG_PS_FRAME); pmap_pvh_free(pvh, pmap, sva); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 21:27:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD830106564A; Wed, 5 Sep 2012 21:27:29 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh10.mail.rice.edu (mh10.mail.rice.edu [128.42.201.30]) by mx1.freebsd.org (Postfix) with ESMTP id 8714C8FC0A; Wed, 5 Sep 2012 21:27:29 +0000 (UTC) Received: from mh10.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh10.mail.rice.edu (Postfix) with ESMTP id 3025C6051A; Wed, 5 Sep 2012 16:27:27 -0500 (CDT) Received: from mh10.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh10.mail.rice.edu (Postfix) with ESMTP id 2E58F604F5; Wed, 5 Sep 2012 16:27:27 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh10.mail.rice.edu, auth channel Received: from mh10.mail.rice.edu ([127.0.0.1]) by mh10.mail.rice.edu (mh10.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ym41si1-z6RI; Wed, 5 Sep 2012 16:27:27 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh10.mail.rice.edu (Postfix) with ESMTPSA id E2E3C604C6; Wed, 5 Sep 2012 16:27:26 -0500 (CDT) Message-ID: <5047C3A4.4040509@rice.edu> Date: Wed, 05 Sep 2012 16:27:00 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Konstantin Belousov References: <201209052040.q85KeCTe098721@svn.freebsd.org> In-Reply-To: <201209052040.q85KeCTe098721@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240151 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/xen kern mips/mips sparc64/sparc64 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, 05 Sep 2012 21:27:29 -0000 On 9/5/2012 3:40 PM, Konstantin Belousov wrote: > Author: kib > Date: Wed Sep 5 20:40:11 2012 > New Revision: 240151 > URL: http://svn.freebsd.org/changeset/base/240151 > > Log: > MFC r233122,r237086,r237228,r237264,r237290,r237404,r237414,r237513,r237551, > r237592,r237604,r237623,r237684,r237733,r237813,r237855,r238124,r238126, > r238163,r238414,r238610,r238889,r238970,r239072,r239137,r240126 (all by alc): > > Add fine-grained PV chunk and list locking to the amd64 pmap, enabling > concurrent execution of the following functions on different pmaps: > > pmap_change_wiring() > pmap_copy() > pmap_enter() > pmap_enter_object() > pmap_enter_quick() > pmap_page_exists_quick() > pmap_page_is_mapped() > pmap_protect() > pmap_remove() > pmap_remove_pages() > > Requested and approved by: alc > > Modified: > stable/9/sys/amd64/amd64/pmap.c > stable/9/sys/amd64/include/cpufunc.h > stable/9/sys/i386/i386/pmap.c > stable/9/sys/i386/xen/pmap.c > stable/9/sys/kern/subr_witness.c > stable/9/sys/mips/mips/pmap.c > stable/9/sys/sparc64/sparc64/pmap.c > stable/9/sys/vm/vm_map.c > stable/9/sys/vm/vm_page.c > Directory Properties: > stable/9/sys/ (props changed) > Thank you! Alan From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 21:41:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD2BC1065672; Wed, 5 Sep 2012 21:41:06 +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 A74A98FC1B; Wed, 5 Sep 2012 21:41:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85Lf6d4006345; Wed, 5 Sep 2012 21:41:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85Lf6Mn006333; Wed, 5 Sep 2012 21:41:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209052141.q85Lf6Mn006333@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 Sep 2012 21:41: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: r240152 - in head/lib/libc/i386: . gen 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, 05 Sep 2012 21:41:06 -0000 Author: jilles Date: Wed Sep 5 21:41:05 2012 New Revision: 240152 URL: http://svn.freebsd.org/changeset/base/240152 Log: libc/i386: Do not export .cerror. For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Not exporting .cerror causes it to be jumped to directly instead of via the PLT. This change also takes advantage of .cerror's new status by not saving and loading %ebx before jumping to it. (Therefore, .cerror now saves and loads %ebx itself.) Where there was a conditional jump to a jump to .cerror, the conditional jump has been changed to jump to .cerror directly (many modern CPUs don't do static prediction and in any case it is not much of a benefit anyway). This change makes libc.so.7 a few kilobytes smaller. Reviewed by: kib Modified: head/lib/libc/i386/SYS.h head/lib/libc/i386/Symbol.map head/lib/libc/i386/gen/rfork_thread.S head/lib/libc/i386/sys/Ovfork.S head/lib/libc/i386/sys/brk.S head/lib/libc/i386/sys/cerror.S head/lib/libc/i386/sys/exect.S head/lib/libc/i386/sys/getcontext.S head/lib/libc/i386/sys/ptrace.S head/lib/libc/i386/sys/sbrk.S head/lib/libc/i386/sys/syscall.S Modified: head/lib/libc/i386/SYS.h ============================================================================== --- head/lib/libc/i386/SYS.h Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/SYS.h Wed Sep 5 21:41:05 2012 (r240152) @@ -36,21 +36,21 @@ #include #include -#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ - ENTRY(__CONCAT(__sys_,x)); \ +#define SYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(x); \ .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b + mov __CONCAT($SYS_,x),%eax; KERNCALL; \ + jb HIDENAME(cerror) #define RSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x)) -#define PSEUDO(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ - ENTRY(__CONCAT(__sys_,x)); \ +#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret; \ + mov __CONCAT($SYS_,x),%eax; KERNCALL; \ + jb HIDENAME(cerror); ret; \ END(__CONCAT(__sys_,x)) /* gas messes up offset -- although we don't currently need it, do for BCS */ Modified: head/lib/libc/i386/Symbol.map ============================================================================== --- head/lib/libc/i386/Symbol.map Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/Symbol.map Wed Sep 5 21:41:05 2012 (r240152) @@ -63,7 +63,6 @@ FBSDprivate_1.0 { __sys_vfork; _vfork; _end; - .cerror; _brk; .curbrk; .minbrk; Modified: head/lib/libc/i386/gen/rfork_thread.S ============================================================================== --- head/lib/libc/i386/gen/rfork_thread.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/gen/rfork_thread.S Wed Sep 5 21:41:05 2012 (r240152) @@ -113,8 +113,7 @@ ENTRY(rfork_thread) popl %esi movl %ebp, %esp popl %ebp - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) + jmp HIDENAME(cerror) END(rfork_thread) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/i386/sys/Ovfork.S ============================================================================== --- head/lib/libc/i386/sys/Ovfork.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/Ovfork.S Wed Sep 5 21:41:05 2012 (r240152) @@ -50,8 +50,7 @@ ENTRY(__sys_vfork) jmp *%ecx 1: pushl %ecx - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) + jmp HIDENAME(cerror) END(__sys_vfork) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/i386/sys/brk.S ============================================================================== --- head/lib/libc/i386/sys/brk.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/brk.S Wed Sep 5 21:41:05 2012 (r240152) @@ -58,14 +58,11 @@ ENTRY(brk) ok: mov $SYS_break,%eax KERNCALL - jb err + jb HIDENAME(cerror) movl 4(%esp),%eax movl %eax,(%edx) movl $0,%eax ret -err: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) #else @@ -77,13 +74,11 @@ err: ok: mov $SYS_break,%eax KERNCALL - jb err + jb HIDENAME(cerror) movl 4(%esp),%eax movl %eax,HIDENAME(curbrk) movl $0,%eax ret -err: - jmp HIDENAME(cerror) #endif END(brk) Modified: head/lib/libc/i386/sys/cerror.S ============================================================================== --- head/lib/libc/i386/sys/cerror.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/cerror.S Wed Sep 5 21:41:05 2012 (r240152) @@ -48,13 +48,14 @@ __FBSDID("$FreeBSD$"); .globl CNAME(__error) .type CNAME(__error),@function HIDENAME(cerror): - pushl %eax #ifdef PIC - /* The caller must execute the PIC prologue before jumping to cerror. */ + PIC_PROLOGUE + pushl %eax call PIC_PLT(CNAME(__error)) popl %ecx PIC_EPILOGUE #else + pushl %eax call CNAME(__error) popl %ecx #endif Modified: head/lib/libc/i386/sys/exect.S ============================================================================== --- head/lib/libc/i386/sys/exect.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/exect.S Wed Sep 5 21:41:05 2012 (r240152) @@ -47,8 +47,7 @@ ENTRY(exect) pushl %edx popf KERNCALL - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */ + jmp HIDENAME(cerror) /* exect(file, argv, env); */ END(exect) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/i386/sys/getcontext.S ============================================================================== --- head/lib/libc/i386/sys/getcontext.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/getcontext.S Wed Sep 5 21:41:05 2012 (r240152) @@ -42,12 +42,9 @@ ENTRY(__sys_getcontext) movl (%esp),%ecx /* save getcontext return address */ mov $SYS_getcontext,%eax KERNCALL - jb 1f + jb HIDENAME(cerror) addl $4,%esp /* remove stale (setcontext) return address */ jmp *%ecx /* restore return address */ -1: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) END(__sys_getcontext) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/i386/sys/ptrace.S ============================================================================== --- head/lib/libc/i386/sys/ptrace.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/ptrace.S Wed Sep 5 21:41:05 2012 (r240152) @@ -50,11 +50,8 @@ ENTRY(ptrace) #endif mov $SYS_ptrace,%eax KERNCALL - jb err + jb HIDENAME(cerror) ret -err: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) END(ptrace) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/i386/sys/sbrk.S ============================================================================== --- head/lib/libc/i386/sys/sbrk.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/sbrk.S Wed Sep 5 21:41:05 2012 (r240152) @@ -59,7 +59,7 @@ ENTRY(sbrk) addl %eax,4(%esp) mov $SYS_break,%eax KERNCALL - jb err + jb HIDENAME(cerror) PIC_PROLOGUE movl PIC_GOT(HIDENAME(curbrk)),%edx movl (%edx),%eax @@ -67,9 +67,6 @@ ENTRY(sbrk) PIC_EPILOGUE back: ret -err: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) #else /* !PIC */ @@ -80,13 +77,11 @@ err: addl %eax,4(%esp) mov $SYS_break,%eax KERNCALL - jb err + jb HIDENAME(cerror) movl HIDENAME(curbrk),%eax addl %ecx,HIDENAME(curbrk) back: ret -err: - jmp HIDENAME(cerror) #endif /* PIC */ END(sbrk) Modified: head/lib/libc/i386/sys/syscall.S ============================================================================== --- head/lib/libc/i386/sys/syscall.S Wed Sep 5 20:40:11 2012 (r240151) +++ head/lib/libc/i386/sys/syscall.S Wed Sep 5 21:41:05 2012 (r240152) @@ -45,11 +45,8 @@ ENTRY(syscall) KERNCALL push %ecx /* need to push a word to keep stack frame intact upon return; the word must be the return address. */ - jb 1f + jb HIDENAME(cerror) ret -1: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) END(syscall) .section .note.GNU-stack,"",%progbits From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 23:07:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 972B41065670; Wed, 5 Sep 2012 23:07: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 818388FC15; Wed, 5 Sep 2012 23:07:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q85N73Pm018175; Wed, 5 Sep 2012 23:07:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q85N730m018172; Wed, 5 Sep 2012 23:07:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209052307.q85N730m018172@svn.freebsd.org> From: Glen Barber Date: Wed, 5 Sep 2012 23:07: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: r240153 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 23:07:03 -0000 Author: gjb (doc,ports committer) Date: Wed Sep 5 23:07:02 2012 New Revision: 240153 URL: http://svn.freebsd.org/changeset/base/240153 Log: Typo fix and minor word swap. PR: 171356 Submitted by: bdrewery MFC After: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 5 21:41:05 2012 (r240152) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 5 23:07:02 2012 (r240153) @@ -23,10 +23,11 @@ .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber +.\" Copyright (c) 2012, Bryan Drewery .\" .\" $FreeBSD$ .\" -.Dd August 12, 2012 +.Dd September 5, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -1083,7 +1084,7 @@ bit is respected for the file system. Th .It Sy sharesmb Ns = Ns Cm on | off | Ar opts The .Sy sharesmb -property has currently no effect o +property currently has no effect on .Fx . .It Sy sharenfs Ns = Ns Cm on | off | Ar opts Controls whether the file system is shared via @@ -2031,7 +2032,7 @@ The default is .Pp The default can be changed to include group types. .It Fl i -Translate SID to POSIX ID. This flag has currently no effect on +Translate SID to POSIX ID. This flag currently has no effect on .Fx . .El .It Xo From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 01:24:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2EE106564A; Thu, 6 Sep 2012 01:24:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78F7D8FC17; Thu, 6 Sep 2012 01:24:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q861OJar035608; Thu, 6 Sep 2012 01:24:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q861OJs2035604; Thu, 6 Sep 2012 01:24:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209060124.q861OJs2035604@svn.freebsd.org> From: Rui Paulo Date: Thu, 6 Sep 2012 01:24: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: r240154 - in head/lib/libproc/test: t1-bkpt t3-name2sym X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 01:24:19 -0000 Author: rpaulo Date: Thu Sep 6 01:24:18 2012 New Revision: 240154 URL: http://svn.freebsd.org/changeset/base/240154 Log: Fix test cases to work with the latest version of the API. Modified: head/lib/libproc/test/t1-bkpt/t1-bkpt.c head/lib/libproc/test/t3-name2sym/t3-name2sym.c Modified: head/lib/libproc/test/t1-bkpt/t1-bkpt.c ============================================================================== --- head/lib/libproc/test/t1-bkpt/t1-bkpt.c Wed Sep 5 23:07:02 2012 (r240153) +++ head/lib/libproc/test/t1-bkpt/t1-bkpt.c Thu Sep 6 01:24:18 2012 (r240154) @@ -50,12 +50,12 @@ t1_bkpt_d() unsigned long saved; proc_create("./t1-bkpt", targv, NULL, NULL, &phdl); - proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved); + assert(proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved) == 0); proc_continue(phdl); - assert(WIFSTOPPED(proc_wstatus(phdl))); + assert(proc_wstatus(phdl) == PS_STOP); proc_bkptexec(phdl, saved); proc_continue(phdl); - proc_wait(phdl); + proc_wstatus(phdl); proc_free(phdl); } Modified: head/lib/libproc/test/t3-name2sym/t3-name2sym.c ============================================================================== --- head/lib/libproc/test/t3-name2sym/t3-name2sym.c Wed Sep 5 23:07:02 2012 (r240153) +++ head/lib/libproc/test/t3-name2sym/t3-name2sym.c Thu Sep 6 01:24:18 2012 (r240154) @@ -33,6 +33,7 @@ #include #include #include +#include int main(int argc, char *argv[]) From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 02:07:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60315106564A; Thu, 6 Sep 2012 02:07:59 +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 4BFE88FC08; Thu, 6 Sep 2012 02:07:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8627xVU041009; Thu, 6 Sep 2012 02:07:59 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8627xwr041007; Thu, 6 Sep 2012 02:07:59 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209060207.q8627xwr041007@svn.freebsd.org> From: Kevin Lo Date: Thu, 6 Sep 2012 02:07: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: r240155 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 02:07:59 -0000 Author: kevlo Date: Thu Sep 6 02:07:58 2012 New Revision: 240155 URL: http://svn.freebsd.org/changeset/base/240155 Log: Add missing braces Obtained from: DragonFly Modified: head/sys/dev/ixgbe/ixgbe_82599.c Modified: head/sys/dev/ixgbe/ixgbe_82599.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_82599.c Thu Sep 6 01:24:18 2012 (r240154) +++ head/sys/dev/ixgbe/ixgbe_82599.c Thu Sep 6 02:07:58 2012 (r240155) @@ -868,12 +868,13 @@ s32 ixgbe_setup_mac_link_82599(struct ix link_mode == IXGBE_AUTOC_LMS_KX4_KX_KR_SGMII) { /* Set KX4/KX/KR support according to speed requested */ autoc &= ~(IXGBE_AUTOC_KX4_KX_SUPP_MASK | IXGBE_AUTOC_KR_SUPP); - if (speed & IXGBE_LINK_SPEED_10GB_FULL) + if (speed & IXGBE_LINK_SPEED_10GB_FULL) { if (orig_autoc & IXGBE_AUTOC_KX4_SUPP) autoc |= IXGBE_AUTOC_KX4_SUPP; if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && (hw->phy.smart_speed_active == FALSE)) autoc |= IXGBE_AUTOC_KR_SUPP; + } if (speed & IXGBE_LINK_SPEED_1GB_FULL) autoc |= IXGBE_AUTOC_KX_SUPP; } else if ((pma_pmd_1g == IXGBE_AUTOC_1G_SFI) && From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 03:19:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C3E106564A; Thu, 6 Sep 2012 03:19:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 870908FC31; Thu, 6 Sep 2012 03:19:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q863Jnex050508; Thu, 6 Sep 2012 03:19:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q863JnDe050504; Thu, 6 Sep 2012 03:19:49 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209060319.q863JnDe050504@svn.freebsd.org> From: Rui Paulo Date: Thu, 6 Sep 2012 03: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: r240156 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 03:19:49 -0000 Author: rpaulo Date: Thu Sep 6 03:19:48 2012 New Revision: 240156 URL: http://svn.freebsd.org/changeset/base/240156 Log: Add support for demangling C++ symbols. This requires linking libproc with libc++rt/libsupc++. Discussed with: theraven Modified: head/lib/libproc/Makefile head/lib/libproc/proc_sym.c Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Thu Sep 6 02:07:58 2012 (r240155) +++ head/lib/libproc/Makefile Thu Sep 6 03:19:48 2012 (r240156) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= proc SRCS= proc_bkpt.c \ @@ -13,6 +15,14 @@ INCS= libproc.h CFLAGS+= -I${.CURDIR} +.if ${MK_LIBCPLUSPLUS} != "no" +LDADD+= -lcxxrt +DPADD+= ${LIBCXXRT} +.else +LDADD+= -lsupc++ +DPADD+= ${LIBSTDCPLUSPLUS} +.endif + SHLIB_MAJOR= 2 WITHOUT_MAN= Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Thu Sep 6 02:07:58 2012 (r240155) +++ head/lib/libproc/proc_sym.c Thu Sep 6 03:19:48 2012 (r240156) @@ -46,6 +46,8 @@ #include "_libproc.h" +extern char *__cxa_demangle(const char *, char *, size_t *, int *); + static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); static void @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin if (addr >= rsym && addr <= (rsym + sym.st_size)) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { - strlcpy(name, s, namesz); + if (strlen(s) > 2 && + s[0] == '_' && s[1] == 'Z') + __cxa_demangle(s, name, &namesz, NULL); + else + strlcpy(name, s, namesz); memcpy(symcopy, &sym, sizeof(sym)); /* * DTrace expects the st_value to contain @@ -302,7 +308,11 @@ symtab: if (addr >= rsym && addr <= (rsym + sym.st_size)) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { - strlcpy(name, s, namesz); + if (strlen(s) > 2 && + s[0] == '_' && s[1] == 'Z') + __cxa_demangle(s, name, &namesz, NULL); + else + strlcpy(name, s, namesz); memcpy(symcopy, &sym, sizeof(sym)); /* * DTrace expects the st_value to contain From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 04:07:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DB7B1065676 for ; Thu, 6 Sep 2012 04:07:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1E26F8FC17 for ; Thu, 6 Sep 2012 04:07:32 +0000 (UTC) Received: by iayy25 with SMTP id y25so2018005iay.13 for ; Wed, 05 Sep 2012 21:07:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=HCO5VcmQTOCVHFp9iw5Prc335wyf8eCvBxnd38gnDDg=; b=Cvk1WMlQat9BI/a/7DFVQzY+mR57730p+9tUi2burooJMp7N3qNFoBzzwNTeFnGvbj shmBPyNWKQ2Q5/uVEnRW38HL4Gv7INjUg6qwk32jWbHKeXeXiip1OhSEXWs/E9m68Ac0 G7OfIvNV8Z8dHHYfQG8QPbh/+jXtWyin7bLEMwY/J2xWrqAVLlRS/gveA+X9C1yrhY3X qCFC446Lo3tXv9+1KQsUnJlhxauPAg8Tgnm8eJYXNvGncB8lLaTLB+oOE9Ke9ZTWW0gO gofXa6+hMmWg+Vv1G4Zf4GOGCuogwMxoksgT/40D6uEUjoOs/ytuCxQW3NSCOSdnYUbf RpoQ== Received: by 10.50.236.72 with SMTP id us8mr627716igc.70.1346904452017; Wed, 05 Sep 2012 21:07:32 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id a10sm2496592igd.1.2012.09.05.21.07.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 21:07:30 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120902232204.4de5f3a3.ray@ddteam.net> Date: Wed, 5 Sep 2012 22:07:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1BB2880C-88BA-4918-8C65-6F5E8B0C3058@bsdimp.com> References: <201209020148.q821ml0M018010@svn.freebsd.org> <20120902232204.4de5f3a3.ray@ddteam.net> To: Aleksandr Rybalko X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQl38GKv90+0mMKBtT/WEa6j2A8rahL/BCFAJyxm823Yt+uE9ImGDg3ThA2w8YqL+ZRKcBOE Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 04:07:33 -0000 On Sep 2, 2012, at 2:22 PM, Aleksandr Rybalko wrote: > On Sun, 2 Sep 2012 01:48:47 +0000 (UTC) > Andrew Turner wrote: >=20 >> Author: andrew >> Date: Sun Sep 2 01:48:47 2012 >> New Revision: 239998 >> URL: http://svn.freebsd.org/changeset/base/239998 >>=20 >> Log: >> Fix a logic inversion in an assert to allow us to use dts files that >> include other files. >=20 > Big Thanks for that!!! >=20 > It's hard to add overlapping support also? So second instance of same > node will be able to change attributes of previous one, such a = "status". > Or add new attributes, like GPIO lines usage. >=20 > Then we will be able to have per-SoC dts and per-board. =20 Should already be fixed. This is the latest dtc from upstream. Warner >>=20 >> Modified: >> head/contrib/dtc/dtc-lexer.l >>=20 >> Modified: head/contrib/dtc/dtc-lexer.l >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/contrib/dtc/dtc-lexer.l Sat Sep 1 23:33:49 >> 2012 (r239997) +++ head/contrib/dtc/dtc-lexer.l Sun >> Sep 2 01:48:47 2012 (r239998) @@ -198,7 +198,7 @@ static void >> push_input_file(const char * { >> assert(filename); >>=20 >> - assert(include_stack_pointer >=3D MAX_INCLUDE_NESTING); >> + assert(include_stack_pointer < MAX_INCLUDE_NESTING); >>=20 >> srcfile_push(filename); >>=20 >=20 > Thanks. >=20 > WBW > --=20 > Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 04:14:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DB11A1065674 for ; Thu, 6 Sep 2012 04:14:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 510008FC12 for ; Thu, 6 Sep 2012 04:14:14 +0000 (UTC) Received: by iayy25 with SMTP id y25so2023995iay.13 for ; Wed, 05 Sep 2012 21:14:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=X7riznuxazDnX8F1aOYmo7DAzJn/SfYQovl13zJSuxg=; b=FTfyUhhXM924gdmbTxYhyXRbR1iYKVAr6gbZkzXcgpCuCxQuyRJcahVwsBoN9jOEcL oZ/4n3cXcIkB5j/YaNXSGQ9J3RMKrremgmlwxF+0KNjGBSF/IlSnHJLh/JUYSBdLsQ0K CZnW8DssLlWLHY8WdXsxH7JG+se9KuPc2NNZDc2Ve0ysNxRYSUFinex/ZvDCbsqVeDJy 0j4O/4kPD2Z5ja9llZ8t3+Z9ahDRhfbjrvv0lwvTA3kgkHIMNAR7SwgaR4V1ZhpxtoN8 eivKtlwjBDL2C+BZOKTweJttzZDiwvcfacw7xEzFOFO+fXjXnwbkGtEc2T518kbIQpdS 9zJA== Received: by 10.50.77.131 with SMTP id s3mr722646igw.20.1346904854544; Wed, 05 Sep 2012 21:14:14 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id p8sm1804245igl.16.2012.09.05.21.14.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 21:14:13 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <07899894-3253-4F16-9CAB-8339E23D57F8@semihalf.com> Date: Wed, 5 Sep 2012 22:14:11 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201209020148.q821ml0M018010@svn.freebsd.org> <07899894-3253-4F16-9CAB-8339E23D57F8@semihalf.com> To: Rafal Jaworowski X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQn+WEt6FzHOnekpCcJ/q6zstbBsP+ZsRakgSUL8Wsn5BxcGu6IWc5fpWiStbyrYV9f80i8+ Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239998 - head/contrib/dtc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 04:14:16 -0000 On Sep 4, 2012, at 12:14 PM, Rafal Jaworowski wrote: >=20 > On 2012-09-02, at 03:48, Andrew Turner wrote: >=20 >> Author: andrew >> Date: Sun Sep 2 01:48:47 2012 >> New Revision: 239998 >> URL: http://svn.freebsd.org/changeset/base/239998 >>=20 >> Log: >> Fix a logic inversion in an assert to allow us to use dts files that >> include other files. >>=20 >> Modified: >> head/contrib/dtc/dtc-lexer.l >=20 > Is this a bug in the dtc that should be upstreamed perhaps, or is it = fixed at the point beyond our recent import of the vendor package? Neither. This is in the hack I wrote to get around our lex not having = all the features that dtc wants. Warner From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 06:17:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D2651065670; Thu, 6 Sep 2012 06:17:40 +0000 (UTC) (envelope-from mckay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2F58FC0A; Thu, 6 Sep 2012 06:17:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q866Hd41072347; Thu, 6 Sep 2012 06:17:39 GMT (envelope-from mckay@svn.freebsd.org) Received: (from mckay@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q866Hdpl072343; Thu, 6 Sep 2012 06:17:39 GMT (envelope-from mckay@svn.freebsd.org) Message-Id: <201209060617.q866Hdpl072343@svn.freebsd.org> From: Stephen McKay Date: Thu, 6 Sep 2012 06:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240157 - in stable/9: contrib/file lib/libmagic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 06:17:40 -0000 Author: mckay Date: Thu Sep 6 06:17:39 2012 New Revision: 240157 URL: http://svn.freebsd.org/changeset/base/240157 Log: MFC r235638,r239348: - Work around failure to compile on FreeBSD 7.x machines. - Correct a regression introduced during the import of file(1) 5.11. PR: bin/170415 Reviewed by: obrien@ Modified: stable/9/contrib/file/apprentice.c stable/9/lib/libmagic/Makefile stable/9/lib/libmagic/config.h Directory Properties: stable/9/ (props changed) stable/9/contrib/file/ (props changed) stable/9/lib/ (props changed) Modified: stable/9/contrib/file/apprentice.c ============================================================================== --- stable/9/contrib/file/apprentice.c Thu Sep 6 03:19:48 2012 (r240156) +++ stable/9/contrib/file/apprentice.c Thu Sep 6 06:17:39 2012 (r240157) @@ -648,7 +648,6 @@ set_test_type(struct magic *mstart, stru break; case FILE_REGEX: case FILE_SEARCH: -#ifndef COMPILE_ONLY /* Check for override */ if (mstart->str_flags & STRING_BINTEST) mstart->flag |= BINTEST; @@ -664,7 +663,6 @@ set_test_type(struct magic *mstart, stru mstart->flag |= BINTEST; else mstart->flag |= TEXTTEST; -#endif break; case FILE_DEFAULT: /* can't deduce anything; we shouldn't see this at the Modified: stable/9/lib/libmagic/Makefile ============================================================================== --- stable/9/lib/libmagic/Makefile Thu Sep 6 03:19:48 2012 (r240156) +++ stable/9/lib/libmagic/Makefile Thu Sep 6 06:17:39 2012 (r240157) @@ -40,8 +40,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c funcs.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ + -o ${.TARGET} ${.ALLSRC} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: stable/9/lib/libmagic/config.h ============================================================================== --- stable/9/lib/libmagic/config.h Thu Sep 6 03:19:48 2012 (r240156) +++ stable/9/lib/libmagic/config.h Thu Sep 6 06:17:39 2012 (r240157) @@ -39,7 +39,9 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ +#ifndef HOSTPROG #define HAVE_GETLINE 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 06:23:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA8DD1065670; Thu, 6 Sep 2012 06:23:39 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2506B8FC08; Thu, 6 Sep 2012 06:23:37 +0000 (UTC) Received: by lage12 with SMTP id e12so1130772lag.13 for ; Wed, 05 Sep 2012 23:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=BJeTj0zloVerQkRH19rtY1Kjaj+mMRcetkec8o5UCC0=; b=0bWQLj18see/cLs6XBZNE8ozMyo+Lz2ycbHDgMpsND6QXh0/kbRlfjOJeIy1y60YzJ A6MfOB3gOVgTlmT/QwVg5joGo559Ktr86off0ic6Uke2MJGW3LyNKnV5wcge7F3WPKjY IR33wPcKK12BMnSTN00GkJ/rHFXpN6cOV4sQtyY551hzrScQA/EXBRTWWd2s8B2JXZwp h5QwnEKixvnzktdh97oPTKm00uC8Cztym6mKxyc4Zuzzw+ZJ7/8iBGGGKRIwhUz2/JPb kXyC3HU6AQednI82KHcTxp3nrdZNm4GJhv6tjHcCHp/TX8y8ZZjRpu3akuk1u0fVBD/Z Lhsw== Received: by 10.152.130.3 with SMTP id oa3mr864241lab.27.1346912616720; Wed, 05 Sep 2012 23:23:36 -0700 (PDT) Received: from localhost ([188.230.122.226]) by mx.google.com with ESMTPS id bc2sm296531lbb.3.2012.09.05.23.23.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 23:23:35 -0700 (PDT) Date: Thu, 6 Sep 2012 09:23:32 +0300 From: Mikolaj Golub To: Robert Watson Message-ID: <20120906062330.GA94205@gmail.com> References: <201209011033.q81AXsGb094283@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r239983 - stable/8/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: Thu, 06 Sep 2012 06:23:39 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 05, 2012 at 07:31:19PM +0100, Robert Watson wrote: > On Wed, 5 Sep 2012, Bjoern A. Zeeb wrote: > > >> Log: > >> MFC r239075: > >> > >> In tcp timers, check INP_DROPPED flag a little later, after > >> callout_deactivate(), so if INP_DROPPED is set we return with the > >> timer active flag cleared. > >> > >> For me this fixes negative keep timer values reported by `netstat -x' > >> for connections in CLOSE state. > > > > panic: Lock tcp not read locked @ /w/src/sys/netinet/tcp_timer.c:497 > > > > reproducable on the cluster. Probably wrong all the way up to HEAD? > > This looks like a mis-merge -- in 8.x, read-locking of the inpcbinfo is not > used in the TCP timer code, whereas in 9.x and later it is. There are > important and subtle differences between inpcb/inpcb/inpcbhash locking across > all supported major FreeBSD versions, as we have substantially refined our > approach to improve performance and stability over the years. As a result, it > is generally not safe to MFC TCP/UDP locking changes without extreme care. I > would recommend seeking at least one, if not multiple, reviewers for changes > and MFCs along these lines. Even with you and others doing line-by-line > reviews of much of the original work, we ran into quite a few bugs due to the > complexity and difficulty in reviewing the code. Thanks! I am going to direct commit this patch to fix the mis-merge. Sorry, will be much more careful with such things next time. -- Mikolaj Golub --h31gzZEtNLTqOjlF Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="tcp_timer.c.stable8.diff" Index: stable/8/sys/netinet/tcp_timer.c =================================================================== --- stable/8/sys/netinet/tcp_timer.c (revision 240156) +++ stable/8/sys/netinet/tcp_timer.c (working copy) @@ -494,7 +494,7 @@ callout_deactivate(&tp->t_timers->tt_rexmt); if ((inp->inp_flags & INP_DROPPED) != 0) { INP_WUNLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); return; } --h31gzZEtNLTqOjlF-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 07:03:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD851106566C; Thu, 6 Sep 2012 07:03:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8C468FC08; Thu, 6 Sep 2012 07:03:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8673uMb077870; Thu, 6 Sep 2012 07:03:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8673u2n077866; Thu, 6 Sep 2012 07:03:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209060703.q8673u2n077866@svn.freebsd.org> From: Michael Tuexen Date: Thu, 6 Sep 2012 07: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: r240158 - 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: Thu, 06 Sep 2012 07:03:57 -0000 Author: tuexen Date: Thu Sep 6 07:03:56 2012 New Revision: 240158 URL: http://svn.freebsd.org/changeset/base/240158 Log: Get rid of a gcc'ism. MFC after: 10 days Modified: head/sys/netinet/sctp_cc_functions.c Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Thu Sep 6 06:17:39 2012 (r240157) +++ head/sys/netinet/sctp_cc_functions.c Thu Sep 6 07:03:56 2012 (r240158) @@ -1917,10 +1917,9 @@ measure_achieved_throughput(struct sctp_ return; } net->cc_mod.htcp_ca.bytecount += net->net_ack; - - if (net->cc_mod.htcp_ca.bytecount >= net->cwnd - ((net->cc_mod.htcp_ca.alpha >> 7 ? : 1) * net->mtu) - && now - net->cc_mod.htcp_ca.lasttime >= net->cc_mod.htcp_ca.minRTT - && net->cc_mod.htcp_ca.minRTT > 0) { + if ((net->cc_mod.htcp_ca.bytecount >= net->cwnd - (((net->cc_mod.htcp_ca.alpha >> 7) ? (net->cc_mod.htcp_ca.alpha >> 7) : 1) * net->mtu)) && + (now - net->cc_mod.htcp_ca.lasttime >= net->cc_mod.htcp_ca.minRTT) && + (net->cc_mod.htcp_ca.minRTT > 0)) { uint32_t cur_Bi = net->cc_mod.htcp_ca.bytecount / net->mtu * hz / (now - net->cc_mod.htcp_ca.lasttime); if (htcp_ccount(&net->cc_mod.htcp_ca) <= 3) { From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 07:45:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0299E106566C; Thu, 6 Sep 2012 07:45:46 +0000 (UTC) (envelope-from thomas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFB708FC08; Thu, 6 Sep 2012 07:45:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q867jjQX083093; Thu, 6 Sep 2012 07:45:45 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q867jjHO083089; Thu, 6 Sep 2012 07:45:45 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201209060745.q867jjHO083089@svn.freebsd.org> From: Thomas Quinot Date: Thu, 6 Sep 2012 07:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240159 - in stable/9: sbin/geom/class/multipath sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 07:45:46 -0000 Author: thomas Date: Thu Sep 6 07:45:45 2012 New Revision: 240159 URL: http://svn.freebsd.org/changeset/base/240159 Log: MFC: merge rev. 239012 from head to stable/9 New command "gmultipath prefer" to force selection of a specified provider in an Active/Passive configuration. Modified: stable/9/sbin/geom/class/multipath/geom_multipath.c stable/9/sbin/geom/class/multipath/gmultipath.8 stable/9/sys/geom/multipath/g_multipath.c Directory Properties: stable/9/sbin/geom/class/multipath/ (props changed) stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- stable/9/sbin/geom/class/multipath/geom_multipath.c Thu Sep 6 07:03:56 2012 (r240158) +++ stable/9/sbin/geom/class/multipath/geom_multipath.c Thu Sep 6 07:45:45 2012 (r240159) @@ -49,6 +49,7 @@ uint32_t version = G_MULTIPATH_VERSION; static void mp_main(struct gctl_req *, unsigned int); static void mp_label(struct gctl_req *); static void mp_clear(struct gctl_req *); +static void mp_prefer(struct gctl_req *); struct g_command class_commands[] = { { @@ -87,6 +88,10 @@ struct g_command class_commands[] = { "[-v] name prov" }, { + "prefer", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, + "[-v] prov ..." + }, + { "fail", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, "[-v] name prov" }, @@ -131,6 +136,8 @@ mp_main(struct gctl_req *req, unsigned i mp_label(req); } else if (strcmp(name, "clear") == 0) { mp_clear(req); + } else if (strcmp(name, "prefer") == 0) { + mp_prefer(req); } else { gctl_error(req, "Unknown command: %s.", name); } @@ -293,3 +300,22 @@ mp_clear(struct gctl_req *req) } } +static void +mp_prefer(struct gctl_req *req) +{ + const char *name, *comp, *errstr; + int nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs != 2) { + gctl_error(req, "Usage: prefer GEOM PROVIDER"); + return; + } + name = gctl_get_ascii(req, "arg0"); + comp = gctl_get_ascii(req, "arg1"); + errstr = gctl_issue (req); + if (errstr != NULL) { + fprintf(stderr, "Can't set %s preferred provider to %s: %s.\n", + name, comp, errstr); + } +} Modified: stable/9/sbin/geom/class/multipath/gmultipath.8 ============================================================================== --- stable/9/sbin/geom/class/multipath/gmultipath.8 Thu Sep 6 07:03:56 2012 (r240158) +++ stable/9/sbin/geom/class/multipath/gmultipath.8 Thu Sep 6 07:45:45 2012 (r240159) @@ -66,6 +66,11 @@ .Op Fl v .Ar name .Nm +.Cm prefer +.Op Fl v +.Ar name +.Ar prov +.Nm .Cm getactive .Op Fl v .Ar name @@ -171,7 +176,9 @@ If there are other paths present, new re Mark specified provider as a path of the specified multipath device as operational, allowing it to handle requests. .It Cm rotate -Change the active provider/path in Active/Passive mode. +Change the active provider/path to the next available provider in Active/Passive mode. +.It Cm prefer +Change the active provider/path to the specified provider in Active/Passive mode. .It Cm getactive Get the currently active provider(s)/path(s). .It Cm destroy Modified: stable/9/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/9/sys/geom/multipath/g_multipath.c Thu Sep 6 07:03:56 2012 (r240158) +++ stable/9/sys/geom/multipath/g_multipath.c Thu Sep 6 07:45:45 2012 (r240159) @@ -849,6 +849,78 @@ g_multipath_ctl_add_name(struct gctl_req } static void +g_multipath_ctl_prefer(struct gctl_req *req, struct g_class *mp) +{ + struct g_geom *gp; + struct g_multipath_softc *sc; + struct g_consumer *cp; + const char *name, *mpname; + static const char devpf[6] = "/dev/"; + int *nargs; + + g_topology_assert(); + + mpname = gctl_get_asciiparam(req, "arg0"); + if (mpname == NULL) { + gctl_error(req, "No 'arg0' argument"); + return; + } + gp = g_multipath_find_geom(mp, mpname); + if (gp == NULL) { + gctl_error(req, "Device %s is invalid", mpname); + return; + } + sc = gp->softc; + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No 'nargs' argument"); + return; + } + if (*nargs != 2) { + gctl_error(req, "missing device"); + return; + } + + name = gctl_get_asciiparam(req, "arg1"); + if (name == NULL) { + gctl_error(req, "No 'arg1' argument"); + return; + } + if (strncmp(name, devpf, 5) == 0) { + name += 5; + } + + LIST_FOREACH(cp, &gp->consumer, consumer) { + if (cp->provider != NULL + && strcmp(cp->provider->name, name) == 0) + break; + } + + if (cp == NULL) { + gctl_error(req, "Provider %s not found", name); + return; + } + + mtx_lock(&sc->sc_mtx); + + if (cp->index & MP_BAD) { + gctl_error(req, "Consumer %s is invalid", name); + mtx_unlock(&sc->sc_mtx); + return; + } + + /* Here when the consumer is present and in good shape */ + + sc->sc_active = cp; + if (!sc->sc_active_active) + printf("GEOM_MULTIPATH: %s now active path in %s\n", + sc->sc_active->provider->name, sc->sc_name); + + mtx_unlock(&sc->sc_mtx); +} + +static void g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) { struct g_multipath_softc *sc; @@ -1278,6 +1350,8 @@ g_multipath_config(struct gctl_req *req, gctl_error(req, "Userland and kernel parts are out of sync"); } else if (strcmp(verb, "add") == 0) { g_multipath_ctl_add(req, mp); + } else if (strcmp(verb, "prefer") == 0) { + g_multipath_ctl_prefer(req, mp); } else if (strcmp(verb, "create") == 0) { g_multipath_ctl_create(req, mp); } else if (strcmp(verb, "configure") == 0) { From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 07:48:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C5E5106564A; Thu, 6 Sep 2012 07:48:18 +0000 (UTC) (envelope-from thomas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 259348FC15; Thu, 6 Sep 2012 07:48:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q867mIlt083449; Thu, 6 Sep 2012 07:48:18 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q867mHip083444; Thu, 6 Sep 2012 07:48:17 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201209060748.q867mHip083444@svn.freebsd.org> From: Thomas Quinot Date: Thu, 6 Sep 2012 07:48: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: r240160 - in stable/8: sbin/geom/class/multipath sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 07:48:18 -0000 Author: thomas Date: Thu Sep 6 07:48:17 2012 New Revision: 240160 URL: http://svn.freebsd.org/changeset/base/240160 Log: MFC rev. 239012 to stable/8: New command "gmultipath prefer" to force selection of a specified provider in an Active/Passive configuration. Modified: stable/8/sbin/geom/class/multipath/geom_multipath.c stable/8/sbin/geom/class/multipath/gmultipath.8 stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sbin/geom/class/multipath/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/compat/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) stable/8/sys/dev/virtio/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sbin/geom/class/multipath/geom_multipath.c ============================================================================== --- stable/8/sbin/geom/class/multipath/geom_multipath.c Thu Sep 6 07:45:45 2012 (r240159) +++ stable/8/sbin/geom/class/multipath/geom_multipath.c Thu Sep 6 07:48:17 2012 (r240160) @@ -49,6 +49,7 @@ uint32_t version = G_MULTIPATH_VERSION; static void mp_main(struct gctl_req *, unsigned int); static void mp_label(struct gctl_req *); static void mp_clear(struct gctl_req *); +static void mp_prefer(struct gctl_req *); struct g_command class_commands[] = { { @@ -87,6 +88,10 @@ struct g_command class_commands[] = { NULL, "[-v] name prov" }, { + "prefer", G_FLAG_VERBOSE, mp_main, G_NULL_OPTS, + NULL, "[-v] prov ..." + }, + { "fail", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov" }, @@ -131,6 +136,8 @@ mp_main(struct gctl_req *req, unsigned i mp_label(req); } else if (strcmp(name, "clear") == 0) { mp_clear(req); + } else if (strcmp(name, "prefer") == 0) { + mp_prefer(req); } else { gctl_error(req, "Unknown command: %s.", name); } @@ -293,3 +300,22 @@ mp_clear(struct gctl_req *req) } } +static void +mp_prefer(struct gctl_req *req) +{ + const char *name, *comp, *errstr; + int nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs != 2) { + gctl_error(req, "Usage: prefer GEOM PROVIDER"); + return; + } + name = gctl_get_ascii(req, "arg0"); + comp = gctl_get_ascii(req, "arg1"); + errstr = gctl_issue (req); + if (errstr != NULL) { + fprintf(stderr, "Can't set %s preferred provider to %s: %s.\n", + name, comp, errstr); + } +} Modified: stable/8/sbin/geom/class/multipath/gmultipath.8 ============================================================================== --- stable/8/sbin/geom/class/multipath/gmultipath.8 Thu Sep 6 07:45:45 2012 (r240159) +++ stable/8/sbin/geom/class/multipath/gmultipath.8 Thu Sep 6 07:48:17 2012 (r240160) @@ -66,6 +66,11 @@ .Op Fl v .Ar name .Nm +.Cm prefer +.Op Fl v +.Ar name +.Ar prov +.Nm .Cm getactive .Op Fl v .Ar name @@ -171,7 +176,9 @@ If there are other paths present, new re Mark specified provider as a path of the specified multipath device as operational, allowing it to handle requests. .It Cm rotate -Change the active provider/path in Active/Passive mode. +Change the active provider/path to the next available provider in Active/Passive mode. +.It Cm prefer +Change the active provider/path to the specified provider in Active/Passive mode. .It Cm getactive Get the currently active provider(s)/path(s). .It Cm destroy Modified: stable/8/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/8/sys/geom/multipath/g_multipath.c Thu Sep 6 07:45:45 2012 (r240159) +++ stable/8/sys/geom/multipath/g_multipath.c Thu Sep 6 07:48:17 2012 (r240160) @@ -847,6 +847,78 @@ g_multipath_ctl_add_name(struct gctl_req } static void +g_multipath_ctl_prefer(struct gctl_req *req, struct g_class *mp) +{ + struct g_geom *gp; + struct g_multipath_softc *sc; + struct g_consumer *cp; + const char *name, *mpname; + static const char devpf[6] = "/dev/"; + int *nargs; + + g_topology_assert(); + + mpname = gctl_get_asciiparam(req, "arg0"); + if (mpname == NULL) { + gctl_error(req, "No 'arg0' argument"); + return; + } + gp = g_multipath_find_geom(mp, mpname); + if (gp == NULL) { + gctl_error(req, "Device %s is invalid", mpname); + return; + } + sc = gp->softc; + + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); + if (nargs == NULL) { + gctl_error(req, "No 'nargs' argument"); + return; + } + if (*nargs != 2) { + gctl_error(req, "missing device"); + return; + } + + name = gctl_get_asciiparam(req, "arg1"); + if (name == NULL) { + gctl_error(req, "No 'arg1' argument"); + return; + } + if (strncmp(name, devpf, 5) == 0) { + name += 5; + } + + LIST_FOREACH(cp, &gp->consumer, consumer) { + if (cp->provider != NULL + && strcmp(cp->provider->name, name) == 0) + break; + } + + if (cp == NULL) { + gctl_error(req, "Provider %s not found", name); + return; + } + + mtx_lock(&sc->sc_mtx); + + if (cp->index & MP_BAD) { + gctl_error(req, "Consumer %s is invalid", name); + mtx_unlock(&sc->sc_mtx); + return; + } + + /* Here when the consumer is present and in good shape */ + + sc->sc_active = cp; + if (!sc->sc_active_active) + printf("GEOM_MULTIPATH: %s now active path in %s\n", + sc->sc_active->provider->name, sc->sc_name); + + mtx_unlock(&sc->sc_mtx); +} + +static void g_multipath_ctl_add(struct gctl_req *req, struct g_class *mp) { struct g_multipath_softc *sc; @@ -1276,6 +1348,8 @@ g_multipath_config(struct gctl_req *req, gctl_error(req, "Userland and kernel parts are out of sync"); } else if (strcmp(verb, "add") == 0) { g_multipath_ctl_add(req, mp); + } else if (strcmp(verb, "prefer") == 0) { + g_multipath_ctl_prefer(req, mp); } else if (strcmp(verb, "create") == 0) { g_multipath_ctl_create(req, mp); } else if (strcmp(verb, "configure") == 0) { From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 10:10:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6D071065673; Thu, 6 Sep 2012 10:10:57 +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 9094B8FC0A; Thu, 6 Sep 2012 10:10:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86AAv34002639; Thu, 6 Sep 2012 10:10:57 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86AAvgA002636; Thu, 6 Sep 2012 10:10:57 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209061010.q86AAvgA002636@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 6 Sep 2012 10:10: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: r240161 - stable/8/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: Thu, 06 Sep 2012 10:10:57 -0000 Author: trociny Date: Thu Sep 6 10:10:56 2012 New Revision: 240161 URL: http://svn.freebsd.org/changeset/base/240161 Log: Direct commit to stable/8 to fix the mis-merge in r239983: in 8.x read-locking of the inpcbinfo is not used in the TCP timer code. Reported by: bz Submitted by: rwatson Modified: stable/8/sys/netinet/tcp_timer.c Modified: stable/8/sys/netinet/tcp_timer.c ============================================================================== --- stable/8/sys/netinet/tcp_timer.c Thu Sep 6 07:48:17 2012 (r240160) +++ stable/8/sys/netinet/tcp_timer.c Thu Sep 6 10:10:56 2012 (r240161) @@ -494,7 +494,7 @@ tcp_timer_rexmt(void * xtp) callout_deactivate(&tp->t_timers->tt_rexmt); if ((inp->inp_flags & INP_DROPPED) != 0) { INP_WUNLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); return; } From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 10:23:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCD51065673; Thu, 6 Sep 2012 10:23:22 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 496788FC1A; Thu, 6 Sep 2012 10:23:21 +0000 (UTC) Received: by lage12 with SMTP id e12so1284935lag.13 for ; Thu, 06 Sep 2012 03:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=HB3RVjiElOXIDwFkD556A2BWMg9vl78HQ0ExkpARFew=; b=KlBC5GdvlbLKBeQ16M8RorzGg+KA3gto6tFTvkDq9y94gVFOo4qSs/KvP9tQDBYa0/ RTHI2DDF1PKNdefe5eyOVcDCxlCfSTJXVWtMaqW+9iomgY6LeU+i0XXD1d/XudSPliiS dtpEhnmvMAjn0iUtbgTFAmq75uOt1v/ndsn/GhKzsIVgBJJjznC75qLGZsd7o6KJmNXC ytrPgQtF0lza6NibL4ijC7cKq+YtqxoQnZyKbAoOz9JUlarUgX63wt5mnWQdmWVD2peR GYnjGq9DQD9JTK28cLc5cBZ2J+Z1EByIMebEflRkXQ/fR+c064Xlo+FS3u97IiksP46a FSYg== Received: by 10.112.98.70 with SMTP id eg6mr644688lbb.121.1346927000117; Thu, 06 Sep 2012 03:23:20 -0700 (PDT) Received: from localhost ([188.230.122.226]) by mx.google.com with ESMTPS id d1sm455828lbk.16.2012.09.06.03.23.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 03:23:19 -0700 (PDT) Date: Thu, 6 Sep 2012 13:23:15 +0300 From: Mikolaj Golub To: Robert Watson Message-ID: <20120906102314.GB94205@gmail.com> References: <201209011033.q81AXsGb094283@svn.freebsd.org> <20120906062330.GA94205@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120906062330.GA94205@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r239983 - stable/8/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: Thu, 06 Sep 2012 10:23:23 -0000 On Thu, Sep 06, 2012 at 09:23:32AM +0300, Mikolaj Golub wrote: > Thanks! I am going to direct commit this patch to fix the mis-merge. Committed as r240161. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 11:12:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACA91065672; Thu, 6 Sep 2012 11:12:04 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback2.mail.ru (fallback2.mail.ru [94.100.176.87]) by mx1.freebsd.org (Postfix) with ESMTP id C64FA8FC0C; Thu, 6 Sep 2012 11:12:03 +0000 (UTC) Received: from smtp13.mail.ru (smtp13.mail.ru [94.100.176.90]) by fallback2.mail.ru (mPOP.Fallback_MX) with ESMTP id CA270B6078B5; Thu, 6 Sep 2012 13:43:43 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=kRswVH7JH7e89Vu1th9rhx4J0MT91xaVKIahiO74cPY=; b=q/UN/yh2rOvLmMgmDSLnUacxrmegpBsDZM9GU7J9Hvk1Wxf4vs05CY0n1JqXavo/pD6gxU4kXUk4u+86pW6bKs0wL6wx/UPedJxSAMEfVauqqyHr1XY+QtE+ZM1jSuZY; Received: from [93.185.182.46] (port=59629 helo=gpr.nnz-home.ru) by smtp13.mail.ru with esmtpa (envelope-from ) id 1T9YcY-0005QR-Gl; Thu, 06 Sep 2012 13:43:35 +0400 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.80 (FreeBSD)) (envelope-from ) id 1T9Ybe-000Pd3-O8; Thu, 06 Sep 2012 13:42:38 +0400 Date: Thu, 6 Sep 2012 13:42:38 +0400 From: Gennady Proskurin To: Rui Paulo Message-ID: <20120906094238.GF85904@gpr.nnz-home.ru> References: <201209060319.q863JnDe050504@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209060319.q863JnDe050504@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam: Not detected X-Mras: Ok Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240156 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 11:12:05 -0000 On Thu, Sep 06, 2012 at 03:19:49AM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Thu Sep 6 03:19:48 2012 > New Revision: 240156 > URL: http://svn.freebsd.org/changeset/base/240156 > > Log: > Add support for demangling C++ symbols. This requires linking libproc with > libc++rt/libsupc++. > > Discussed with: theraven > > Modified: > head/lib/libproc/Makefile > head/lib/libproc/proc_sym.c > > Modified: head/lib/libproc/Makefile > ============================================================================== > --- head/lib/libproc/Makefile Thu Sep 6 02:07:58 2012 (r240155) > +++ head/lib/libproc/Makefile Thu Sep 6 03:19:48 2012 (r240156) > @@ -1,5 +1,7 @@ > # $FreeBSD$ > > +.include > + > LIB= proc > > SRCS= proc_bkpt.c \ > @@ -13,6 +15,14 @@ INCS= libproc.h > > CFLAGS+= -I${.CURDIR} > > +.if ${MK_LIBCPLUSPLUS} != "no" > +LDADD+= -lcxxrt > +DPADD+= ${LIBCXXRT} > +.else > +LDADD+= -lsupc++ > +DPADD+= ${LIBSTDCPLUSPLUS} > +.endif > + > SHLIB_MAJOR= 2 > > WITHOUT_MAN= > > Modified: head/lib/libproc/proc_sym.c > ============================================================================== > --- head/lib/libproc/proc_sym.c Thu Sep 6 02:07:58 2012 (r240155) > +++ head/lib/libproc/proc_sym.c Thu Sep 6 03:19:48 2012 (r240156) > @@ -46,6 +46,8 @@ > > #include "_libproc.h" > > +extern char *__cxa_demangle(const char *, char *, size_t *, int *); > + > static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); > > static void > @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin > if (addr >= rsym && addr <= (rsym + sym.st_size)) { > s = elf_strptr(e, dynsymstridx, sym.st_name); > if (s) { > - strlcpy(name, s, namesz); > + if (strlen(s) > 2 && > + s[0] == '_' && s[1] == 'Z') checking "strlen(s) > 2" is useless and not optimal here, you can omit it completely checking s[0] and s[1] is enough, it implies that length is >=2 you may add something like "s[2] != 0" if length should be strictly >2 > + __cxa_demangle(s, name, &namesz, NULL); > + else > + strlcpy(name, s, namesz); > memcpy(symcopy, &sym, sizeof(sym)); > /* > * DTrace expects the st_value to contain > @@ -302,7 +308,11 @@ symtab: > if (addr >= rsym && addr <= (rsym + sym.st_size)) { > s = elf_strptr(e, symtabstridx, sym.st_name); > if (s) { > - strlcpy(name, s, namesz); > + if (strlen(s) > 2 && > + s[0] == '_' && s[1] == 'Z') > + __cxa_demangle(s, name, &namesz, NULL); > + else > + strlcpy(name, s, namesz); the same here > memcpy(symcopy, &sym, sizeof(sym)); > /* > * DTrace expects the st_value to contain > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 12:15:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 515B8106564A; Thu, 6 Sep 2012 12:15:17 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep12.mx.upcmail.net (fep12.mx.upcmail.net [62.179.121.32]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2728FC12; Thu, 6 Sep 2012 12:15:15 +0000 (UTC) Received: from edge01.upcmail.net ([192.168.13.236]) by viefep12-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120906121514.EJAE2716.viefep12-int.chello.at@edge01.upcmail.net>; Thu, 6 Sep 2012 14:15:14 +0200 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge01.upcmail.net with edge id voFD1j0252xdvHc01oFDo7; Thu, 06 Sep 2012 14:15:14 +0200 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id A0F666D466; Thu, 6 Sep 2012 14:15:13 +0200 (CEST) Date: Thu, 6 Sep 2012 14:15:13 +0200 From: Stefan Farfeleder To: Rui Paulo Message-ID: <20120906121513.GG1361@mole.fafoe.narf.at> References: <201209060319.q863JnDe050504@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201209060319.q863JnDe050504@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: r240156 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 12:15:17 -0000 On Thu, Sep 06, 2012 at 03:19:49AM +0000, Rui Paulo wrote: > @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin > if (addr >= rsym && addr <= (rsym + sym.st_size)) { > s = elf_strptr(e, dynsymstridx, sym.st_name); > if (s) { > - strlcpy(name, s, namesz); > + if (strlen(s) > 2 && > + s[0] == '_' && s[1] == 'Z') > + __cxa_demangle(s, name, &namesz, NULL); > + else > + strlcpy(name, s, namesz); > memcpy(symcopy, &sym, sizeof(sym)); > /* > * DTrace expects the st_value to contain According to the documentation, __cxa_demangle will realloc the buffer if it is too small and return the new buffer. This case is not handled correctly. Stefan From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 13:43:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C7061065670; Thu, 6 Sep 2012 13:43:49 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B998FC0A; Thu, 6 Sep 2012 13:43:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86DhnvJ029113; Thu, 6 Sep 2012 13:43:49 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86Dhn2r029111; Thu, 6 Sep 2012 13:43:49 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201209061343.q86Dhn2r029111@svn.freebsd.org> From: Martin Matuska Date: Thu, 6 Sep 2012 13: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: r240162 - head/sys/cddl/compat/opensolaris/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: Thu, 06 Sep 2012 13:43:49 -0000 Author: mm Date: Thu Sep 6 13:43:48 2012 New Revision: 240162 URL: http://svn.freebsd.org/changeset/base/240162 Log: Make r230454 more readable and vendor-like. PR: kern/171380 MFC after: 3 days Modified: head/sys/cddl/compat/opensolaris/sys/sid.h Modified: head/sys/cddl/compat/opensolaris/sys/sid.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/sid.h Thu Sep 6 10:10:56 2012 (r240161) +++ head/sys/cddl/compat/opensolaris/sys/sid.h Thu Sep 6 13:43:48 2012 (r240162) @@ -30,7 +30,8 @@ #define _OPENSOLARIS_SYS_SID_H_ typedef struct ksiddomain { - char kd_name[1]; /* Domain part of SID */ + char *kd_name; /* Domain part of SID */ + uint_t kd_len; } ksiddomain_t; typedef void ksid_t; @@ -38,8 +39,12 @@ static __inline ksiddomain_t * ksid_lookupdomain(const char *domain) { ksiddomain_t *kd; + size_t len; - kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP); + len = strlen(domain) + 1; + kd = kmem_alloc(sizeof(*kd), KM_SLEEP); + kd->kd_len = (uint_t)len; + kd->kd_name = kmem_alloc(len, KM_SLEEP); strcpy(kd->kd_name, domain); return (kd); } @@ -48,6 +53,7 @@ static __inline void ksiddomain_rele(ksiddomain_t *kd) { + kmem_free(kd->kd_name, kd->kd_len); kmem_free(kd, sizeof(*kd)); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 13:47:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7EEE106566B; Thu, 6 Sep 2012 13:47:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B369C8FC0A; Thu, 6 Sep 2012 13:47:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86DlgCF029499; Thu, 6 Sep 2012 13:47:42 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86Dlgqq029497; Thu, 6 Sep 2012 13:47:42 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209061347.q86Dlgqq029497@svn.freebsd.org> From: Ed Maste Date: Thu, 6 Sep 2012 13:47: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: r240163 - head/contrib/gdb/gdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 13:47:42 -0000 Author: emaste Date: Thu Sep 6 13:47:42 2012 New Revision: 240163 URL: http://svn.freebsd.org/changeset/base/240163 Log: Fix "Corrupted DWARF expression" from (k)gdb. Google turned up Debian bug 405116, which describes the problem in sufficient detail to identify the overflowing variables. MFC after: 1 week Modified: head/contrib/gdb/gdb/dwarf2loc.h Modified: head/contrib/gdb/gdb/dwarf2loc.h ============================================================================== --- head/contrib/gdb/gdb/dwarf2loc.h Thu Sep 6 13:43:48 2012 (r240162) +++ head/contrib/gdb/gdb/dwarf2loc.h Thu Sep 6 13:47:42 2012 (r240163) @@ -38,7 +38,7 @@ struct dwarf2_locexpr_baton unsigned char *data; /* Length of the location expression. */ - unsigned short size; + unsigned long size; /* The objfile containing the symbol whose location we're computing. */ struct objfile *objfile; @@ -54,7 +54,7 @@ struct dwarf2_loclist_baton unsigned char *data; /* Length of the location list. */ - unsigned short size; + unsigned long size; /* The objfile containing the symbol whose location we're computing. */ /* Used (only???) by thread local variables. The objfile in which From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 13:54:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2367F106566C; Thu, 6 Sep 2012 13:54:02 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9988FC0A; Thu, 6 Sep 2012 13:54:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86Ds1r1030280; Thu, 6 Sep 2012 13:54:02 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86Ds10n030275; Thu, 6 Sep 2012 13:54:01 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201209061354.q86Ds10n030275@svn.freebsd.org> From: Fabien Thomas Date: Thu, 6 Sep 2012 13: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: r240164 - in head: lib/libpmc sys/dev/hwpmc 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: Thu, 06 Sep 2012 13:54:02 -0000 Author: fabient Date: Thu Sep 6 13:54:01 2012 New Revision: 240164 URL: http://svn.freebsd.org/changeset/base/240164 Log: Add Intel Ivy Bridge support to hwpmc(9). Update offcore RSP token for Sandy Bridge. Note: No uncore support. Will works on Family 6 Model 3a. MFC after: 1 month Tested by: bapt, grehan Added: head/lib/libpmc/pmc.ivybridge.3 (contents, props changed) Modified: head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.sandybridge.3 head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Thu Sep 6 13:47:42 2012 (r240163) +++ head/lib/libpmc/Makefile Thu Sep 6 13:54:01 2012 (r240164) @@ -28,6 +28,7 @@ MAN+= pmc.atom.3 MAN+= pmc.core.3 MAN+= pmc.core2.3 MAN+= pmc.iaf.3 +MAN+= pmc.ivybridge.3 MAN+= pmc.ucf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Thu Sep 6 13:47:42 2012 (r240163) +++ head/lib/libpmc/libpmc.c Thu Sep 6 13:54:01 2012 (r240164) @@ -183,6 +183,11 @@ static const struct pmc_event_descr core __PMC_EV_ALIAS_COREI7() }; +static const struct pmc_event_descr ivybridge_event_table[] = +{ + __PMC_EV_ALIAS_IVYBRIDGE() +}; + static const struct pmc_event_descr sandybridge_event_table[] = { __PMC_EV_ALIAS_SANDYBRIDGE() @@ -222,6 +227,7 @@ PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_SOFT PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); @@ -259,6 +265,7 @@ PMC_CLASS_TABLE_DESC(atom, IAP, atom, ia PMC_CLASS_TABLE_DESC(core, IAP, core, iap); PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); PMC_CLASS_TABLE_DESC(westmere, IAP, westmere, iap); PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); @@ -365,14 +372,14 @@ static struct pmc_op_getdyneventinfo sof /* Event masks for events */ struct pmc_masks { const char *pm_name; - const uint32_t pm_value; + const uint64_t pm_value; }; #define PMCMASK(N,V) { .pm_name = #N, .pm_value = (V) } #define NULLMASK { .pm_name = NULL } #if defined(__amd64__) || defined(__i386__) static int -pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint32_t *evmask) +pmc_parse_mask(const struct pmc_masks *pmask, char *p, uint64_t *evmask) { const struct pmc_masks *pm; char *q, *r; @@ -561,6 +568,8 @@ static struct pmc_event_alias core2_alia #define atom_aliases_without_iaf core2_aliases_without_iaf #define corei7_aliases core2_aliases #define corei7_aliases_without_iaf core2_aliases_without_iaf +#define ivybridge_aliases core2_aliases +#define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define sandybridge_aliases core2_aliases #define sandybridge_aliases_without_iaf core2_aliases_without_iaf #define westmere_aliases core2_aliases @@ -663,7 +672,7 @@ static struct pmc_masks iap_transition_m NULLMASK }; -static struct pmc_masks iap_rsp_mask[] = { +static struct pmc_masks iap_rsp_mask_i7_wm[] = { PMCMASK(DMND_DATA_RD, (1 << 0)), PMCMASK(DMND_RFO, (1 << 1)), PMCMASK(DMND_IFETCH, (1 << 2)), @@ -682,12 +691,43 @@ static struct pmc_masks iap_rsp_mask[] = NULLMASK }; +static struct pmc_masks iap_rsp_mask_sb_ib[] = { + PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), + PMCMASK(REQ_DMND_RFO, (1ULL << 1)), + PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)), + PMCMASK(REQ_WB, (1ULL << 3)), + PMCMASK(REQ_PF_DATA_RD, (1ULL << 4)), + PMCMASK(REQ_PF_RFO, (1ULL << 5)), + PMCMASK(REQ_PF_IFETCH, (1ULL << 6)), + PMCMASK(REQ_PF_LLC_DATA_RD, (1ULL << 7)), + PMCMASK(REQ_PF_LLC_RFO, (1ULL << 8)), + PMCMASK(REQ_PF_LLC_IFETCH, (1ULL << 9)), + PMCMASK(REQ_BUS_LOCKS, (1ULL << 10)), + PMCMASK(REQ_STRM_ST, (1ULL << 11)), + PMCMASK(REQ_OTHER, (1ULL << 15)), + PMCMASK(RES_ANY, (1ULL << 16)), + PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)), + PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)), + PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)), + PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), + PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), + PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), + PMCMASK(RES_SNOOP_SNPI_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), + PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), + PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), + PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)), + PMCMASK(RES_SNOOP_HITM, (1ULL << 36)), + PMCMASK(RES_NON_DRAM, (1ULL << 37)), + NULLMASK +}; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t cachestate, evmask, rsp; + uint64_t cachestate, evmask, rsp; int count, n; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | @@ -753,7 +793,13 @@ iap_allocate_pmc(enum pmc_event pe, char } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7 || cpu_info.pm_cputype == PMC_CPU_INTEL_WESTMERE) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { - n = pmc_parse_mask(iap_rsp_mask, p, &rsp); + n = pmc_parse_mask(iap_rsp_mask_i7_wm, p, &rsp); + } else + return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SANDYBRIDGE || + cpu_info.pm_cputype == PMC_CPU_INTEL_IVYBRIDGE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_sb_ib, p, &rsp); } else return (-1); } else @@ -1072,7 +1118,8 @@ k8_allocate_pmc(enum pmc_event pe, char { char *e, *p, *q; int n; - uint32_t count, evmask; + uint32_t count; + uint64_t evmask; const struct pmc_masks *pm, *pmask; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -1554,7 +1601,8 @@ p4_allocate_pmc(enum pmc_event pe, char char *e, *p, *q; int count, has_tag, has_busreqtype, n; - uint32_t evmask, cccractivemask; + uint32_t cccractivemask; + uint64_t evmask; const struct pmc_masks *pm, *pmask; pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); @@ -1982,7 +2030,7 @@ p6_allocate_pmc(enum pmc_event pe, char struct pmc_op_pmcallocate *pmc_config) { char *e, *p, *q; - uint32_t evmask; + uint64_t evmask; int count, n; const struct pmc_masks *pm, *pmask; @@ -2622,6 +2670,10 @@ pmc_event_names_of_class(enum pmc_class ev = corei7_event_table; count = PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + ev = ivybridge_event_table; + count = PMC_EVENT_TABLE_SIZE(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridge_event_table; count = PMC_EVENT_TABLE_SIZE(sandybridge); @@ -2914,6 +2966,9 @@ pmc_init(void) pmc_class_table[n++] = &corei7uc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + PMC_MDEP_INIT_INTEL_V2(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: pmc_class_table[n++] = &ucf_class_table_descr; pmc_class_table[n++] = &sandybridgeuc_class_table_descr; @@ -3049,6 +3104,10 @@ _pmc_name_of_event(enum pmc_event pe, en ev = corei7_event_table; evfence = corei7_event_table + PMC_EVENT_TABLE_SIZE(corei7); break; + case PMC_CPU_INTEL_IVYBRIDGE: + ev = ivybridge_event_table; + evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridge_event_table; evfence = sandybridge_event_table + PMC_EVENT_TABLE_SIZE(sandybridge); Added: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpmc/pmc.ivybridge.3 Thu Sep 6 13:54:01 2012 (r240164) @@ -0,0 +1,880 @@ +.\" Copyright (c) 2012 Fabien Thomas. 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$ +.\" +.Dd August 24, 2012 +.Dt PMC.IVYBRIDGE 3 +.Os +.Sh NAME +.Nm pmc.ivybridge +.Nd measurement events for +.Tn Intel +.Tn Ivy Bridge +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Ivy Bridge" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to three classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Ivy Bridge PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual" +Intel(R) 64 and IA-32 Architectures Software Developers Manual" +.%T "Volume 3B: System Programming Guide, Part 2" +.%N "Order Number: 253669-043US" +.%D May 2012 +.%Q "Intel Corporation" +.Re +.Ss IVYBRIDGE FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +.Ss IVYBRIDGE PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li REQ_DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full and partial +cachelines as well as demand data page table entry cacheline reads. Does not +count L2 data read prefetches or instruction fetches. +.It Li REQ_DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership (RFO) +requests generated by a write to data cacheline. Does not count L2 RFO +prefetches. +.It Li REQ_DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline reads. +Does not count L2 code read prefetches. +.It Li REQ_WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li REQ_PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li REQ_PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li REQ_PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li REQ_PF_LLC_DATA_RD +L2 prefetcher to L3 for loads. +.It Li REQ_PF_LLC_RFO +RFO requests generated by L2 prefetcher +.It Li REQ_PF_LLC_IFETCH +L2 prefetcher to L3 for instruction fetches. +.It Li REQ_BUS_LOCKS +Bus lock and split lock requests. +.It Li REQ_STRM_ST +Streaming store requests. +.It Li REQ_OTHER +Any other request that crosses IDI, including I/O. +.It Li RES_ANY +Catch all value for any response types. +.It Li RES_SUPPLIER_NO_SUPP +No Supplier Information available. +.It Li RES_SUPPLIER_LLC_HITM +M-state initial lookup stat in L3. +.It Li RES_SUPPLIER_LLC_HITE +E-state. +.It Li RES_SUPPLIER_LLC_HITS +S-state. +.It Li RES_SUPPLIER_LLC_HITF +F-state. +.It Li RES_SUPPLIER_LOCAL +Local DRAM Controller. +.It Li RES_SNOOP_SNPI_NONE +No details on snoop-related information. +.It Li RES_SNOOP_SNP_NO_NEEDED +No snoop was needed to satisfy the request. +.It Li RES_SNOOP_SNP_MISS +A snoop was needed and it missed all snooped caches: +-For LLC Hit, ReslHitl was returned by all cores +-For LLC Miss, Rspl was returned by all sockets and data was returned from +DRAM. +.It Li RES_SNOOP_HIT_NO_FWD +A snoop was needed and it hits in at least one snooped cache. Hit denotes a +cache-line was valid before snoop effect. This includes: +-Snoop Hit w/ Invalidation (LLC Hit, RFO) +-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) +-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) +In the LLC Miss case, data is returned from DRAM. +.It Li RES_SNOOP_HIT_FWD +A snoop was needed and data was forwarded from a remote socket. +This includes: +-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT). +.It Li RES_SNOOP_HITM +A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a +cache-line was in modified state before effect as a results of snoop. This +includes: +-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) +-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) +-Snoop MtoS (LLC Hit, IFetch/Data_RD). +.It Li RES_NON_DRAM +Target was non-DRAM system address. This includes MMIO transactions. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Ivy Bridge programmable PMCs support the following events: +.Bl -tag -width indent +.It Li LD_BLOCKS.STORE_FORWARD +.Pq Event 03H , Umask 02H +loads blocked by overlapping with store buffer that cannot be forwarded . +.It Li MISALIGN_MEM_REF.LOADS +.Pq Event 05H , Umask 01H +Speculative cache-line split load uops dispatched to L1D. +.It Li MISALIGN_MEM_REF.STORES +.Pq Event 05H , Umask 02H +Speculative cache-line split Store- address uops dispatched to L1D. +.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +False dependencies in MOB due to partial compare on address. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK +.Pq Event 08H , Umask 81H +Misses in all TLB levels that cause a page walk of any page size from demand loads. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETED +.Pq Event 08H , Umask 82H +Misses in all TLB levels that caused page walk completed of any size by demand loads. +.It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATION +.Pq Event 08H , Umask 84H +Cycle PMH is busy with a walk due to demand loads. +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +Increments each cycle the # of Uops issued by the RAT to RS. +Set Cmask = 1, Inv = 1to count stalled cycles. +Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core. +.It Li UOPS_ISSUED.FLAGS_MERGE +.Pq Event 0EH , Umask 10H +Number of flags-merge uops allocated. Such uops adds delay. +.It Li UOPS_ISSUED.SLOW_LEA +.Pq Event 0EH , Umask 20H +Number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2 +sources + immediate) regardless if as a result of LEA instruction or not. +.It Li UOPS_ISSUED.SINGLE_MUL +.Pq Event 0EH , Umask 40H +Number of multiply packed/scalar single precision uops allocated. +.It Li ARITH.FPU_DIV_ACTIVE +.Pq Event 14H , Umask 01H +Cycles that the divider is active, includes INT and FP. Set 'edge =1, +cmask=1' to count the number of divides. +.It Li L2_RQSTS.DEMAND_DATA_RD_HIT +.Pq Event 24H , Umask 01H +Demand Data Read requests that hit L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_DATA_RD +.Pq Event 24H , Umask 03H +Counts any demand and L1 HW prefetch data load requests to L2. +.It Li L2_RQSTS.RFO_HITS +.Pq Event 24H , Umask 04H +Counts the number of store RFO requests that hit the L2 cache. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 08H +Counts the number of store RFO requests that miss the L2 cache. +.It Li L2_RQSTS.ALL_RFO +.Pq Event 24H , Umask 0CH +Counts all L2 store RFO requests. +.It Li L2_RQSTS.CODE_RD_HIT +.Pq Event 24H , Umask 10H +Number of instruction fetches that hit the L2 cache. +.It Li L2_RQSTS.CODE_RD_MISS +.Pq Event 24H , Umask 20H +Number of instruction fetches that missed the L2 cache. +.It Li L2_RQSTS.ALL_CODE_RD +.Pq Event 24H , Umask 30H +Counts all L2 code requests. +.It Li L2_RQSTS.PF_HIT +.Pq Event 24H , Umask 40H +Counts all L2 HW prefetcher requests that hit L2. +.It Li L2_RQSTS.PF_MISS +.Pq Event 24H , Umask 80H +Counts all L2 HW prefetcher requests that missed L2. +.It Li L2_RQSTS.ALL_PF +.Pq Event 24H , Umask C0H +Counts all L2 HW prefetcher requests. +.It Li L2_STORE_LOCK_RQSTS.MISS +.Pq Event 27H , Umask 01H +RFOs that miss cache lines. +.It Li L2_STORE_LOCK_RQSTS.HIT_M +.Pq Event 27H , Umask 08H +RFOs that hit cache lines in M state. +.It Li L2_STORE_LOCK_RQSTS.ALL +.Pq Event 27H , Umask 0FH +RFOs that access cache lines in any state. +.It Li L2_L1D_WB_RQSTS.MISS +.Pq Event 28H , Umask 01H +Not rejected writebacks that missed LLC. +.It Li L2_L1D_WB_RQSTS.HIT_E +.Pq Event 28H , Umask 04H +Not rejected writebacks from L1D to L2 cache lines in E state. +.It Li L2_L1D_WB_RQSTS.HIT_M +.Pq Event 28H , Umask 08H +Not rejected writebacks from L1D to L2 cache lines in M state. +.It Li L2_L1D_WB_RQSTS.ALL +.Pq Event 28H , Umask 0FH +Not rejected writebacks from L1D to L2 cache lines in any state. +.It Li LONGEST_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core that reference a cache +line in the last level cache. +.It Li LONGEST_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for references to the last level +cache. +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread is not in a halt state. +The thread enters the halt state when it is running the HLT instruction. The +core frequency may change from time to time due to power or thermal +throttling. +.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK +.Pq Event 3CH , Umask 01H +Increments at the frequency of XCLK (100 MHz) when not halted. +.It Li L1D_PEND_MISS.PENDING +.Pq Event 48H , Umask 01H +Increments the number of outstanding L1D misses every cycle. Set Cmaks = 1 +and Edge =1 to count occurrences. +Counter 2 only. +Set Cmask = 1 to count cycles. +.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK +.Pq Event 49H , Umask 01H +Miss in all TLB levels causes an page walk of any page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 02H +Miss in all TLB levels causes a page walk that completes of any page size +(4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_DURATION +.Pq Event 49H , Umask 04H +Cycles PMH is busy with this walk. +.It Li DTLB_STORE_MISSES.STLB_HIT +.Pq Event 49H , Umask 10H +Store operations that miss the first TLB level but hit the second and do not +cause page walks. +.It Li LOAD_HIT_PRE.SW_PF +.Pq Event 4CH , Umask 01H +Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch. +.It Li LOAD_HIT_PRE.HW_PF +.Pq Event 4CH , Umask 02H +Non-SW-prefetch load dispatches that hit fill buffer allocated for H/W prefetch. +.It Li L1D.REPLACEMENT +.Pq Event 51H , Umask 01H +Counts the number of lines brought into the L1 data cache. +.It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED +.Pq Event 58H , Umask 01H +Number of integer Move Elimination candidate uops that were not eliminated. +.It Li MOVE_ELIMINATION.SIMD_NOT_ELIMINATED +.Pq Event 58H , Umask 02H +Number of SIMD Move Elimination candidate uops that were not eliminated. +.It Li MOVE_ELIMINATION.INT_ELIMINATED +.Pq Event 58H , Umask 04H +Number of integer Move Elimination candidate uops that were eliminated. +.It Li MOVE_ELIMINATION.SIMD_ELIMINATED +.Pq Event 58H , Umask 08H +Number of SIMD Move Elimination candidate uops that were eliminated. +.It Li CPL_CYCLES.RING0 +.Pq Event 5CH , Umask 01H +Unhalted core cycles when the thread is in ring 0. +Use Edge to count transition. +.It Li CPL_CYCLES.RING123 +.Pq Event 5CH , Umask 02H +Unhalted core cycles when the thread is not in ring 0. +.It Li RS_EVENTS.EMPTY_CYCLES +.Pq Event 5EH , Umask 01H +Cycles the RS is empty for the thread. +.It Li TLB_ACCESS.LOAD_STLB_HIT +.Pq Event 5FH , Umask 01H +Counts load operations that missed 1st level DTLB but hit the 2nd level. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD +.Pq Event 60H , Umask 01H +Offcore outstanding Demand Data Read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD +.Pq Event 60H , Umask 02H +Offcore outstanding Demand Code Read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO +.Pq Event 60H , Umask 04H +Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to +count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD +.Pq Event 60H , Umask 08H +Offcore outstanding cacheable data read transactions in SQ to uncore. Set +Cmask=1 to count cycles. +.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION +.Pq Event 63H , Umask 01H +Cycles in which the L1D and L2 are locked, due to a UC lock or split lock. +.It Li LOCK_CYCLES.CACHE_LOCK_DURATION +.Pq Event 63H , Umask 02H +Cycles in which the L1D is locked. +.It Li IDQ.EMPTY +.Pq Event 79H , Umask 02H +Counts cycles the IDQ is empty. +.It Li IDQ.MITE_UOPS +.Pq Event 79H , Umask 04H +Increment each cycle # of uops delivered to IDQ from MITE path. +Can combine Umask 04H and 20H. +Set Cmask = 1 to count cycles. +.It Li IDQ.DSB_UOPS +.Pq Event 79H , Umask 08H +Increment each cycle. # of uops delivered to IDQ from DSB path. +Can combine Umask 08H and 10H +Set Cmask = 1 to count cycles. +.It Li IDQ.MS_DSB_UOPS +.Pq Event 79H , Umask 10H +Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set +Cmask = 1 to count cycles. Add Edge=1 to count # of delivery. +Can combine Umask 04H, 08H. +.It Li IDQ.MS_MITE_UOPS +.Pq Event 79H , Umask 20H +Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set +Cmask = 1 to count cycles. +Can combine Umask 04H, 08H. +.It Li IDQ.MS_UOPS +.Pq Event 79H , Umask 30H +Increment each cycle # of uops delivered to IDQ from MS by either DSB or +MITE. Set Cmask = 1 to count cycles. +Can combine Umask 04H, 08H. +.It Li IDQ.ALL_DSB_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered at least one uops. Set Cmask = 1. +.It Li IDQ.ALL_DSB_CYCLES_4_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered four uops. Set Cmask = 4. +.It Li IDQ.ALL_MITE_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered at least one uops. Set Cmask = 1. +.It Li IDQ.ALL_MITE_CYCLES_4_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered four uops. Set Cmask = 4. +.It Li IDQ.MITE_ALL_UOPS +.Pq Event 79H , Umask 3CH +# of uops delivered to IDQ from any path. +.It Li ICACHE.MISSES +.Pq Event 80H , Umask 02H +Number of Instruction Cache, Streaming Buffer and Victim Cache Misses. +Includes UC accesses. +.It Li ITLB_MISSES.MISS_CAUSES_A_WALK +.Pq Event 85H , Umask 01H +Misses in all ITLB levels that cause page walks. +.It Li ITLB_MISSES.WALK_COMPLETED +.Pq Event 85H , Umask 02H +Misses in all ITLB levels that cause completed page walks. +.It Li ITLB_MISSES.WALK_DURATION +.Pq Event 85H , Umask 04H +Cycle PMH is busy with a walk. +.It Li ITLB_MISSES.STLB_HIT +.Pq Event 85H , Umask 10H +Number of cache load STLB hits. No page walk. +.It Li ILD_STALL.LCP +.Pq Event 87H , Umask 01H +Stalls caused by changing prefix length of the instruction. +.It Li ILD_STALL.IQ_FULL +.Pq Event 87H , Umask 04H +Stall cycles due to IQ is full. +.It Li BR_INST_EXEC.COND +.Pq Event 88H , Umask 01H +Qualify conditional near branch instructions executed, but not necessarily +retired. +Must combine with umask 40H, 80H. +.It Li BR_INST_EXEC.DIRECT_JMP +.Pq Event 88H , Umask 02H +Qualify all unconditional near branch instructions excluding calls and +indirect branches. +Must combine with umask 80H. +.It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 88H , Umask 04H +Qualify executed indirect near branch instructions that are not calls nor +returns. +Must combine with umask 80H. +.It Li BR_INST_EXEC.RETURN_NEAR +.Pq Event 88H , Umask 08H +Qualify indirect near branches that have a return mnemonic. +Must combine with umask 80H. +.It Li BR_INST_EXEC.DIRECT_NEAR_CALL +.Pq Event 88H , Umask 10H +Qualify unconditional near call branch instructions, excluding non call +branch, executed. +Must combine with umask 80H. +.It Li BR_INST_EXEC.INDIRECT_NEAR_CALL +.Pq Event 88H , Umask 20H +Qualify indirect near calls, including both register and memory indirect, +executed. +Must combine with umask 80H. +.It Li BR_INST_EXEC.NONTAKEN +.Pq Event 88H , Umask 40H +Qualify non-taken near branches executed. +Applicable to umask 01H only. +.It Li BR_INST_EXEC.TAKEN +.Pq Event 88H , Umask 80H +Qualify taken near branches executed. Must combine with 01H,02H, 04H, 08H, +10H, 20H. +.It Li BR_INST_EXEC.ALL_BRANCHES +.Pq Event 88H , Umask FFH +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.COND +.Pq Event 89H , Umask 01H +Qualify conditional near branch instructions mispredicted. +Must combine with umask 40H, 80H. +.It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET +.Pq Event 89H , Umask 04H +Qualify mispredicted indirect near branch instructions that are not calls +nor returns. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.RETURN_NEAR +.Pq Event 89H , Umask 08H +Qualify mispredicted indirect near branches that have a return mnemonic. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.DIRECT_NEAR_CALL +.Pq Event 89H , Umask 10H +Qualify mispredicted unconditional near call branch instructions, excluding +non call branch, executed. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL +.Pq Event 89H , Umask 20H +Qualify mispredicted indirect near calls, including both register and memory +indirect, executed. +Must combine with umask 80H. +.It Li BR_MISP_EXEC.NONTAKEN +.Pq Event 89H , Umask 40H +Qualify mispredicted non-taken near branches executed. +Applicable to umask 01H only. +.It Li BR_MISP_EXEC.TAKEN +.Pq Event 89H , Umask 80H +Qualify mispredicted taken near branches executed. Must combine with +01H,02H, 04H, 08H, 10H, 20H. +.It Li BR_MISP_EXEC.ALL_BRANCHES +.Pq Event 89H , Umask FFH +Counts all near executed branches (not necessarily retired). +.It Li IDQ_UOPS_NOT_DELIVERED.CORE +.Pq Event 9CH , Umask 01H +Count number of non-delivered uops to RAT per thread. +Use Cmask to qualify uop b/w. +.It Li UOPS_DISPATCHED_PORT.PORT_0 +.Pq Event A1H , Umask 01H +Cycles which a Uop is dispatched on port 0. +.It Li UOPS_DISPATCHED_PORT.PORT_1 +.Pq Event A1H , Umask 02H +Cycles which a Uop is dispatched on port 1. +.It Li UOPS_DISPATCHED_PORT.PORT_2_LD +.Pq Event A1H , Umask 04H +Cycles which a load uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_2_STA +.Pq Event A1H , Umask 08H +Cycles which a store address uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_2 +.Pq Event A1H , Umask 0CH +Cycles which a Uop is dispatched on port 2. +.It Li UOPS_DISPATCHED_PORT.PORT_3_LD +.Pq Event A1H , Umask 10H +Cycles which a load uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_3_STA +.Pq Event A1H , Umask 20H +Cycles which a store address uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_3 +.Pq Event A1H , Umask 30H +Cycles which a Uop is dispatched on port 3. +.It Li UOPS_DISPATCHED_PORT.PORT_4 +.Pq Event A1H , Umask 40H +Cycles which a Uop is dispatched on port 4. +.It Li UOPS_DISPATCHED_PORT.PORT_5 +.Pq Event A1H , Umask 80H +Cycles which a Uop is dispatched on port 5. +.It Li RESOURCE_STALLS.ANY +.Pq Event A2H , Umask 01H +Cycles Allocation is stalled due to Resource Related reason. +.It Li RESOURCE_STALLS.RS +.Pq Event A2H , Umask 04H +Cycles stalled due to no eligible RS entry available. +.It Li RESOURCE_STALLS.SB +.Pq Event A2H , Umask 08H +Cycles stalled due to no store buffers available. (not including draining +form sync). +.It Li RESOURCE_STALLS.ROB +.Pq Event A2H , Umask 10H +Cycles stalled due to re-order buffer full. +.It Li DSB2MITE_SWITCHES.COUNT +.Pq Event ABH , Umask 01H +Number of DSB to MITE switches. +.It Li DSB2MITE_SWITCHES.PENALTY_CYCLES +.Pq Event ABH , Umask 02H +Cycles DSB to MITE switches caused delay. +.It Li DSB_FILL.EXCEED_DSB_LINES +.Pq Event ACH , Umask 08H +DSB Fill encountered > 3 DSB lines. +.It Li ITLB.ITLB_FLUSH +.Pq Event AEH , Umask 01H +Counts the number of ITLB flushes, includes 4k/2M/4M pages. +.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD +.Pq Event B0H , Umask 01H +Demand data read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_CODE_RD +.Pq Event B0H , Umask 02H +Demand code read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_RFO +.Pq Event B0H , Umask 04H +Demand RFO read requests sent to uncore, including regular RFOs, locks, +ItoM. +.It Li OFFCORE_REQUESTS.ALL_DATA_RD +.Pq Event B0H , Umask 08H +Data read requests sent to uncore (demand and prefetch). +.It Li UOPS_EXECUTED.THREAD +.Pq Event B1H , Umask 01H +Counts total number of uops to be executed per-thread each cycle. Set Cmask += 1, INV =1 to count stall cycles. +.It Li UOPS_EXECUTED.CORE +.Pq Event B1H , Umask 02H +Counts total number of uops to be executed per-core each cycle. +Do not need to set ANY. +.It Li OFF_CORE_RESPONSE_0 +.Pq Event B7H , Umask 01H +Off-core Response Performance Monitoring. +PMC0 only. +Requires programming MSR 01A6H. +.It Li OFF_CORE_RESPONSE_1 +.Pq Event BBH , Umask 01H +Off-core Response Performance Monitoring. +PMC3 only. +Requires programming MSR 01A7H. +.It Li TLB_FLUSH.DTLB_THREAD +.Pq Event BDH , Umask 01H +DTLB flush attempts of the thread- specific entries. +.It Li TLB_FLUSH.STLB_ANY +.Pq Event BDH , Umask 20H +Count number of STLB flush attempts. +.It Li INST_RETIRED.ANY_P +.Pq Event C0H , Umask 00H +Number of instructions at retirement. +.It Li INST_RETIRED.ALL +.Pq Event C0H , Umask 01H +Precise instruction retired event with HW to reduce effect of PEBS shadow in +IP distribution. +PMC1 only. +Must quiesce other PMCs. +.It Li OTHER_ASSISTS.AVX_STORE +.Pq Event C1H , Umask 08H +Number of assists associated with 256-bit AVX store operations. +.It Li OTHER_ASSISTS.AVX_TO_SSE +.Pq Event C1H , Umask 10H +Number of transitions from AVX- 256 to legacy SSE when penalty applicable. +.It Li OTHER_ASSISTS.SSE_TO_AVX +.Pq Event C1H , Umask 20H +Number of transitions from SSE to AVX-256 when penalty applicable. +.It Li UOPS_RETIRED.ALL +.Pq Event C2H , Umask 01H +Counts the number of micro-ops retired, Use cmask=1 and invert to count +active cycles or stalled cycles. +Supports PEBS, use Any=1 for core granular. +.It Li UOPS_RETIRED.RETIRE_SLOTS +.Pq Event C2H , Umask 02H +Counts the number of retirement slots used each cycle. +.It Li MACHINE_CLEARS.MEMORY_ORDERING +.Pq Event C3H , Umask 02H +Counts the number of machine clears due to memory order conflicts. +.It Li MACHINE_CLEARS.SMC +.Pq Event C3H , Umask 04H +Number of self-modifying-code machine clears detected. +.It Li MACHINE_CLEARS.MASKMOV +.Pq Event C3H , Umask 20H +Counts the number of executed AVX masked load operations that refer to an +illegal address range with the mask bits set to 0. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 00H +Branch instructions at retirement. +.It Li BR_INST_RETIRED.CONDITIONAL +.Pq Event C4H , Umask 01H +Counts the number of conditional branch instructions retired. +Supports PEBS. +.It Li BR_INST_RETIRED.NEAR_CALL +.Pq Event C4H , Umask 02H +Direct and indirect near call instructions retired. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 04H +Counts the number of branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_RETURN +.Pq Event C4H , Umask 08H +Counts the number of near return instructions retired. +.It Li BR_INST_RETIRED.NOT_TAKEN +.Pq Event C4H , Umask 10H +Counts the number of not taken branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_TAKEN +.Pq Event C4H , Umask 20H +Number of near taken branches retired. +.It Li BR_INST_RETIRED.FAR_BRANCH +.Pq Event C4H , Umask 40H +Number of far branches retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 00H +Mispredicted branch instructions at retirement. +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 01H +Mispredicted conditional branch instructions retired. +Supports PEBS. +.It Li BR_MISP_RETIRED.NEAR_CALL +.Pq Event C5H , Umask 02H +Direct and indirect mispredicted near call instructions retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 04H +Mispredicted macro branch instructions retired. +.It Li BR_MISP_RETIRED.NOT_TAKEN +.Pq Event C5H , Umask 10H +Mispredicted not taken branch instructions retired. +.It Li BR_MISP_RETIRED.TAKEN +.Pq Event C5H , Umask 20H +Mispredicted taken branch instructions retired. +.It Li FP_ASSIST.X87_OUTPUT +.Pq Event CAH , Umask 02H +Number of X87 FP assists due to Output values. +.It Li FP_ASSIST.X87_INPUT +.Pq Event CAH , Umask 04H +Number of X87 FP assists due to input values. +.It Li FP_ASSIST.SIMD_OUTPUT +.Pq Event CAH , Umask 08H +Number of SIMD FP assists due to Output values. +.It Li FP_ASSIST.SIMD_INPUT +.Pq Event CAH , Umask 10H +Number of SIMD FP assists due to input values. +.It Li FP_ASSIST.ANY +.Pq Event CAH , Umask 1EH +Cycles with any input/output SSE* or FP assists. +.It Li ROB_MISC_EVENTS.LBR_INSERTS +.Pq Event CCH , Umask 20H +Count cases of saving new LBR records by hardware. +.It Li MEM_TRANS_RETIRED.LOAD_LATENCY +.Pq Event CDH , Umask 01H +Sample loads with specified latency threshold. +PMC3 only. +Specify threshold in MSR 0x3F6. +.It Li MEM_TRANS_RETIRED.PRECISE_STORE +.Pq Event CDH , Umask 02H +Sample stores and collect precise store operation via PEBS record. +PMC3 only. +.It Li MEM_UOP_RETIRED.LOADS +.Pq Event D0H , Umask 01H +Qualify retired memory uops that are loads. Combine with umask 10H, 20H, +40H, 80H. +Supports PEBS. +.It Li MEM_UOP_RETIRED.STORES +.Pq Event D0H , Umask 02H +Qualify retired memory uops that are stores. Combine with umask 10H, 20H, +40H, 80H. +.It Li MEM_UOP_RETIRED.STLB_MISS +.Pq Event D0H , Umask 10H +Qualify retired memory uops with STLB miss. Must combine with umask 01H, +02H, to produce counts. +.It Li MEM_UOP_RETIRED.LOCK +.Pq Event D0H , Umask 20H +Qualify retired memory uops with lock. Must combine with umask 01H, 02H, to +produce counts. +.It Li MEM_UOP_RETIRED.SPLIT +.Pq Event D0H , Umask 40H +Qualify retired memory uops with line split. Must combine with umask 01H, +02H, to produce counts. +.It Li MEM_UOP_RETIRED.ALL +.Pq Event D0H , Umask 80H +Qualify any retired memory uops. Must combine with umask 01H, 02H, to +produce counts. +.It Li MEM_LOAD_UOPS_RETIRED.L1_HIT +.Pq Event D1H , Umask 01H +Retired load uops with L1 cache hits as data sources. +Supports PEBS. +.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT +.Pq Event D1H , Umask 02H +Retired load uops with L2 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT +.Pq Event D1H , Umask 04H +Retired load uops with LLC cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB +.Pq Event D1H , Umask 40H +Retired load uops which data sources were load uops missed L1 but hit FB due +to preceding miss to the same cache line with data not ready. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS +.Pq Event D2H , Umask 01H +Retired load uops which data sources were LLC hit and cross-core snoop +missed in on-pkg core cache. +Supports PEBS. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT +.Pq Event D2H , Umask 02H +Retired load uops which data sources were LLC and cross-core snoop hits in +on-pkg core cache. +Supports PEBS. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM +.Pq Event D2H , Umask 04H +Retired load uops which data sources were HitM responses from shared LLC. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE +.Pq Event D2H , Umask 08H +Retired load uops which data sources were hits in LLC without snoops +required. +.It Li MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM +.Pq Event D3H , Umask 01H +Retired load uops which data sources missed LLC but serviced from local +dram. +Supports PEBS. +.It Li L2_TRANS.DEMAND_DATA_RD +.Pq Event F0H , Umask 01H +Demand Data Read requests that access L2 cache. +.It Li L2_TRANS.RFO +.Pq Event F0H , Umask 02H +RFO requests that access L2 cache. +.It Li L2_TRANS.CODE_RD +.Pq Event F0H , Umask 04H +L2 cache accesses when fetching instructions. +.It Li L2_TRANS.ALL_PF +.Pq Event F0H , Umask 08H *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 14:04:33 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4056106566C; Thu, 6 Sep 2012 14:04:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2A88FC12; Thu, 6 Sep 2012 14:04:32 +0000 (UTC) Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q86E4T05031028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Sep 2012 00:04:30 +1000 Date: Fri, 7 Sep 2012 00:04:29 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201208111547.q7BFlNFD072661@svn.freebsd.org> Message-ID: <20120907000345.Y1834@besplex.bde.org> References: <201208111547.q7BFlNFD072661@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239195 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 14:04:33 -0000 On Sat, 11 Aug 2012, Dimitry Andric wrote: > Log: > Add __always_inline to __ieee754_rem_pio2() and __ieee754_rem_pio2f(), > since some older versions of gcc refuse to inline these otherwise. > > Requested by: bde > MFC after: 1 week Thanks. It works well to reduce unportabilities. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 14:59:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27766106564A; Thu, 6 Sep 2012 14:59:54 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11C888FC15; Thu, 6 Sep 2012 14:59:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86ExrEm038514; Thu, 6 Sep 2012 14:59:53 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86Exr56038506; Thu, 6 Sep 2012 14:59:53 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201209061459.q86Exr56038506@svn.freebsd.org> From: Josh Paetzel Date: Thu, 6 Sep 2012 14:59: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: r240165 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 14:59:54 -0000 Author: jpaetzel Date: Thu Sep 6 14:59:53 2012 New Revision: 240165 URL: http://svn.freebsd.org/changeset/base/240165 Log: Add TRIM support, enabled by default. Fix a bug installing components from a localPath. Allow autosizing of any partition, not just the last partition. Adjust how ZFS is laid out to work with Boot Environments. Submitted by: kmoore Obtained from: PC-BSD MFC after: 3 days Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -164,6 +164,38 @@ gen_glabel_name() export VAL="${NAME}${NUM}" }; +# Function to determine the size we can safely use when 0 is specified +get_autosize() +{ + # Disk tag to look for + dTag="$1" + + # Total MB Avail + get_disk_mediasize_mb "$2" + local _aSize=$VAL + + while read line + do + # Check for data on this slice + echo $line | grep -q "^${_dTag}-part=" 2>/dev/null + if [ $? -ne 0 ] ; then continue ; fi + + get_value_from_string "${line}" + STRING="$VAL" + + # Get the size of this partition + SIZE=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 2` + if [ $SIZE -eq 0 ] ; then continue ; fi + _aSize=`expr $_aSize - $SIZE` + done <${CFGF} + + # Pad the size a bit + _aSize=`expr $_aSize - 2` + + VAL="$_aSize" + export VAL +}; + # Function to setup partitions using gpart setup_gpart_partitions() { @@ -173,6 +205,7 @@ setup_gpart_partitions() local _sNum="$4" local _pType="$5" FOUNDPARTS="1" + USEDAUTOSIZE=0 # Lets read in the config file now and setup our partitions if [ "${_pType}" = "gpt" ] ; then @@ -245,7 +278,15 @@ setup_gpart_partitions() if [ "$SIZE" = "0" ] then - SOUT="" + if [ $USEDAUTOSIZE -eq 1 ] ; then + exit_err "ERROR: You can not have two partitions with a size of 0 specified!" + fi + case ${_pType} in + gpt|apm) get_autosize "${_dTag}" "$_pDisk" ;; + *) get_autosize "${_dTag}" "$_wSlice" ;; + esac + SOUT="-s ${VAL}M" + USEDAUTOSIZE=1 else SOUT="-s ${SIZE}M" fi Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -49,7 +49,7 @@ zfs_cleanup_unmount() # Creating a dedicated "/boot" partition cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q "vfs.root.mountfrom=" 2>/dev/null if [ $? -ne 0 ] ; then - echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}\"" >> ${FSMNT}/boot/loader.conf + echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}/ROOT/default\"" >> ${FSMNT}/boot/loader.conf fi export FOUNDZFSROOT="${ZPOOLNAME}" fi @@ -195,8 +195,8 @@ setup_fstab() if [ $? -eq 0 ] ; then if [ "${PARTFS}" = "ZFS" ] ; then ROOTFSTYPE="zfs" - XPOOLNAME=$(get_zpool_name "${PARTDEV}") - ROOTFS="${ZPOOLNAME}" + ZPOOLNAME=$(get_zpool_name "${PARTDEV}") + ROOTFS="${ZPOOLNAME}/ROOT/default" else ROOTFS="${DEVICE}" ROOTFSTYPE="ufs" Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -224,6 +224,15 @@ get_disk_mediasize() export VAL="${mediasize}" }; +# Function which returns a target disks mediasize in megabytes +get_disk_mediasize_mb() +{ + mediasize=`diskinfo -v ${1} | grep "# mediasize in bytes" | tr -s ' ' | cut -f 2` + mediasize=`expr $mediasize / 1024` + mediasize=`expr $mediasize / 1024` + export VAL="${mediasize}" +}; + # Function to delete all gparts before starting an install delete_all_gpart() { Modified: head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -71,8 +71,16 @@ copy_component() fetch_file "${FTPPATH}/${COMPFILEDIR}/${SUBDIR}/${CFILE}" "${FSMNT}/${COMPTMPDIR}/${CFILE}" "0" RESULT="$?" ;; - - sftp) ;; + local) + get_value_from_cfg localPath + if [ -z "$VAL" ]; then + exit_err "Install medium was set to local, but no localPath was provided!" + fi + LOCALPATH=$VAL + cp ${LOCALPATH}/${COMPFILEDIR}/${SUBDIR}/${CFILE} \ + ${FSMNT}/${COMPTMPDIR} >>${LOGOUT} 2>>${LOGOUT} + RESULT="$?" + ;; esac if [ "${RESULT}" != "0" ] Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -81,15 +81,34 @@ mount_partition() done if [ "${ZMNT}" = "/" ] ; then - ZNAME="" + # If creating ZFS / dataset, give it name that beadm works with + ZNAME="/ROOT/default" + ZMKMNT="" + echo_log "zfs create $zcopt -p ${ZPOOLNAME}/ROOT" + rc_halt "zfs create $zcopt -p ${ZPOOLNAME}/ROOT" + echo_log "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" + rc_halt "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" else ZNAME="${ZMNT}" + ZMKMNT="${ZMNT}" echo_log "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" rc_halt "zfs create $zcopt -p ${ZPOOLNAME}${ZNAME}" fi sleep 2 if [ -z "$zcopt" ] ; then - rc_halt "zfs set mountpoint=${FSMNT}${ZNAME} ${ZPOOLNAME}${ZNAME}" + rc_halt "zfs set mountpoint=${FSMNT}${ZMKMNT} ${ZPOOLNAME}${ZNAME}" + fi + + # Do we need to make this / zfs dataset bootable? + if [ "$ZMNT" = "/" ] ; then + echo_log "Stamping ${ZPOOLNAME}/ROOT/default as bootfs" + rc_halt "zpool set bootfs=${ZPOOLNAME}/ROOT/default ${ZPOOLNAME}" + fi + + # Do we need to make this /boot zfs dataset bootable? + if [ "$ZMNT" = "/boot" ] ; then + echo_log "Stamping ${ZPOOLNAME}${ZMNT} as bootfs" + rc_halt "zpool set bootfs=${ZPOOLNAME}${ZMNT} ${ZPOOLNAME}" fi # If no ZFS options, we can skip Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Thu Sep 6 13:54:01 2012 (r240164) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Thu Sep 6 14:59:53 2012 (r240165) @@ -72,16 +72,6 @@ setup_zfs_filesystem() # Disable atime for this zfs partition, speed increase rc_nohalt "zfs set atime=off ${ZPOOLNAME}" - # Check if we need to set a bootable zpool - for i in `echo ${PARTMNT} | sed 's|,| |g'` - do - if [ "${i}" = "/" -o "${i}" = "/boot" ] ; then - if [ "$HAVEBOOT" = "YES" ] ; then continue ; fi - echo_log "Stamping zpool as bootfs" - rc_halt "zpool set bootfs=${ZPOOLNAME} ${ZPOOLNAME}" - fi - done - }; # Runs newfs on all the partiions which we've setup with bsdlabel @@ -144,7 +134,7 @@ setup_filesystems() UFS) echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs ${PARTXTRAOPTS} ${PARTDEV}${EXT}" + rc_halt "newfs -t ${PARTXTRAOPTS} ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" @@ -160,7 +150,7 @@ setup_filesystems() UFS+S) echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs ${PARTXTRAOPTS} -U ${PARTDEV}${EXT}" + rc_halt "newfs -t ${PARTXTRAOPTS} -U ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" rc_halt "glabel label ${PARTLABEL} ${PARTDEV}${EXT}" @@ -175,7 +165,7 @@ setup_filesystems() UFS+SUJ) echo_log "NEWFS: ${PARTDEV} - ${PARTFS}" sleep 2 - rc_halt "newfs ${PARTXTRAOPTS} -U ${PARTDEV}${EXT}" + rc_halt "newfs -t ${PARTXTRAOPTS} -U ${PARTDEV}${EXT}" sleep 2 rc_halt "sync" rc_halt "tunefs -j enable ${PARTDEV}${EXT}" From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 16:26:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BB08106564A; Thu, 6 Sep 2012 16:26: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 366F38FC08; Thu, 6 Sep 2012 16:26:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86GQ5jp050015; Thu, 6 Sep 2012 16:26:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86GQ55u050012; Thu, 6 Sep 2012 16:26:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209061626.q86GQ55u050012@svn.freebsd.org> From: Alan Cox Date: Thu, 6 Sep 2012 16:26: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: r240166 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 16:26:05 -0000 Author: alc Date: Thu Sep 6 16:26:04 2012 New Revision: 240166 URL: http://svn.freebsd.org/changeset/base/240166 Log: There is no need to release the pvh global lock around calls to pmap_get_pv_entry(). In fact, some callers already held it around calls. (In earlier versions, the same statements would apply to the page queues lock.) While I'm here tidy up the style of a few nearby statements and revise some comments. Tested by: Ian Lepore Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Sep 6 14:59:53 2012 (r240165) +++ head/sys/arm/arm/pmap.c Thu Sep 6 16:26:04 2012 (r240166) @@ -1584,13 +1584,13 @@ pmap_clearbit(struct vm_page *pg, u_int * pmap_remove_pv: remove a mappiing from a vm_page list * * NOTE: pmap_enter_pv expects to lock the pvh itself - * pmap_remove_pv expects te caller to lock the pvh before calling + * pmap_remove_pv expects the caller to lock the pvh before calling */ /* * pmap_enter_pv: enter a mapping onto a vm_page lst * - * => caller should hold the proper lock on pmap_main_lock + * => caller should hold the proper lock on pvh_global_lock * => caller should have pmap locked * => we will gain the lock on the vm_page and allocate the new pv_entry * => caller should adjust ptp's wire_count before calling @@ -1600,12 +1600,11 @@ static void pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, vm_offset_t va, u_int flags) { - int km; rw_assert(&pvh_global_lock, RA_WLOCKED); - if (pg->md.pv_kva) { + if (pg->md.pv_kva != 0) { /* PMAP_ASSERT_LOCKED(pmap_kernel()); */ pve->pv_pmap = pmap_kernel(); pve->pv_va = pg->md.pv_kva; @@ -1617,10 +1616,8 @@ pmap_enter_pv(struct vm_page *pg, struct TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); TAILQ_INSERT_HEAD(&pve->pv_pmap->pm_pvlist, pve, pv_plist); PMAP_UNLOCK(pmap_kernel()); - rw_wunlock(&pvh_global_lock); if ((pve = pmap_get_pv_entry()) == NULL) - panic("pmap_kenter_internal: no pv entries"); - rw_wlock(&pvh_global_lock); + panic("pmap_kenter_pv: no pv entries"); if (km) PMAP_LOCK(pmap_kernel()); } @@ -2824,22 +2821,20 @@ pmap_kenter_internal(vm_offset_t va, vm_ *pte |= L2_S_PROT_U; PTE_SYNC(pte); - /* kernel direct mappings can be shared, so use a pv_entry - * to ensure proper caching. - * - * The pvzone is used to delay the recording of kernel - * mappings until the VM is running. - * - * This expects the physical memory to have vm_page_array entry. - */ - if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa))) { + /* + * A kernel mapping may not be the page's only mapping, so create a PV + * entry to ensure proper caching. + * + * The existence test for the pvzone is used to delay the recording of + * kernel mappings until the VM system is fully initialized. + * + * This expects the physical memory to have a vm_page_array entry. + */ + if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa)) != NULL) { rw_wlock(&pvh_global_lock); - if (!TAILQ_EMPTY(&m->md.pv_list) || m->md.pv_kva) { - /* release vm_page lock for pv_entry UMA */ - rw_wunlock(&pvh_global_lock); + if (!TAILQ_EMPTY(&m->md.pv_list) || m->md.pv_kva != 0) { if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_internal: no pv entries"); - rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap_kernel()); pmap_enter_pv(m, pve, pmap_kernel(), va, PVF_WRITE | PVF_UNMAN); From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 16:27:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E6D01065673; Thu, 6 Sep 2012 16:27:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85CD48FC19; Thu, 6 Sep 2012 16:27:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86GRx8B050266; Thu, 6 Sep 2012 16:27:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86GRxg2050263; Thu, 6 Sep 2012 16:27:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209061627.q86GRxg2050263@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 6 Sep 2012 16:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240167 - releng/9.1/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: Thu, 06 Sep 2012 16:27:59 -0000 Author: des Date: Thu Sep 6 16:27:59 2012 New Revision: 240167 URL: http://svn.freebsd.org/changeset/base/240167 Log: MFH (r239836): align the boot partition on a 4 kB boundary. Approved by: re (kib) Modified: releng/9.1/sbin/geom/class/part/gpart.8 Directory Properties: releng/9.1/sbin/geom/ (props changed) releng/9.1/sbin/geom/class/part/ (props changed) Modified: releng/9.1/sbin/geom/class/part/gpart.8 ============================================================================== --- releng/9.1/sbin/geom/class/part/gpart.8 Thu Sep 6 16:26:04 2012 (r240166) +++ releng/9.1/sbin/geom/class/part/gpart.8 Thu Sep 6 16:27:59 2012 (r240167) @@ -1006,11 +1006,12 @@ or but smaller than 545 kB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -This example uses 94 blocks (47 kB) so the next partition will be +This example uses 88 blocks (44 kB) so the next partition will be aligned on a 64 kB boundary without the need to specify an explicit offset or alignment. +The boot partition itself is aligned on a 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 34 -s 94 -t freebsd-boot ad0 +/sbin/gpart add -b 40 -s 88 -t freebsd-boot ad0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ad0 .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 16:38:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3420B106566C; Thu, 6 Sep 2012 16:38:56 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F51E8FC08; Thu, 6 Sep 2012 16:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86GctuQ051663; Thu, 6 Sep 2012 16:38:55 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86GctDj051661; Thu, 6 Sep 2012 16:38:55 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209061638.q86GctDj051661@svn.freebsd.org> From: Jim Harris Date: Thu, 6 Sep 2012 16:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240168 - releng/9.1/sys/dev/isci/scil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 16:38:56 -0000 Author: jimharris Date: Thu Sep 6 16:38:55 2012 New Revision: 240168 URL: http://svn.freebsd.org/changeset/base/240168 Log: MFC r239889: Do not call sati_check_data_io() for SATI_UNMAP sequences. This routine is intended only for commands such as INQUIRY where the controller may fill out a smaller amount of data than allocated by the host. The end result of this bug was that isci(4) would report non-zero resid for successful SCSI_UNMAP commands. Sponsored by: Intel Approved by: re (kib) Modified: releng/9.1/sys/dev/isci/scil/sati.c Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/dev/ (props changed) Modified: releng/9.1/sys/dev/isci/scil/sati.c ============================================================================== --- releng/9.1/sys/dev/isci/scil/sati.c Thu Sep 6 16:27:59 2012 (r240167) +++ releng/9.1/sys/dev/isci/scil/sati.c Thu Sep 6 16:38:55 2012 (r240168) @@ -1095,10 +1095,6 @@ SATI_STATUS sati_translate_command_respo status = sati_unmap_translate_response( sequence, scsi_io, ata_io ); - if(status == SATI_COMPLETE) - { - status = sati_check_data_io(sequence); - } break; #endif // !defined(DISABLE_SATI_UNMAP) From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 16:43:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB291106566C for ; Thu, 6 Sep 2012 16:43:08 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 824E28FC0A for ; Thu, 6 Sep 2012 16:43:08 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=gK73sq UN0gqgq/mvSaN1ca5zn0qdYVccRgBClFuWZLd0zOMYvtLx8DsQOuiyUrUoP6GVuH C3DNDabNiaiHTrRrZOLq0KvcbLuOXrP55AU17MwooPIUh7HtKv8nx75I3YkE6W2I pFKetxrlVLhVftjXMfQdldH7pB898joQ3nqkc= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=bZsTizdi6CqT 8Gzq/0Eh4YqyVDetY9xdmw7bgClzBeM=; b=jGkCwQZ5SSRbBPQvPJnvwYPP+NFG n9x2VfyOYDlcBtNbrdhmj/lIUW9XODoyHyGfNCOEnD6w5MbjSCxCA3QD6T7oAHHL rmYqF2lhd4WLAYKqey0PYAq2frl7yxtJcJtj/Vaxac2V6TB21VqPhGY0OqZJPNRB FiGww+MIMvQw52g= Received: (qmail 5835 invoked from network); 6 Sep 2012 11:43:00 -0500 Received: from unknown (HELO ?192.168.0.74?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 6 Sep 2012 11:43:00 -0500 Message-ID: <5048D2A0.5040205@shatow.net> Date: Thu, 06 Sep 2012 11:43:12 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Josh Paetzel , Kris Moore References: <201209061459.q86Exr56038506@svn.freebsd.org> In-Reply-To: <201209061459.q86Exr56038506@svn.freebsd.org> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240165 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 16:43:09 -0000 On 9/6/2012 9:59 AM, Josh Paetzel wrote: > Author: jpaetzel > Date: Thu Sep 6 14:59:53 2012 > New Revision: 240165 > URL: http://svn.freebsd.org/changeset/base/240165 > > Log: > Add TRIM support, enabled by default. > Fix a bug installing components from a localPath. > Allow autosizing of any partition, not just the last partition. > Adjust how ZFS is laid out to work with Boot Environments. > > Submitted by: kmoore > Obtained from: PC-BSD > MFC after: 3 days Thanks! The (UFS) TRIM and BE stuff is great to have here. Bryan From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 17:28:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62799106566C; Thu, 6 Sep 2012 17:28:48 +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 45BAC8FC1E; Thu, 6 Sep 2012 17:28:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86HSmUV057793; Thu, 6 Sep 2012 17:28:48 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86HSm32057780; Thu, 6 Sep 2012 17:28:48 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201209061728.q86HSm32057780@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 6 Sep 2012 17:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240169 - in stable/9/sys: dev/cxgb/ulp/tom dev/cxgbe dev/cxgbe/common dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/if_cxgbe modules/cxgbe/tom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 17:28:48 -0000 Author: np Date: Thu Sep 6 17:28:47 2012 New Revision: 240169 URL: http://svn.freebsd.org/changeset/base/240169 Log: MFC many cxgb and cxgbe features and fixes (r239258, r239259, r239264, r239266, r239336, r239338, r239339, r239341, r239344, r239514, r239527, r239528, r239544. r239258: Convert some fixed parameters to tunables (with reasonable default values). - cong_drop specifies what to do on congestion: nothing, backpressure, or drop. - fl_pktshift specifies the padding before Ethernet payload. - fl_pad specifies the boundary upto which to pad Ethernet payload. - spg_len controls the length of the status page. r239259: if_iqdrops should include frames truncated within the chip. r239264: Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and KERNBUILDDIR is not set. r239266: The size of the buffers in an Ethernet freelist has to be higher than the interface's MTU. Initialize such freelists with correct values. This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048 and 9216 in size) happened to have enough spare room. I ran into it when playing around with unusual MTUs. r239336: Allow for a different handler for each type of firmware message. r239338: Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware TCB. Filters are programmed by modifying the TCB too (via a different routine) and the reply to any TCB update is delivered via a CPL_SET_TCB_RPL. Figure out whether the reply is for a filter-write or something else and route it appropriately. r239339: Make room for DDP page pods in the default configuration profile. While here, bump up the L2 table's size to 4K entries. r239341: Initialize various DDP parameters in the main cxgbe(4) driver: - Setup multiple DDP page sizes. When the driver attempts DDP it will try to combine physically contiguous pages into regions of these sizes. - Set the indicate size such that the payload carried in the indicate can be copied in the header mbuf (and the 16K rx buffer can be recycled). - Set DDP threshold to the max payload that the chip will coalesce and deliver to the driver (this is ~16K by default, which is also why the offload rx queue is backed by 16K buffers). If the chip is able to coalesce up to the max it's allowed to, it's a good sign that the peer is transmitting in bulk without any TCP PSH. r239344: Support for TCP DDP (Direct Data Placement) in the T4 TOE module. Basically, this is automatic rx zero copy when feasible. TCP payload is DMA'd directly into the userspace buffer described by the uio submitted in soreceive by an application. - Works with sockets that are being handled by the TCP offload engine of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an "ifconfig +toe" on the cxgbe interface). - Does not require any modification to the application. - Not enabled by default. Use hw.t4nex..toe.ddp="1" to enable it. r239514: Minor cleanup: use bitwise ops instead of pointless wrappers around setbit/clrbit. r239527: Cannot hold a mutex around vm_fault_quick_hold_pages, so don't. Tweak some comments while here. r239528: Avoid a NULL pointer dereference. r239544: Deal with the case where a syncache entry added by the TOE driver is evicted from the syncache but a later syncache_expand succeeds because of syncookies. The TOE driver has to resort to more direct means to install its hooks in the socket in this case. Added: stable/9/sys/dev/cxgbe/tom/t4_ddp.c - copied, changed from r239344, head/sys/dev/cxgbe/tom/t4_ddp.c Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/t4_hw.h stable/9/sys/dev/cxgbe/common/t4_msg.h stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/offload.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_connect.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/dev/cxgbe/tom/t4_listen.c stable/9/sys/dev/cxgbe/tom/t4_tom.c stable/9/sys/dev/cxgbe/tom/t4_tom.h stable/9/sys/modules/cxgbe/if_cxgbe/Makefile stable/9/sys/modules/cxgbe/tom/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c ============================================================================== --- stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c Thu Sep 6 17:28:47 2012 (r240169) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define TCPSTATES #include @@ -759,6 +760,15 @@ reset: goto reset; } + if (__predict_false(!(synqe->flags & TP_SYNQE_EXPANDED))) { + struct inpcb *new_inp = sotoinpcb(so); + + INP_WLOCK(new_inp); + tcp_timer_activate(intotcpcb(new_inp), TT_KEEP, 0); + t3_offload_socket(tod, synqe, so); + INP_WUNLOCK(new_inp); + } + /* Remove the synq entry and release its reference on the lctx */ TAILQ_REMOVE(&lctx->synq, synqe, link); inp = release_lctx(td, lctx); @@ -1136,5 +1146,6 @@ t3_offload_socket(struct toedev *tod, vo offload_socket(so, toep); make_established(so, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); update_tid(td, toep, synqe->tid); + synqe->flags |= TP_SYNQE_EXPANDED; } #endif Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h ============================================================================== --- stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h Thu Sep 6 17:28:47 2012 (r240169) @@ -44,6 +44,7 @@ #define TP_IS_A_SYNQ_ENTRY (1 << 9) #define TP_ABORT_RPL_SENT (1 << 10) #define TP_SEND_FIN (1 << 11) +#define TP_SYNQE_EXPANDED (1 << 12) struct toepcb { TAILQ_ENTRY(toepcb) link; /* toep_list */ Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/adapter.h Thu Sep 6 17:28:47 2012 (r240169) @@ -135,6 +135,7 @@ enum { #else FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif + OFLD_BUF_SIZE = MJUM16BYTES, /* size of fl buffer for TOE rxq */ CTRL_EQ_QSIZE = 128, @@ -143,6 +144,12 @@ enum { TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; +#ifdef T4_PKT_TIMESTAMP +#define RX_COPY_THRESHOLD (MINCLSIZE - 8) +#else +#define RX_COPY_THRESHOLD MINCLSIZE +#endif + enum { /* adapter intr_type */ INTR_INTX = (1 << 0), @@ -510,6 +517,7 @@ struct rss_header; typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *, struct mbuf *); typedef int (*an_handler_t)(struct sge_iq *, const struct rsp_ctrl *); +typedef int (*fw_msg_handler_t)(struct adapter *, const __be64 *); struct adapter { SLIST_ENTRY(adapter) link; @@ -582,7 +590,8 @@ struct adapter { struct callout sfl_callout; an_handler_t an_handler __aligned(CACHE_LINE_SIZE); - cpl_handler_t cpl_handler[256]; + fw_msg_handler_t fw_msg_handler[4]; /* NUM_FW6_TYPES */ + cpl_handler_t cpl_handler[0xef]; /* NUM_CPL_CMDS */ }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) @@ -741,6 +750,8 @@ void t4_os_link_changed(struct adapter * void t4_iterate(void (*)(struct adapter *, void *), void *); int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t); int t4_register_an_handler(struct adapter *, an_handler_t); +int t4_register_fw_msg_handler(struct adapter *, int, fw_msg_handler_t); +int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); /* t4_sge.c */ void t4_sge_modload(void); Modified: stable/9/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.h Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/common/t4_hw.h Thu Sep 6 17:28:47 2012 (r240169) @@ -161,10 +161,12 @@ struct pagepod { #define S_PPOD_TAG 6 #define M_PPOD_TAG 0xFFFFFF #define V_PPOD_TAG(x) ((x) << S_PPOD_TAG) +#define G_PPOD_TAG(x) (((x) >> S_PPOD_TAG) & M_PPOD_TAG) #define S_PPOD_PGSZ 30 #define M_PPOD_PGSZ 0x3 #define V_PPOD_PGSZ(x) ((x) << S_PPOD_PGSZ) +#define G_PPOD_PGSZ(x) (((x) >> S_PPOD_PGSZ) & M_PPOD_PGSZ) #define S_PPOD_TID 32 #define M_PPOD_TID 0xFFFFFF Modified: stable/9/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_msg.h Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/common/t4_msg.h Thu Sep 6 17:28:47 2012 (r240169) @@ -792,6 +792,14 @@ struct cpl_set_tcb_field { __be64 val; }; +struct cpl_set_tcb_field_core { + union opcode_tid ot; + __be16 reply_ctrl; + __be16 word_cookie; + __be64 mask; + __be64 val; +}; + /* cpl_set_tcb_field.word_cookie fields */ #define S_WORD 0 #define M_WORD 0x1F @@ -1376,6 +1384,11 @@ struct cpl_rx_data_ack { __be32 credit_dack; }; +struct cpl_rx_data_ack_core { + union opcode_tid ot; + __be32 credit_dack; +}; + /* cpl_rx_data_ack.ack_seq fields */ #define S_RX_CREDITS 0 #define M_RX_CREDITS 0x3FFFFFF @@ -2281,6 +2294,8 @@ enum { FW6_TYPE_WR_RPL = 1, FW6_TYPE_CQE = 2, FW6_TYPE_OFLD_CONNECTION_WR_RPL = 3, + + NUM_FW6_TYPES }; struct cpl_fw6_msg_ofld_connection_wr_rpl { Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt Thu Sep 6 17:28:47 2012 (r240169) @@ -20,7 +20,7 @@ filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 40 + tp_pmrx = 38 tp_pmtx = 60 tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K @@ -67,7 +67,8 @@ # driver will mask off features it won't use protocol = ofld - tp_l2t = 100 + tp_l2t = 4096 + tp_ddp = 2 # TCAM has 8K cells; each region must start at a multiple of 128 cell. # Each entry in these categories takes 4 cells each. nhash will use the @@ -136,7 +137,7 @@ [fini] version = 0x1 - checksum = 0xdb5813f9 + checksum = 0x162df193 # # $FreeBSD$ # Modified: stable/9/sys/dev/cxgbe/offload.h ============================================================================== --- stable/9/sys/dev/cxgbe/offload.h Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/offload.h Thu Sep 6 17:28:47 2012 (r240169) @@ -31,13 +31,16 @@ #ifndef __T4_OFFLOAD_H__ #define __T4_OFFLOAD_H__ -#define INIT_ULPTX_WR(w, wrlen, atomic, tid) do { \ - (w)->wr.wr_hi = htonl(V_FW_WR_OP(FW_ULPTX_WR) | V_FW_WR_ATOMIC(atomic)); \ - (w)->wr.wr_mid = htonl(V_FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \ +#define INIT_ULPTX_WRH(w, wrlen, atomic, tid) do { \ + (w)->wr_hi = htonl(V_FW_WR_OP(FW_ULPTX_WR) | V_FW_WR_ATOMIC(atomic)); \ + (w)->wr_mid = htonl(V_FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \ V_FW_WR_FLOWID(tid)); \ - (w)->wr.wr_lo = cpu_to_be64(0); \ + (w)->wr_lo = cpu_to_be64(0); \ } while (0) +#define INIT_ULPTX_WR(w, wrlen, atomic, tid) \ + INIT_ULPTX_WRH(&((w)->wr), wrlen, atomic, tid) + #define INIT_TP_WR(w, tid) do { \ (w)->wr.wr_hi = htonl(V_FW_WR_OP(FW_TP_WR) | \ V_FW_WR_IMMDLEN(sizeof(*w) - sizeof(w->wr))); \ Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/t4_main.c Thu Sep 6 17:28:47 2012 (r240169) @@ -306,6 +306,7 @@ static void cxgbe_vlan_config(void *, st static int cpl_not_handled(struct sge_iq *, const struct rss_header *, struct mbuf *); static int an_not_handled(struct sge_iq *, const struct rsp_ctrl *); +static int fw_msg_not_handled(struct adapter *, const __be64 *); static int t4_sysctls(struct adapter *); static int cxgbe_sysctls(struct port_info *); static int sysctl_int_array(SYSCTL_HANDLER_ARGS); @@ -345,8 +346,6 @@ static int del_filter(struct adapter *, static void clear_filter(struct filter_entry *); static int set_filter_wr(struct adapter *, int); static int del_filter_wr(struct adapter *, int); -static int filter_rpl(struct sge_iq *, const struct rss_header *, - struct mbuf *); static int get_sge_context(struct adapter *, struct t4_sge_context *); static int read_card_mem(struct adapter *, struct t4_mem_range *); #ifdef TCP_OFFLOAD @@ -381,6 +380,10 @@ CTASSERT(offsetof(struct sge_ofld_rxq, i CTASSERT(offsetof(struct sge_ofld_rxq, fl) == offsetof(struct sge_rxq, fl)); #endif +/* No easy way to include t4_msg.h before adapter.h so we check this way */ +CTASSERT(ARRAY_SIZE(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); +CTASSERT(ARRAY_SIZE(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); + static int t4_probe(device_t dev) { @@ -458,7 +461,9 @@ t4_attach(device_t dev) sc->an_handler = an_not_handled; for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++) sc->cpl_handler[i] = cpl_not_handled; - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, filter_rpl); + for (i = 0; i < ARRAY_SIZE(sc->fw_msg_handler); i++) + sc->fw_msg_handler[i] = fw_msg_not_handled; + t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, t4_filter_rpl); /* Prepare the adapter for operation */ rc = -t4_prep_adapter(sc); @@ -510,18 +515,24 @@ t4_attach(device_t dev) goto done; /* error message displayed already */ if (sc->flags & MASTER_PF) { + uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); /* final tweaks to some settings */ t4_load_mtus(sc, sc->params.mtus, sc->params.a_wnd, sc->params.b_wnd); - t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(PAGE_SHIFT - 12)); + /* 4K, 16K, 64K, 256K DDP "page sizes" */ + t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(0) | V_HPZ1(2) | + V_HPZ2(4) | V_HPZ3(6)); + t4_set_reg_field(sc, A_ULP_RX_CTL, F_TDDPTAGTCB, F_TDDPTAGTCB); t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 | - F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, 0); + F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, + F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | + F_TUNNELCNGDROP3); t4_set_reg_field(sc, A_TP_PARA_REG5, V_INDICATESIZE(M_INDICATESIZE) | F_REARMDDPOFFSET | F_RESETDDPOFFSET, - V_INDICATESIZE(M_INDICATESIZE) | + V_INDICATESIZE(indsz) | F_REARMDDPOFFSET | F_RESETDDPOFFSET); } else { /* @@ -2942,7 +2953,8 @@ cxgbe_tick(void *arg) ifp->if_omcasts = s->tx_mcast_frames - s->tx_pause; ifp->if_imcasts = s->rx_mcast_frames - s->rx_pause; ifp->if_iqdrops = s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 + - s->rx_ovflow3; + s->rx_ovflow3 + s->rx_trunc0 + s->rx_trunc1 + s->rx_trunc2 + + s->rx_trunc3; drops = s->tx_drop; for_each_txq(pi, i, txq) @@ -2977,7 +2989,7 @@ cpl_not_handled(struct sge_iq *iq, const panic("%s: opcode 0x%02x on iq %p with payload %p", __func__, rss->opcode, iq, m); #else - log(LOG_ERR, "%s: opcode 0x%02x on iq %p with payload %p", + log(LOG_ERR, "%s: opcode 0x%02x on iq %p with payload %p\n", __func__, rss->opcode, iq, m); m_freem(m); #endif @@ -3006,7 +3018,7 @@ an_not_handled(struct sge_iq *iq, const #ifdef INVARIANTS panic("%s: async notification on iq %p (ctrl %p)", __func__, iq, ctrl); #else - log(LOG_ERR, "%s: async notification on iq %p (ctrl %p)", + log(LOG_ERR, "%s: async notification on iq %p (ctrl %p)\n", __func__, iq, ctrl); #endif return (EDOOFUS); @@ -3025,6 +3037,35 @@ t4_register_an_handler(struct adapter *s } static int +fw_msg_not_handled(struct adapter *sc, const __be64 *rpl) +{ + __be64 *r = __DECONST(__be64 *, rpl); + struct cpl_fw6_msg *cpl = member2struct(cpl_fw6_msg, data, r); + +#ifdef INVARIANTS + panic("%s: fw_msg type %d", __func__, cpl->type); +#else + log(LOG_ERR, "%s: fw_msg type %d\n", __func__, cpl->type); +#endif + return (EDOOFUS); +} + +int +t4_register_fw_msg_handler(struct adapter *sc, int type, fw_msg_handler_t h) +{ + uintptr_t *loc, new; + + if (type >= ARRAY_SIZE(sc->fw_msg_handler)) + return (EINVAL); + + new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled; + loc = (uintptr_t *) &sc->fw_msg_handler[type]; + atomic_store_rel_ptr(loc, new); + + return (0); +} + +static int t4_sysctls(struct adapter *sc) { struct sysctl_ctx_list *ctx; @@ -3191,10 +3232,13 @@ t4_sysctls(struct adapter *sc) sc->tt.ddp = 0; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "ddp", CTLFLAG_RW, &sc->tt.ddp, 0, "DDP allowed"); - sc->tt.indsz = M_INDICATESIZE; + + sc->tt.indsz = G_INDICATESIZE(t4_read_reg(sc, A_TP_PARA_REG5)); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "indsz", CTLFLAG_RW, &sc->tt.indsz, 0, "DDP max indicate size allowed"); - sc->tt.ddp_thres = 3*4096; + + sc->tt.ddp_thres = + G_RXCOALESCESIZE(t4_read_reg(sc, A_TP_PARA_REG2)); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "ddp_thres", CTLFLAG_RW, &sc->tt.ddp_thres, 0, "DDP threshold"); } @@ -4961,8 +5005,8 @@ del_filter_wr(struct adapter *sc, int fi return (0); } -static int -filter_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +int +t4_filter_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct adapter *sc = iq->adapter; const struct cpl_set_tcb_rpl *rpl = (const void *)(rss + 1); Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/t4_sge.c Thu Sep 6 17:28:47 2012 (r240169) @@ -68,12 +68,37 @@ static struct fl_buf_info fl_buf_info[FL #define FL_BUF_TYPE(x) (fl_buf_info[x].type) #define FL_BUF_ZONE(x) (fl_buf_info[x].zone) -enum { - FL_PKTSHIFT = 2 -}; +/* + * Ethernet frames are DMA'd at this byte offset into the freelist buffer. + * 0-7 are valid values. + */ +static int fl_pktshift = 2; +TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_pktshift); -static int fl_pad = CACHE_LINE_SIZE; -static int spg_len = 64; +/* + * Pad ethernet payload up to this boundary. + * -1: driver should figure out a good value. + * Any power of 2, from 32 to 4096 (both inclusive) is a valid value. + */ +static int fl_pad = -1; +TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); + +/* + * Status page length. + * -1: driver should figure out a good value. + * 64 or 128 are the only other valid values. + */ +static int spg_len = -1; +TUNABLE_INT("hw.cxgbe.spg_len", &spg_len); + +/* + * Congestion drops. + * -1: no congestion feedback (not recommended). + * 0: backpressure the channel instead of dropping packets right away. + * 1: no backpressure, drop packets for the congested queue immediately. + */ +static int cong_drop = 0; +TUNABLE_INT("hw.cxgbe.cong_drop", &cong_drop); /* Used to track coalesced tx work request */ struct txpkts { @@ -160,7 +185,7 @@ static void write_eqflush_wr(struct sge_ static __be64 get_flit(bus_dma_segment_t *, int, int); static int handle_sge_egr_update(struct sge_iq *, const struct rss_header *, struct mbuf *); -static int handle_fw_rpl(struct sge_iq *, const struct rss_header *, +static int handle_fw_msg(struct sge_iq *, const struct rss_header *, struct mbuf *); static int sysctl_uint16(SYSCTL_HANDLER_ARGS); @@ -170,7 +195,8 @@ extern u_int cpu_clflush_line_size; #endif /* - * Called on MOD_LOAD and fills up fl_buf_info[]. + * Called on MOD_LOAD. Fills up fl_buf_info[] and validates/calculates the SGE + * tunables. */ void t4_sge_modload(void) @@ -191,10 +217,49 @@ t4_sge_modload(void) FL_BUF_ZONE(i) = m_getzone(bufsize[i]); } + if (fl_pktshift < 0 || fl_pktshift > 7) { + printf("Invalid hw.cxgbe.fl_pktshift value (%d)," + " using 2 instead.\n", fl_pktshift); + fl_pktshift = 2; + } + + if (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad)) { + int pad; + #if defined(__i386__) || defined(__amd64__) - fl_pad = max(cpu_clflush_line_size, 32); - spg_len = cpu_clflush_line_size > 64 ? 128 : 64; + pad = max(cpu_clflush_line_size, 32); +#else + pad = max(CACHE_LINE_SIZE, 32); #endif + pad = min(pad, 4096); + + if (fl_pad != -1) { + printf("Invalid hw.cxgbe.fl_pad value (%d)," + " using %d instead.\n", fl_pad, pad); + } + fl_pad = pad; + } + + if (spg_len != 64 && spg_len != 128) { + int len; + +#if defined(__i386__) || defined(__amd64__) + len = cpu_clflush_line_size > 64 ? 128 : 64; +#else + len = 64; +#endif + if (spg_len != -1) { + printf("Invalid hw.cxgbe.spg_len value (%d)," + " using %d instead.\n", spg_len, len); + } + spg_len = len; + } + + if (cong_drop < -1 || cong_drop > 1) { + printf("Invalid hw.cxgbe.cong_drop value (%d)," + " using 0 instead.\n", cong_drop); + cong_drop = 0; + } } /** @@ -215,7 +280,7 @@ t4_sge_init(struct adapter *sc) ctrl_mask = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE; - ctrl_val = V_PKTSHIFT(FL_PKTSHIFT) | F_RXPKTCPLMODE | + ctrl_val = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | V_INGPADBOUNDARY(ilog2(fl_pad) - 5) | V_EGRSTATUSPAGESIZE(spg_len == 128); @@ -296,11 +361,13 @@ t4_sge_init(struct adapter *sc) sc->sge.timer_val[4] = G_TIMERVALUE4(v) / core_ticks_per_usec(sc); sc->sge.timer_val[5] = G_TIMERVALUE5(v) / core_ticks_per_usec(sc); - t4_register_cpl_handler(sc, CPL_FW4_MSG, handle_fw_rpl); - t4_register_cpl_handler(sc, CPL_FW6_MSG, handle_fw_rpl); + t4_register_cpl_handler(sc, CPL_FW4_MSG, handle_fw_msg); + t4_register_cpl_handler(sc, CPL_FW6_MSG, handle_fw_msg); t4_register_cpl_handler(sc, CPL_SGE_EGR_UPDATE, handle_sge_egr_update); t4_register_cpl_handler(sc, CPL_RX_PKT, t4_eth_rx); + t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); + return (rc); } @@ -477,6 +544,18 @@ port_intr_iq(struct port_info *pi, int i return (iq); } +static inline int +mtu_to_bufsize(int mtu) +{ + int bufsize; + + /* large enough for a frame even when VLAN extraction is disabled */ + bufsize = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + mtu; + bufsize = roundup(bufsize + fl_pktshift, fl_pad); + + return (bufsize); +} + int t4_setup_port_queues(struct port_info *pi) { @@ -493,6 +572,7 @@ t4_setup_port_queues(struct port_info *p struct adapter *sc = pi->adapter; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); + int bufsize = mtu_to_bufsize(pi->ifp->if_mtu); oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -522,7 +602,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&rxq->fl, pi->qsize_rxq / 8, pi->ifp->if_mtu, name); + init_fl(&rxq->fl, pi->qsize_rxq / 8, bufsize, name); if (sc->flags & INTR_DIRECT #ifdef TCP_OFFLOAD @@ -547,7 +627,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&ofld_rxq->fl, pi->qsize_rxq / 8, MJUM16BYTES, name); + init_fl(&ofld_rxq->fl, pi->qsize_rxq / 8, OFLD_BUF_SIZE, name); if (sc->flags & INTR_DIRECT || (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) { @@ -942,13 +1022,6 @@ service_iq(struct sge_iq *iq, int budget return (0); } - -#ifdef T4_PKT_TIMESTAMP -#define RX_COPY_THRESHOLD (MINCLSIZE - 8) -#else -#define RX_COPY_THRESHOLD MINCLSIZE -#endif - static struct mbuf * get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, int *fl_bufs_used) @@ -1050,9 +1123,9 @@ t4_eth_rx(struct sge_iq *iq, const struc KASSERT(m0 != NULL, ("%s: no payload with opcode %02x", __func__, rss->opcode)); - m0->m_pkthdr.len -= FL_PKTSHIFT; - m0->m_len -= FL_PKTSHIFT; - m0->m_data += FL_PKTSHIFT; + m0->m_pkthdr.len -= fl_pktshift; + m0->m_len -= fl_pktshift; + m0->m_data += fl_pktshift; m0->m_pkthdr.rcvif = ifp; m0->m_flags |= M_FLOWID; @@ -1386,11 +1459,8 @@ t4_update_fl_bufsize(struct ifnet *ifp) struct port_info *pi = ifp->if_softc; struct sge_rxq *rxq; struct sge_fl *fl; - int i, bufsize; + int i, bufsize = mtu_to_bufsize(ifp->if_mtu); - /* large enough for a frame even when VLAN extraction is disabled */ - bufsize = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + ifp->if_mtu; - bufsize = roundup(bufsize + FL_PKTSHIFT, fl_pad); for_each_rxq(pi, i, rxq) { fl = &rxq->fl; @@ -1793,6 +1863,18 @@ free_mgmtq(struct adapter *sc) return free_wrq(sc, &sc->sge.mgmtq); } +static inline int +tnl_cong(struct port_info *pi) +{ + + if (cong_drop == -1) + return (-1); + else if (cong_drop == 1) + return (0); + else + return (1 << pi->tx_chan); +} + static int alloc_rxq(struct port_info *pi, struct sge_rxq *rxq, int intr_idx, int idx, struct sysctl_oid *oid) @@ -1801,7 +1883,7 @@ alloc_rxq(struct port_info *pi, struct s struct sysctl_oid_list *children; char name[16]; - rc = alloc_iq_fl(pi, &rxq->iq, &rxq->fl, intr_idx, 1 << pi->tx_chan); + rc = alloc_iq_fl(pi, &rxq->iq, &rxq->fl, intr_idx, tnl_cong(pi)); if (rc != 0) return (rc); @@ -3433,17 +3515,15 @@ handle_sge_egr_update(struct sge_iq *iq, } static int -handle_fw_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +handle_fw_msg(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { + struct adapter *sc = iq->adapter; const struct cpl_fw6_msg *cpl = (const void *)(rss + 1); KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__, rss->opcode)); - if (cpl->type == FW6_TYPE_CMD_RPL) - t4_handle_fw_rpl(iq->adapter, cpl->data); - - return (0); + return (sc->fw_msg_handler[cpl->type](sc, &cpl->data[0])); } static int Modified: stable/9/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_connect.c Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/tom/t4_connect.c Thu Sep 6 17:28:47 2012 (r240169) @@ -247,10 +247,14 @@ calc_opt2a(struct socket *so) opt2 |= F_RX_COALESCE_VALID | V_RX_COALESCE(M_RX_COALESCE); opt2 |= F_RSS_QUEUE_VALID | V_RSS_QUEUE(toep->ofld_rxq->iq.abs_id); +#ifdef USE_DDP_RX_FLOW_CONTROL + if (toep->ulp_mode == ULP_MODE_TCPDDP) + opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; +#endif + return (htobe32(opt2)); } - void t4_init_connect_cpl_handlers(struct adapter *sc) { @@ -320,7 +324,10 @@ t4_connect(struct toedev *tod, struct so toep->tid = atid; toep->l2te = e; - toep->ulp_mode = ULP_MODE_NONE; + if (sc->tt.ddp && (so->so_options & SO_NO_DDP) == 0) + set_tcpddp_ulp_mode(toep); + else + toep->ulp_mode = ULP_MODE_NONE; SOCKBUF_LOCK(&so->so_rcv); /* opt0 rcv_bufsiz initially, assumes its normal meaning later */ toep->rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ); @@ -354,7 +361,7 @@ t4_connect(struct toedev *tod, struct so rc = t4_l2t_send(sc, wr, e); if (rc == 0) { - toepcb_set_flag(toep, TPF_CPL_PENDING); + toep->flags |= TPF_CPL_PENDING; return (0); } Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 6 16:38:55 2012 (r240168) +++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Sep 6 17:28:47 2012 (r240169) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include "common/common.h" #include "common/t4_msg.h" #include "common/t4_regs.h" +#include "common/t4_tcb.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" @@ -80,7 +81,7 @@ send_flowc_wr(struct toepcb *toep, struc unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN; struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; - KASSERT(!toepcb_flag(toep, TPF_FLOWC_WR_SENT), + KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); @@ -130,7 +131,7 @@ send_flowc_wr(struct toepcb *toep, struc toep->txsd_pidx = 0; toep->txsd_avail--; - toepcb_set_flag(toep, TPF_FLOWC_WR_SENT); + toep->flags |= TPF_FLOWC_WR_SENT; t4_wrq_tx(sc, wr); } @@ -150,15 +151,15 @@ send_reset(struct adapter *sc, struct to inp->inp_flags & INP_DROPPED ? "inp dropped" : tcpstates[tp->t_state], toep->flags, inp->inp_flags, - toepcb_flag(toep, TPF_ABORT_SHUTDOWN) ? + toep->flags & TPF_ABORT_SHUTDOWN ? " (abort already in progress)" : ""); - if (toepcb_flag(toep, TPF_ABORT_SHUTDOWN)) + if (toep->flags & TPF_ABORT_SHUTDOWN) return; /* abort already in progress */ - toepcb_set_flag(toep, TPF_ABORT_SHUTDOWN); + toep->flags |= TPF_ABORT_SHUTDOWN; - KASSERT(toepcb_flag(toep, TPF_FLOWC_WR_SENT), + KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc_wr not sent for tid %d.", __func__, tid)); wr = alloc_wrqe(sizeof(*req), toep->ofld_txq); @@ -173,7 +174,7 @@ send_reset(struct adapter *sc, struct to req->rsvd0 = htobe32(snd_nxt); else req->rsvd0 = htobe32(tp->snd_nxt); - req->rsvd1 = !toepcb_flag(toep, TPF_TX_DATA_SENT); + req->rsvd1 = !(toep->flags & TPF_TX_DATA_SENT); req->cmd = CPL_ABORT_SEND_RST; /* @@ -299,12 +300,14 @@ make_established(struct toepcb *toep, ui } static int -send_rx_credits(struct adapter *sc, struct toepcb *toep, uint32_t credits) +send_rx_credits(struct adapter *sc, struct toepcb *toep, int credits) { struct wrqe *wr; struct cpl_rx_data_ack *req; uint32_t dack = F_RX_DACK_CHANGE | V_RX_DACK_MODE(1); + KASSERT(credits >= 0, ("%s: %d credits", __func__, credits)); + wr = alloc_wrqe(sizeof(*req), toep->ctrlq); if (wr == NULL) return (0); @@ -323,25 +326,28 @@ t4_rcvd(struct toedev *tod, struct tcpcb struct adapter *sc = tod->tod_softc; struct inpcb *inp = tp->t_inpcb; struct socket *so = inp->inp_socket; - struct sockbuf *so_rcv = &so->so_rcv; + struct sockbuf *sb = &so->so_rcv; struct toepcb *toep = tp->t_toe; - int must_send; + int credits; INP_WLOCK_ASSERT(inp); - SOCKBUF_LOCK(so_rcv); - KASSERT(toep->enqueued >= so_rcv->sb_cc, - ("%s: so_rcv->sb_cc > enqueued", __func__)); - toep->rx_credits += toep->enqueued - so_rcv->sb_cc; - toep->enqueued = so_rcv->sb_cc; - SOCKBUF_UNLOCK(so_rcv); - - must_send = toep->rx_credits + 16384 >= tp->rcv_wnd; - if (must_send || toep->rx_credits >= 15 * 1024) { - int credits; + SOCKBUF_LOCK(sb); + KASSERT(toep->sb_cc >= sb->sb_cc, + ("%s: sb %p has more data (%d) than last time (%d).", + __func__, sb, sb->sb_cc, toep->sb_cc)); + toep->rx_credits += toep->sb_cc - sb->sb_cc; + toep->sb_cc = sb->sb_cc; + credits = toep->rx_credits; + SOCKBUF_UNLOCK(sb); + + if (credits > 0 && + (credits + 16384 >= tp->rcv_wnd || credits >= 15 * 1024)) { - credits = send_rx_credits(sc, toep, toep->rx_credits); + credits = send_rx_credits(sc, toep, credits); + SOCKBUF_LOCK(sb); toep->rx_credits -= credits; + SOCKBUF_UNLOCK(sb); tp->rcv_wnd += credits; tp->rcv_adv += credits; } @@ -358,12 +364,12 @@ close_conn(struct adapter *sc, struct to unsigned int tid = toep->tid; CTR3(KTR_CXGBE, "%s: tid %u%s", __func__, toep->tid, - toepcb_flag(toep, TPF_FIN_SENT) ? ", IGNORED" : ""); + toep->flags & TPF_FIN_SENT ? ", IGNORED" : ""); - if (toepcb_flag(toep, TPF_FIN_SENT)) + if (toep->flags & TPF_FIN_SENT) return (0); - KASSERT(toepcb_flag(toep, TPF_FLOWC_WR_SENT), + KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc_wr not sent for tid %u.", __func__, tid)); wr = alloc_wrqe(sizeof(*req), toep->ofld_txq); @@ -381,8 +387,8 @@ close_conn(struct adapter *sc, struct to OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_CON_REQ, tid)); req->rsvd = 0; - toepcb_set_flag(toep, TPF_FIN_SENT); - toepcb_clr_flag(toep, TPF_SEND_FIN); + toep->flags |= TPF_FIN_SENT; + toep->flags &= ~TPF_SEND_FIN; t4_l2t_send(sc, wr, toep->l2te); return (0); @@ -534,17 +540,18 @@ t4_push_frames(struct adapter *sc, struc struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; INP_WLOCK_ASSERT(inp); - KASSERT(toepcb_flag(toep, TPF_FLOWC_WR_SENT), + KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc_wr not sent for tid %u.", __func__, toep->tid)); - if (toep->ulp_mode != ULP_MODE_NONE) + if (__predict_false(toep->ulp_mode != ULP_MODE_NONE && + toep->ulp_mode != ULP_MODE_TCPDDP)) CXGBE_UNIMPLEMENTED("ulp_mode"); /* * This function doesn't resume by itself. Someone else must clear the * flag and call this function. */ - if (__predict_false(toepcb_flag(toep, TPF_TX_SUSPENDED))) + if (__predict_false(toep->flags & TPF_TX_SUSPENDED)) return; do { @@ -570,7 +577,7 @@ t4_push_frames(struct adapter *sc, struc plen -= m->m_len; if (plen == 0) { /* Too few credits */ - toepcb_set_flag(toep, TPF_TX_SUSPENDED); + toep->flags |= TPF_TX_SUSPENDED; SOCKBUF_UNLOCK(sb); return; } @@ -613,7 +620,7 @@ unlocked: break; } - if (__predict_false(toepcb_flag(toep, TPF_FIN_SENT))) + if (__predict_false(toep->flags & TPF_FIN_SENT)) panic("%s: excess tx.", __func__); if (plen <= max_imm) { @@ -624,7 +631,7 @@ unlocked: toep->ofld_txq); if (wr == NULL) { /* XXX: how will we recover from this? */ - toepcb_set_flag(toep, TPF_TX_SUSPENDED); + toep->flags |= TPF_TX_SUSPENDED; return; } txwr = wrtod(wr); @@ -642,7 +649,7 @@ unlocked: wr = alloc_wrqe(roundup(wr_len, 16), toep->ofld_txq); if (wr == NULL) { /* XXX: how will we recover from this? */ - toepcb_set_flag(toep, TPF_TX_SUSPENDED); + toep->flags |= TPF_TX_SUSPENDED; return; } txwr = wrtod(wr); @@ -671,7 +678,7 @@ unlocked: sb->sb_sndptr = sb_sndptr; SOCKBUF_UNLOCK(sb); - toepcb_set_flag(toep, TPF_TX_DATA_SENT); + toep->flags |= TPF_TX_DATA_SENT; KASSERT(toep->txsd_avail > 0, ("%s: no txsd", __func__)); txsd->plen = plen; @@ -687,7 +694,7 @@ unlocked: } while (m != NULL); /* Send a FIN if requested, but only if there's no more data to send */ - if (m == NULL && toepcb_flag(toep, TPF_SEND_FIN)) + if (m == NULL && toep->flags & TPF_SEND_FIN) close_conn(sc, toep); } @@ -724,7 +731,7 @@ t4_send_fin(struct toedev *tod, struct t ("%s: inp %p dropped.", __func__, inp)); KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); - toepcb_set_flag(toep, TPF_SEND_FIN); + toep->flags |= TPF_SEND_FIN; t4_push_frames(sc, toep); return (0); @@ -745,7 +752,7 @@ t4_send_rst(struct toedev *tod, struct t KASSERT(toep != NULL, ("%s: toep is NULL", __func__)); /* hmmmm */ - KASSERT(toepcb_flag(toep, TPF_FLOWC_WR_SENT), + KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc for tid %u [%s] not sent already", __func__, toep->tid, tcpstates[tp->t_state])); @@ -765,7 +772,8 @@ do_peer_close(struct sge_iq *iq, const s struct toepcb *toep = lookup_tid(sc, tid); struct inpcb *inp = toep->inp; struct tcpcb *tp = NULL; - struct socket *so = NULL; + struct socket *so; + struct sockbuf *sb; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif @@ -782,13 +790,38 @@ do_peer_close(struct sge_iq *iq, const s CTR5(KTR_CXGBE, "%s: tid %u (%s), toep_flags 0x%x, inp %p", __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags, inp); - if (toepcb_flag(toep, TPF_ABORT_SHUTDOWN)) + if (toep->flags & TPF_ABORT_SHUTDOWN) goto done; + tp->rcv_nxt++; /* FIN */ + so = inp->inp_socket; + sb = &so->so_rcv; + SOCKBUF_LOCK(sb); + if (__predict_false(toep->ddp_flags & (DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE))) { + m = m_get(M_NOWAIT, MT_DATA); + if (m == NULL) + CXGBE_UNIMPLEMENTED("mbuf alloc failure"); + + m->m_len = be32toh(cpl->rcv_nxt) - tp->rcv_nxt; + m->m_flags |= M_DDP; /* Data is already where it should be */ + m->m_data = "nothing to see here"; + tp->rcv_nxt = be32toh(cpl->rcv_nxt); + + toep->ddp_flags &= ~(DDP_BUF0_ACTIVE | DDP_BUF1_ACTIVE); + + KASSERT(toep->sb_cc >= sb->sb_cc, + ("%s: sb %p has more data (%d) than last time (%d).", + __func__, sb, sb->sb_cc, toep->sb_cc)); + toep->rx_credits += toep->sb_cc - sb->sb_cc; +#ifdef USE_DDP_RX_FLOW_CONTROL + toep->rx_credits -= m->m_len; /* adjust for F_RX_FC_DDP */ +#endif + sbappendstream_locked(sb, m); + toep->sb_cc = sb->sb_cc; + } + socantrcvmore_locked(so); /* unlocks the sockbuf */ - socantrcvmore(so); - tp->rcv_nxt++; /* FIN */ KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt), ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt, be32toh(cpl->rcv_nxt))); @@ -855,7 +888,7 @@ do_close_con_rpl(struct sge_iq *iq, cons CTR4(KTR_CXGBE, "%s: tid %u (%s), toep_flags 0x%x", __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags); - if (toepcb_flag(toep, TPF_ABORT_SHUTDOWN)) + if (toep->flags & TPF_ABORT_SHUTDOWN) goto done; so = inp->inp_socket; @@ -953,7 +986,7 @@ do_abort_req(struct sge_iq *iq, const st ("%s: unexpected opcode 0x%x", __func__, opcode)); KASSERT(m == NULL, ("%s: wasn't expecting payload", __func__)); - if (toepcb_flag(toep, TPF_SYNQE)) + if (toep->flags & TPF_SYNQE) return (do_abort_req_synqe(iq, rss, m)); KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); @@ -974,19 +1007,19 @@ do_abort_req(struct sge_iq *iq, const st CTR6(KTR_CXGBE, "%s: tid %d (%s), toep_flags 0x%x, inp_flags 0x%x, status %d", - __func__, tid, tcpstates[tp->t_state], toep->flags, inp->inp_flags, - cpl->status); + __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags, + inp->inp_flags, cpl->status); /* * If we'd initiated an abort earlier the reply to it is responsible for * cleaning up resources. Otherwise we tear everything down right here * right now. We owe the T4 a CPL_ABORT_RPL no matter what. */ - if (toepcb_flag(toep, TPF_ABORT_SHUTDOWN)) { + if (toep->flags & TPF_ABORT_SHUTDOWN) { INP_WUNLOCK(inp); goto done; } - toepcb_set_flag(toep, TPF_ABORT_SHUTDOWN); + toep->flags |= TPF_ABORT_SHUTDOWN; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 18:02:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F37731065674; Thu, 6 Sep 2012 18:02: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 DF29C8FC0C; Thu, 6 Sep 2012 18:02:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86I2Wv6061914; Thu, 6 Sep 2012 18:02:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86I2Ww2061911; Thu, 6 Sep 2012 18:02:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209061802.q86I2Ww2061911@svn.freebsd.org> From: John Baldwin Date: Thu, 6 Sep 2012 18:02: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: r240170 - in head/sys/modules: . ct X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 18:02:33 -0000 Author: jhb Date: Thu Sep 6 18:02:32 2012 New Revision: 240170 URL: http://svn.freebsd.org/changeset/base/240170 Log: Add a kernel module on pc98 for the ct(4) driver. Added: head/sys/modules/ct/ head/sys/modules/ct/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Sep 6 17:28:47 2012 (r240169) +++ head/sys/modules/Makefile Thu Sep 6 18:02:32 2012 (r240170) @@ -78,6 +78,7 @@ SUBDIR= \ ${_crypto} \ ${_cryptodev} \ ${_cs} \ + ${_ct} \ ${_ctau} \ ${_cxgb} \ cxgbe \ @@ -607,6 +608,7 @@ _x86bios= x86bios .elif ${MACHINE} == "pc98" _canbepm= canbepm _canbus= canbus +_ct= ct _pmc= pmc _snc= snc .endif Added: head/sys/modules/ct/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ct/Makefile Thu Sep 6 18:02:32 2012 (r240170) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/ct + +KMOD= ct +SRCS= bshw_machdep.c ct.c ct_isa.c +SRCS+= device_if.h bus_if.h isa_if.h +SRCS+= opt_ct.h opt_cam.h opt_scsi.h opt_ddb.h + +.include From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 18:31:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F063F106564A; Thu, 6 Sep 2012 18:31:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBB308FC08; Thu, 6 Sep 2012 18:31:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86IVu7X065363; Thu, 6 Sep 2012 18:31:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86IVu1M065361; Thu, 6 Sep 2012 18:31:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209061831.q86IVu1M065361@svn.freebsd.org> From: Michael Tuexen Date: Thu, 6 Sep 2012 18:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240171 - releng/9.1/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: Thu, 06 Sep 2012 18:31:57 -0000 Author: tuexen Date: Thu Sep 6 18:31:56 2012 New Revision: 240171 URL: http://svn.freebsd.org/changeset/base/240171 Log: MFC rr240007: Fix a typo which results in RTT to be off by a factor of 10, if the RTT is larger than 1 second. Approved by: re (kib) Modified: releng/9.1/sys/netinet/sctputil.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/netinet/sctputil.c ============================================================================== --- releng/9.1/sys/netinet/sctputil.c Thu Sep 6 18:02:32 2012 (r240170) +++ releng/9.1/sys/netinet/sctputil.c Thu Sep 6 18:31:56 2012 (r240171) @@ -2384,7 +2384,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb } timevalsub(&now, old); /* store the current RTT in us */ - net->rtt = (uint64_t) 10000000 *(uint64_t) now.tv_sec + + net->rtt = (uint64_t) 1000000 *(uint64_t) now.tv_sec + (uint64_t) now.tv_usec; /* computer rtt in ms */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 18:53:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34243106566C; Thu, 6 Sep 2012 18:53:34 +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 1D0F58FC08; Thu, 6 Sep 2012 18:53:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86IrY63068374; Thu, 6 Sep 2012 18:53:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86IrX9J068367; Thu, 6 Sep 2012 18:53:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209061853.q86IrX9J068367@svn.freebsd.org> From: John Baldwin Date: Thu, 6 Sep 2012 18:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240172 - in head/sys: cam/scsi dev/ct dev/ncv dev/nsp dev/stg 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: Thu, 06 Sep 2012 18:53:34 -0000 Author: jhb Date: Thu Sep 6 18:53:33 2012 New Revision: 240172 URL: http://svn.freebsd.org/changeset/base/240172 Log: Remove NetBSD compat shims for drivers originally shared with NetBSD/pc98. NetBSD/pc98 was never merged into the main NetBSD tree and is no longer developed. Adding locking to these drivers would have made the compat shims hard to impossible to maintain, so remove the shims to ease future changes. These changes were verified by md5. Some additional shims can be removed that do affect the compiled results that I will probably do in another round. Approved by: nyan (tentatively) Deleted: head/sys/sys/device_port.h Modified: head/sys/cam/scsi/scsi_low.c head/sys/cam/scsi/scsi_low.h head/sys/cam/scsi/scsi_low_pisa.c head/sys/cam/scsi/scsi_low_pisa.h head/sys/dev/ct/bshw_machdep.c head/sys/dev/ct/ct.c head/sys/dev/ct/ct_isa.c head/sys/dev/ct/ctvar.h head/sys/dev/ncv/ncr53c500.c head/sys/dev/ncv/ncr53c500_pccard.c head/sys/dev/ncv/ncr53c500var.h head/sys/dev/nsp/nsp.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/nsp/nspvar.h head/sys/dev/stg/tmc18c30.c head/sys/dev/stg/tmc18c30_pccard.c head/sys/dev/stg/tmc18c30var.h Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Thu Sep 6 18:31:56 2012 (r240171) +++ head/sys/cam/scsi/scsi_low.c Thu Sep 6 18:53:33 2012 (r240172) @@ -14,13 +14,7 @@ __FBSDID("$FreeBSD$"); /* #define SCSI_LOW_QCLEAR_AFTER_CA */ /* #define SCSI_LOW_FLAGS_QUIRKS_OK */ -#ifdef __NetBSD__ -#define SCSI_LOW_TARGET_OPEN -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ #define SCSI_LOW_FLAGS_QUIRKS_OK -#endif /* __FreeBSD__ */ /*- * [NetBSD for NEC PC-98 series] @@ -71,41 +65,12 @@ __FBSDID("$FreeBSD$"); #include #include #include - -#ifdef __FreeBSD__ -#if __FreeBSD_version >= 500001 #include -#else -#include -#endif -#endif /* __FreeBSD__ */ - #include #include #include #include -#ifdef __NetBSD__ -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ #include #include #include @@ -119,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include -#endif /* __FreeBSD__ */ /************************************************************** * Constants @@ -392,501 +356,6 @@ scsi_low_translate_error_code(cb, tp) return tp->error_code; } -#ifdef SCSI_LOW_INTERFACE_XS -/************************************************************** - * SCSI INTERFACE (XS) - **************************************************************/ -#define SCSI_LOW_MINPHYS 0x10000 -#define SCSI_LOW_MALLOC(size) malloc((size), M_SCSILOW, M_NOWAIT) -#define SCSI_LOW_FREE(pt) free((pt), M_SCSILOW) -#define SCSI_LOW_ALLOC_CCB(flags) scsi_low_get_ccb((flags)) -#define SCSI_LOW_XS_POLL_HZ 1000 - -static int scsi_low_poll_xs(struct scsi_low_softc *, struct slccb *); -static void scsi_low_scsi_minphys_xs(struct buf *); -#ifdef SCSI_LOW_TARGET_OPEN -static int scsi_low_target_open(struct scsipi_link *, struct cfdata *); -#endif /* SCSI_LOW_TARGET_OPEN */ -static int scsi_low_scsi_cmd_xs(struct scsipi_xfer *); -static int scsi_low_enable_xs(void *, int); -static int scsi_low_ioctl_xs(struct scsipi_link *, u_long, caddr_t, int, struct proc *); - -static int scsi_low_attach_xs(struct scsi_low_softc *); -static int scsi_low_world_start_xs(struct scsi_low_softc *); -static int scsi_low_dettach_xs(struct scsi_low_softc *); -static int scsi_low_ccb_setup_xs(struct scsi_low_softc *, struct slccb *); -static int scsi_low_done_xs(struct scsi_low_softc *, struct slccb *); -static void scsi_low_timeout_xs(struct scsi_low_softc *, int, int); -static u_int scsi_low_translate_quirks_xs(u_int); -static void scsi_low_setup_quirks_xs(struct targ_info *, struct lun_info *, u_int); - -struct scsi_low_osdep_funcs scsi_low_osdep_funcs_xs = { - scsi_low_attach_xs, - scsi_low_world_start_xs, - scsi_low_dettach_xs, - scsi_low_ccb_setup_xs, - scsi_low_done_xs, - scsi_low_timeout_xs -}; - -struct scsipi_device scsi_low_dev = { - NULL, /* Use default error handler */ - NULL, /* have a queue, served by this */ - NULL, /* have no async handler */ - NULL, /* Use default 'done' routine */ -}; - -struct scsi_low_error_code scsi_low_error_code_xs[] = { - {0, XS_NOERROR}, - {SENSEIO, XS_SENSE}, - {BUSYERR, XS_BUSY }, - {SELTIMEOUTIO, XS_SELTIMEOUT}, - {TIMEOUTIO, XS_TIMEOUT}, - {-1, XS_DRIVER_STUFFUP} -}; - -static int -scsi_low_ioctl_xs(link, cmd, addr, flag, p) - struct scsipi_link *link; - u_long cmd; - caddr_t addr; - int flag; - struct proc *p; -{ - struct scsi_low_softc *slp; - int s, error = ENOTTY; - - slp = (struct scsi_low_softc *) link->adapter_softc; - if ((slp->sl_flags & HW_INACTIVE) != 0) - return ENXIO; - - if (cmd == SCBUSIORESET) - { - s = SCSI_LOW_SPLSCSI(); - scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, NULL); - splx(s); - error = 0; - } - else if (slp->sl_funcs->scsi_low_ioctl != 0) - { - error = (*slp->sl_funcs->scsi_low_ioctl) - (slp, cmd, addr, flag, p); - } - - return error; -} - -static int -scsi_low_enable_xs(arg, enable) - void *arg; - int enable; -{ - struct scsi_low_softc *slp = arg; - - if (enable != 0) - { - if ((slp->sl_flags & HW_INACTIVE) != 0) - return ENXIO; - } - else - { - if ((slp->sl_flags & HW_INACTIVE) != 0 || - (slp->sl_flags & HW_POWERCTRL) == 0) - return 0; - - slp->sl_flags |= HW_POWDOWN; - if (slp->sl_funcs->scsi_low_power != NULL) - { - (*slp->sl_funcs->scsi_low_power) - (slp, SCSI_LOW_POWDOWN); - } - } - return 0; -} - -static void -scsi_low_scsi_minphys_xs(bp) - struct buf *bp; -{ - - if (bp->b_bcount > SCSI_LOW_MINPHYS) - bp->b_bcount = SCSI_LOW_MINPHYS; - minphys(bp); -} - -static int -scsi_low_poll_xs(slp, cb) - struct scsi_low_softc *slp; - struct slccb *cb; -{ - struct scsipi_xfer *xs = cb->osdep; - int tcount; - - cb->ccb_flags |= CCB_NOSDONE; - tcount = 0; - - while (slp->sl_nio > 0) - { - SCSI_LOW_DELAY((1000 * 1000) / SCSI_LOW_XS_POLL_HZ); - - (*slp->sl_funcs->scsi_low_poll) (slp); - - if ((slp->sl_flags & (HW_INACTIVE | HW_INITIALIZING)) != 0) - { - cb->ccb_flags |= CCB_NORETRY; - cb->ccb_error |= FATALIO; - (void) scsi_low_revoke_ccb(slp, cb, 1); - printf("%s: hardware inactive in poll mode\n", - slp->sl_xname); - } - - if ((xs->flags & ITSDONE) != 0) - break; - - if (tcount ++ < SCSI_LOW_XS_POLL_HZ / SCSI_LOW_TIMEOUT_HZ) - continue; - - tcount = 0; - scsi_low_timeout_check(slp); - } - - xs->flags |= ITSDONE; - scsipi_done(xs); - return COMPLETE; -} - -static int -scsi_low_scsi_cmd_xs(xs) - struct scsipi_xfer *xs; -{ - struct scsipi_link *splp = xs->sc_link; - struct scsi_low_softc *slp = splp->adapter_softc; - struct targ_info *ti; - struct lun_info *li; - struct slccb *cb; - int s, targ, lun, flags, rv; - - if ((cb = SCSI_LOW_ALLOC_CCB(xs->flags & SCSI_NOSLEEP)) == NULL) - return TRY_AGAIN_LATER; - - targ = splp->scsipi_scsi.target, - lun = splp->scsipi_scsi.lun; - ti = slp->sl_ti[targ]; - - cb->osdep = xs; - cb->bp = xs->bp; - - if ((xs->flags & SCSI_POLL) == 0) - flags = CCB_AUTOSENSE; - else - flags = CCB_AUTOSENSE | CCB_POLLED; - - - s = SCSI_LOW_SPLSCSI(); - li = scsi_low_alloc_li(ti, lun, 1); - if ((u_int) splp->quirks != li->li_sloi.sloi_quirks) - { - scsi_low_setup_quirks_xs(ti, li, (u_int) splp->quirks); - } - - if ((xs->flags & SCSI_RESET) != 0) - { - flags |= CCB_NORETRY | CCB_URGENT; - scsi_low_enqueue(slp, ti, li, cb, flags, SCSI_LOW_MSG_RESET); - } - else - { - if (ti->ti_setup_msg != 0) - { - scsi_low_message_enqueue(slp, ti, li, flags); - } - - flags |= CCB_SCSIIO; - scsi_low_enqueue(slp, ti, li, cb, flags, 0); - } - -#ifdef SCSI_LOW_DEBUG - if (SCSI_LOW_DEBUG_TEST_GO(SCSI_LOW_ABORT_CHECK, ti->ti_id) != 0) - { - scsi_low_test_abort(slp, ti, li); - } -#endif /* SCSI_LOW_DEBUG */ - - if ((cb->ccb_flags & CCB_POLLED) != 0) - { - rv = scsi_low_poll_xs(slp, cb); - } - else - { - rv = SUCCESSFULLY_QUEUED; - } - splx(s); - return rv; -} - -static int -scsi_low_attach_xs(slp) - struct scsi_low_softc *slp; -{ - struct scsipi_adapter *sap; - struct scsipi_link *splp; - - strncpy(slp->sl_xname, slp->sl_dev.dv_xname, 16); - - sap = SCSI_LOW_MALLOC(sizeof(*sap)); - if (sap == NULL) - return ENOMEM; - splp = SCSI_LOW_MALLOC(sizeof(*splp)); - if (splp == NULL) - { - SCSI_LOW_FREE(sap); - return ENOMEM; - } - - SCSI_LOW_BZERO(sap, sizeof(*sap)); - SCSI_LOW_BZERO(splp, sizeof(*splp)); - - sap->scsipi_cmd = scsi_low_scsi_cmd_xs; - sap->scsipi_minphys = scsi_low_scsi_minphys_xs; - sap->scsipi_enable = scsi_low_enable_xs; - sap->scsipi_ioctl = scsi_low_ioctl_xs; -#ifdef SCSI_LOW_TARGET_OPEN - sap->open_target_lu = scsi_low_target_open; -#endif /* SCSI_LOW_TARGET_OPEN */ - - splp->adapter_softc = slp; - splp->scsipi_scsi.adapter_target = slp->sl_hostid; - splp->scsipi_scsi.max_target = slp->sl_ntargs - 1; - splp->scsipi_scsi.max_lun = slp->sl_nluns - 1; - splp->scsipi_scsi.channel = SCSI_CHANNEL_ONLY_ONE; - splp->openings = slp->sl_openings; - splp->type = BUS_SCSI; - splp->adapter_softc = slp; - splp->adapter = sap; - splp->device = &scsi_low_dev; - - slp->sl_si.si_splp = splp; - slp->sl_show_result = SHOW_ALL_NEG; - return 0; -} - -static int -scsi_low_world_start_xs(slp) - struct scsi_low_softc *slp; -{ - - return 0; -} - -static int -scsi_low_dettach_xs(slp) - struct scsi_low_softc *slp; -{ - - /* - * scsipi does not have dettach bus fucntion. - * - scsipi_dettach_scsibus(slp->sl_si.si_splp); - */ - return 0; -} - -static int -scsi_low_ccb_setup_xs(slp, cb) - struct scsi_low_softc *slp; - struct slccb *cb; -{ - struct scsipi_xfer *xs = (struct scsipi_xfer *) cb->osdep; - - if ((cb->ccb_flags & CCB_SCSIIO) != 0) - { - cb->ccb_scp.scp_cmd = (u_int8_t *) xs->cmd; - cb->ccb_scp.scp_cmdlen = xs->cmdlen; - cb->ccb_scp.scp_data = xs->data; - cb->ccb_scp.scp_datalen = xs->datalen; - cb->ccb_scp.scp_direction = (xs->flags & SCSI_DATA_OUT) ? - SCSI_LOW_WRITE : SCSI_LOW_READ; - cb->ccb_tcmax = xs->timeout / 1000; - } - else - { - scsi_low_unit_ready_cmd(cb); - } - return SCSI_LOW_START_QTAG; -} - -static int -scsi_low_done_xs(slp, cb) - struct scsi_low_softc *slp; - struct slccb *cb; -{ - struct scsipi_xfer *xs; - - xs = (struct scsipi_xfer *) cb->osdep; - if (cb->ccb_error == 0) - { - xs->error = XS_NOERROR; - xs->resid = 0; - } - else - { - if (cb->ccb_rcnt >= slp->sl_max_retry) - cb->ccb_error |= ABORTIO; - - if ((cb->ccb_flags & CCB_NORETRY) == 0 && - (cb->ccb_error & ABORTIO) == 0) - return EJUSTRETURN; - - if ((cb->ccb_error & SENSEIO) != 0) - { - xs->sense.scsi_sense = cb->ccb_sense; - } - - xs->error = scsi_low_translate_error_code(cb, - &scsi_low_error_code_xs[0]); - -#ifdef SCSI_LOW_DIAGNOSTIC - if ((cb->ccb_flags & CCB_SILENT) == 0 && - cb->ccb_scp.scp_cmdlen > 0 && - (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] & - SCSI_LOW_CMD_ABORT_WARNING) != 0) - { - printf("%s: WARNING: scsi_low IO abort\n", - slp->sl_xname); - scsi_low_print(slp, NULL); - } -#endif /* SCSI_LOW_DIAGNOSTIC */ - } - - if (cb->ccb_scp.scp_status == ST_UNKNOWN) - xs->status = 0; /* XXX */ - else - xs->status = cb->ccb_scp.scp_status; - - xs->flags |= ITSDONE; - if ((cb->ccb_flags & CCB_NOSDONE) == 0) - scsipi_done(xs); - - return 0; -} - -static void -scsi_low_timeout_xs(slp, ch, action) - struct scsi_low_softc *slp; - int ch; - int action; -{ - - switch (ch) - { - case SCSI_LOW_TIMEOUT_CH_IO: - switch (action) - { - case SCSI_LOW_TIMEOUT_START: - timeout(scsi_low_timeout, slp, - hz / SCSI_LOW_TIMEOUT_HZ); - break; - case SCSI_LOW_TIMEOUT_STOP: - untimeout(scsi_low_timeout, slp); - break; - } - break; - - case SCSI_LOW_TIMEOUT_CH_ENGAGE: - switch (action) - { - case SCSI_LOW_TIMEOUT_START: - timeout(scsi_low_engage, slp, 1); - break; - case SCSI_LOW_TIMEOUT_STOP: - untimeout(scsi_low_engage, slp); - break; - } - break; - - case SCSI_LOW_TIMEOUT_CH_RECOVER: - break; - } -} - -u_int -scsi_low_translate_quirks_xs(quirks) - u_int quirks; -{ - u_int flags; - - flags = SCSI_LOW_DISK_LFLAGS | SCSI_LOW_DISK_TFLAGS; - -#ifdef SDEV_NODISC - if (quirks & SDEV_NODISC) - flags &= ~SCSI_LOW_DISK_DISC; -#endif /* SDEV_NODISC */ -#ifdef SDEV_NOPARITY - if (quirks & SDEV_NOPARITY) - flags &= ~SCSI_LOW_DISK_PARITY; -#endif /* SDEV_NOPARITY */ -#ifdef SDEV_NOCMDLNK - if (quirks & SDEV_NOCMDLNK) - flags &= ~SCSI_LOW_DISK_LINK; -#endif /* SDEV_NOCMDLNK */ -#ifdef SDEV_NOTAG - if (quirks & SDEV_NOTAG) - flags &= ~SCSI_LOW_DISK_QTAG; -#endif /* SDEV_NOTAG */ -#ifdef SDEV_NOSYNC - if (quirks & SDEV_NOSYNC) - flags &= ~SCSI_LOW_DISK_SYNC; -#endif /* SDEV_NOSYNC */ - - return flags; -} - -static void -scsi_low_setup_quirks_xs(ti, li, flags) - struct targ_info *ti; - struct lun_info *li; - u_int flags; -{ - u_int quirks; - - li->li_sloi.sloi_quirks = flags; - quirks = scsi_low_translate_quirks_xs(flags); - ti->ti_quirks = quirks & SCSI_LOW_DISK_TFLAGS; - li->li_quirks = quirks & SCSI_LOW_DISK_LFLAGS; - ti->ti_flags_valid |= SCSI_LOW_TARG_FLAGS_QUIRKS_VALID; - li->li_flags_valid |= SCSI_LOW_LUN_FLAGS_QUIRKS_VALID; - scsi_low_calcf_target(ti); - scsi_low_calcf_lun(li); - scsi_low_calcf_show(li); -} - -#ifdef SCSI_LOW_TARGET_OPEN -static int -scsi_low_target_open(link, cf) - struct scsipi_link *link; - struct cfdata *cf; -{ - u_int target = link->scsipi_scsi.target; - u_int lun = link->scsipi_scsi.lun; - struct scsi_low_softc *slp; - struct targ_info *ti; - struct lun_info *li; - - slp = (struct scsi_low_softc *) link->adapter_softc; - ti = slp->sl_ti[target]; - li = scsi_low_alloc_li(ti, lun, 0); - if (li == NULL) - return 0; - - li->li_cfgflags = cf->cf_flags; - scsi_low_setup_quirks_xs(ti, li, (u_int) link->quirks); - return 0; -} -#endif /* SCSI_LOW_TARGET_OPEN */ - -#endif /* SCSI_LOW_INTERFACE_XS */ - -#ifdef SCSI_LOW_INTERFACE_CAM /************************************************************** * SCSI INTERFACE (CAM) **************************************************************/ @@ -1001,7 +470,7 @@ scsi_low_scsi_action_cam(sim, ccb) else flags = CCB_SCSIIO; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); li = scsi_low_alloc_li(ti, lun, 1); if (ti->ti_setup_msg != 0) @@ -1040,7 +509,7 @@ scsi_low_scsi_action_cam(sim, ccb) } #endif /* SCSI_LOW_DIAGNOSTIC */ - s = SCSI_LOW_SPLSCSI(); + s = splcam(); cb = scsi_low_find_ccb(slp, target, lun, ccb->cab.abort_ccb); rv = scsi_low_abort_ccb(slp, cb); splx(s); @@ -1072,7 +541,7 @@ scsi_low_scsi_action_cam(sim, ccb) if (lun == CAM_LUN_WILDCARD) lun = 0; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); scsi = &cts->proto_specific.scsi; spi = &cts->xport_specific.spi; if ((spi->valid & (CTS_SPI_VALID_BUS_WIDTH | @@ -1144,7 +613,7 @@ scsi_low_scsi_action_cam(sim, ccb) if (lun == CAM_LUN_WILDCARD) lun = 0; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); li = scsi_low_alloc_li(ti, lun, 1); if (li != NULL && cts->type == CTS_TYPE_CURRENT_SETTINGS) { struct ccb_trans_settings_scsi *scsi = @@ -1202,7 +671,7 @@ settings_out: } case XPT_RESET_BUS: /* Reset the specified SCSI bus */ - s = SCSI_LOW_SPLSCSI(); + s = splcam(); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, NULL); splx(s); ccb->ccb_h.status = CAM_REQ_CMP; @@ -1243,7 +712,7 @@ settings_out: else flags = CCB_NORETRY | CCB_URGENT; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); li = scsi_low_alloc_li(ti, lun, 1); scsi_low_enqueue(slp, ti, li, cb, flags, msg); splx(s); @@ -1299,7 +768,7 @@ scsi_low_attach_cam(slp) int tagged_openings; sprintf(slp->sl_xname, "%s%d", - DEVPORT_DEVNAME(slp->sl_dev), DEVPORT_DEVUNIT(slp->sl_dev)); + device_get_name(slp->sl_dev), device_get_unit(slp->sl_dev)); devq = cam_simq_alloc(SCSI_LOW_NCCB); if (devq == NULL) @@ -1311,8 +780,8 @@ scsi_low_attach_cam(slp) tagged_openings = min(slp->sl_openings, SCSI_LOW_MAXNEXUS); slp->sl_si.sim = cam_sim_alloc(scsi_low_scsi_action_cam, scsi_low_poll_cam, - DEVPORT_DEVNAME(slp->sl_dev), slp, - DEVPORT_DEVUNIT(slp->sl_dev), &Giant, + device_get_name(slp->sl_dev), slp, + device_get_unit(slp->sl_dev), &Giant, slp->sl_openings, tagged_openings, devq); if (slp->sl_si.sim == NULL) { @@ -1479,8 +948,6 @@ scsi_low_timeout_cam(slp, ch, action) } } -#endif /* SCSI_LOW_INTERFACE_CAM */ - /*============================================================= * END OF OS switch (All OS depend fucntions should be above) =============================================================*/ @@ -1504,7 +971,7 @@ scsi_low_deactivate(slp) { int s; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); slp->sl_flags |= HW_INACTIVE; (*slp->sl_osdep_fp->scsi_low_osdep_timeout) (slp, SCSI_LOW_TIMEOUT_CH_IO, SCSI_LOW_TIMEOUT_STOP); @@ -1520,7 +987,7 @@ scsi_low_activate(slp) { int error, s; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); slp->sl_flags &= ~HW_INACTIVE; if ((error = scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, NULL)) != 0) { @@ -1600,7 +1067,7 @@ scsi_low_engage(arg) void *arg; { struct scsi_low_softc *slp = arg; - int s = SCSI_LOW_SPLSCSI(); + int s = splcam(); switch (slp->sl_rstep) { @@ -1696,7 +1163,7 @@ scsi_low_alloc_li(ti, lun, alloc) if (li == NULL) panic("no lun info mem"); - SCSI_LOW_BZERO(li, ti->ti_lunsize); + bzero(li, ti->ti_lunsize); li->li_lun = lun; li->li_ti = ti; @@ -1738,7 +1205,7 @@ scsi_low_alloc_ti(slp, targ) if (ti == NULL) panic("%s short of memory", slp->sl_xname); - SCSI_LOW_BZERO(ti, slp->sl_targsize); + bzero(ti, slp->sl_targsize); ti->ti_id = targ; ti->ti_sc = slp; @@ -1812,7 +1279,7 @@ scsi_low_timeout(arg) struct scsi_low_softc *slp = arg; int s; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); (void) scsi_low_timeout_check(slp); (*slp->sl_osdep_fp->scsi_low_osdep_timeout) (slp, SCSI_LOW_TIMEOUT_CH_IO, SCSI_LOW_TIMEOUT_START); @@ -1995,12 +1462,7 @@ scsi_low_attach(slp, openings, ntargs, n struct lun_info *li; int s, i, nccb, rv; -#ifdef SCSI_LOW_INTERFACE_XS - slp->sl_osdep_fp = &scsi_low_osdep_funcs_xs; -#endif /* SCSI_LOW_INTERFACE_XS */ -#ifdef SCSI_LOW_INTERFACE_CAM slp->sl_osdep_fp = &scsi_low_osdep_funcs_cam; -#endif /* SCSI_LOW_INTERFACE_CAM */ if (slp->sl_osdep_fp == NULL) panic("scsi_low: interface not spcified"); @@ -2042,7 +1504,7 @@ scsi_low_attach(slp, openings, ntargs, n TAILQ_INIT(&slp->sl_start); /* call os depend attach */ - s = SCSI_LOW_SPLSCSI(); + s = splcam(); rv = (*slp->sl_osdep_fp->scsi_low_osdep_attach) (slp); if (rv != 0) { @@ -2053,7 +1515,7 @@ scsi_low_attach(slp, openings, ntargs, n } /* check hardware */ - SCSI_LOW_DELAY(1000); /* wait for 1ms */ + DELAY(1000); /* wait for 1ms */ if (scsi_low_init(slp, SCSI_LOW_RESTART_HARD) != 0) { splx(s); @@ -2088,7 +1550,7 @@ scsi_low_dettach(slp) { int s, rv; - s = SCSI_LOW_SPLSCSI(); + s = splcam(); if (scsi_low_is_busy(slp) != 0) { splx(s); @@ -2208,7 +1670,7 @@ scsi_low_sense_abort_start(slp, ti, li, { cb->ccb_scp.scp_cmdlen = 6; - SCSI_LOW_BZERO(cb->ccb_scsi_cmd, cb->ccb_scp.scp_cmdlen); + bzero(cb->ccb_scsi_cmd, cb->ccb_scp.scp_cmdlen); cb->ccb_scsi_cmd[0] = REQUEST_SENSE; cb->ccb_scsi_cmd[4] = sizeof(cb->ccb_sense); cb->ccb_scp.scp_cmd = cb->ccb_scsi_cmd; @@ -2223,7 +1685,7 @@ scsi_low_sense_abort_start(slp, ti, li, } else { - SCSI_LOW_BZERO(&cb->ccb_sense, sizeof(cb->ccb_sense)); + bzero(&cb->ccb_sense, sizeof(cb->ccb_sense)); #ifdef SCSI_LOW_NEGOTIATE_BEFORE_SENSE scsi_low_assert_msg(slp, ti, ti->ti_setup_msg_done, 0); #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */ @@ -2883,7 +2345,7 @@ scsi_low_twiddle_wait(void) cnputc('\b'); cnputc(tw_chars[tw_pos++]); tw_pos %= (sizeof(tw_chars) - 1); - SCSI_LOW_DELAY(TWIDDLEWAIT); + DELAY(TWIDDLEWAIT); } void @@ -4632,7 +4094,7 @@ scsi_low_poll(slp, cb) tcount = 0; while (slp->sl_nio > 0) { - SCSI_LOW_DELAY((1000 * 1000) / SCSI_LOW_POLL_HZ); + DELAY((1000 * 1000) / SCSI_LOW_POLL_HZ); (*slp->sl_funcs->scsi_low_poll) (slp); if (tcount ++ < SCSI_LOW_POLL_HZ / SCSI_LOW_TIMEOUT_HZ) Modified: head/sys/cam/scsi/scsi_low.h ============================================================================== --- head/sys/cam/scsi/scsi_low.h Thu Sep 6 18:31:56 2012 (r240171) +++ head/sys/cam/scsi/scsi_low.h Thu Sep 6 18:53:33 2012 (r240172) @@ -48,24 +48,9 @@ * Scsi low OSDEP * (All os depend structures should be here!) ================================================*/ -/******** interface ******************************/ -#ifdef __NetBSD__ -#define SCSI_LOW_INTERFACE_XS -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ -#define SCSI_LOW_INTERFACE_CAM -#define CAM -#endif /* __FreeBSD__ */ - /******** includes *******************************/ -#ifdef __NetBSD__ -#include -#include -#endif /* __NetBSD__ */ -#ifdef __FreeBSD__ -#include +#include #include #include #include @@ -75,47 +60,16 @@ #include #include -#endif /* __FreeBSD__ */ /******** functions macro ************************/ -#ifdef __NetBSD__ -#define SCSI_LOW_DEBUGGER(dev) Debugger() -#define SCSI_LOW_DELAY(mu) delay((mu)) -#define SCSI_LOW_SPLSCSI splbio -#define SCSI_LOW_BZERO(pt, size) memset((pt), 0, (size)) -#endif /* __NetBSD__ */ -#ifdef __FreeBSD__ #undef MSG_IDENTIFY -#define SCSI_LOW_DEBUGGER(dev) kdb_enter(KDB_WHY_CAM, dev) -#define SCSI_LOW_DELAY(mu) DELAY((mu)) -#define SCSI_LOW_SPLSCSI splcam -#define SCSI_LOW_BZERO(pt, size) bzero((pt), (size)) -#endif /* __FreeBSD__ */ /******** os depend interface structures **********/ -#ifdef __NetBSD__ -typedef struct scsipi_sense_data scsi_low_osdep_sense_data_t; - -struct scsi_low_osdep_interface { - struct device si_dev; - - struct scsipi_link *si_splp; -}; - -struct scsi_low_osdep_targ_interface { -}; - -struct scsi_low_osdep_lun_interface { - u_int sloi_quirks; -}; -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ typedef struct scsi_sense_data scsi_low_osdep_sense_data_t; struct scsi_low_osdep_interface { - DEVPORT_DEVICE si_dev; + device_t si_dev; struct cam_sim *sim; struct cam_path *path; @@ -134,7 +88,6 @@ struct scsi_low_osdep_targ_interface { struct scsi_low_osdep_lun_interface { }; -#endif /* __FreeBSD__ */ /******** os depend interface functions *************/ struct slccb; Modified: head/sys/cam/scsi/scsi_low_pisa.c ============================================================================== --- head/sys/cam/scsi/scsi_low_pisa.c Thu Sep 6 18:31:56 2012 (r240171) +++ head/sys/cam/scsi/scsi_low_pisa.c Thu Sep 6 18:53:33 2012 (r240172) @@ -34,99 +34,13 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __NetBSD__ #include #include #include -#include -#include - -#include -#include - -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#include -#include - -#define SCSIBUS_RESCAN - -int -scsi_low_deactivate_pisa(dh) - pisa_device_handle_t dh; -{ - struct scsi_low_softc *sc = PISA_DEV_SOFTC(dh); - - if (scsi_low_deactivate(sc) != 0) - return EBUSY; - return 0; -} - -int -scsi_low_activate_pisa(dh) - pisa_device_handle_t dh; -{ - struct scsi_low_softc *sc = PISA_DEV_SOFTC(dh); - slot_device_res_t dr = PISA_RES_DR(dh); - - sc->sl_cfgflags = DVCFG_MKCFG(DVCFG_MAJOR(sc->sl_cfgflags), \ - DVCFG_MINOR(PISA_DR_DVCFG(dr))); - sc->sl_irq = PISA_DR_IRQ(dr); - - if (scsi_low_activate(sc) != 0) - return EBUSY; - - /* rescan the scsi bus */ -#ifdef SCSIBUS_RESCAN - if (scsi_low_is_busy(sc) == 0 && - PISA_RES_EVENT(dh) == PISA_EVENT_INSERT) - scsi_probe_busses((int) sc->sl_si.si_splp->scsipi_scsi.scsibus, - -1, -1); -#endif - return 0; -} - -int -scsi_low_notify_pisa(dh, ev) - pisa_device_handle_t dh; - pisa_event_t ev; -{ - struct scsi_low_softc *sc = PISA_DEV_SOFTC(dh); - - switch(ev) - { - case PISA_EVENT_QUERY_SUSPEND: - if (scsi_low_is_busy(sc) != 0) - return SD_EVENT_STATUS_BUSY; - break; - - default: - break; - } - return 0; -} -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ -#include -#include -#include -#if __FreeBSD_version >= 500001 #include -#endif #include #include -#include +#include #include #include @@ -165,4 +79,3 @@ static moduledata_t scsi_low_moduledata DECLARE_MODULE(scsi_low, scsi_low_moduledata, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_VERSION(scsi_low, 1); MODULE_DEPEND(scsi_low, cam, 1, 1, 1); -#endif /* __FreeBSD__ */ Modified: head/sys/cam/scsi/scsi_low_pisa.h ============================================================================== --- head/sys/cam/scsi/scsi_low_pisa.h Thu Sep 6 18:31:56 2012 (r240171) +++ head/sys/cam/scsi/scsi_low_pisa.h Thu Sep 6 18:53:33 2012 (r240172) @@ -34,14 +34,7 @@ #ifndef _SCSI_LOW_PISA_H_ #define _SCSI_LOW_PISA_H_ -#ifdef __NetBSD__ -int scsi_low_activate_pisa(pisa_device_handle_t); -int scsi_low_deactivate_pisa(pisa_device_handle_t); -int scsi_low_notify_pisa(pisa_device_handle_t, pisa_event_t); -#endif /* __NetBSD__ */ - -#ifdef __FreeBSD__ int scsi_low_activate_pisa(struct scsi_low_softc *, int); int scsi_low_deactivate_pisa(struct scsi_low_softc *); -#endif /* __FreeBSD__ */ + #endif /* !_SCSI_LOW_PISA_H_ */ Modified: head/sys/dev/ct/bshw_machdep.c ============================================================================== --- head/sys/dev/ct/bshw_machdep.c Thu Sep 6 18:31:56 2012 (r240171) +++ head/sys/dev/ct/bshw_machdep.c Thu Sep 6 18:53:33 2012 (r240172) @@ -41,9 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(__FreeBSD__) && __FreeBSD_version > 500001 #include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 19:14:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7D8A106566B; Thu, 6 Sep 2012 19:14:03 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 935158FC12; Thu, 6 Sep 2012 19:14:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86JE35x071081; Thu, 6 Sep 2012 19:14:03 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86JE3cE071079; Thu, 6 Sep 2012 19:14:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209061914.q86JE3cE071079@svn.freebsd.org> From: Joel Dahl Date: Thu, 6 Sep 2012 19:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240173 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 19:14:03 -0000 Author: joel (doc committer) Date: Thu Sep 6 19:14:02 2012 New Revision: 240173 URL: http://svn.freebsd.org/changeset/base/240173 Log: Minor mdoc fix. Modified: head/lib/libpmc/pmc.ivybridge.3 Modified: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridge.3 Thu Sep 6 18:53:33 2012 (r240172) +++ head/lib/libpmc/pmc.ivybridge.3 Thu Sep 6 19:14:02 2012 (r240173) @@ -58,7 +58,6 @@ determined at run time by calling Intel Ivy Bridge PMCs are documented in .Rs .%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual" -Intel(R) 64 and IA-32 Architectures Software Developers Manual" .%T "Volume 3B: System Programming Guide, Part 2" .%N "Order Number: 253669-043US" .%D May 2012 From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 19:24:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1B68106567E; Thu, 6 Sep 2012 19:24:49 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF2C8FC12; Thu, 6 Sep 2012 19:24:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86JOnoP072358; Thu, 6 Sep 2012 19:24:49 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86JOnJd072356; Thu, 6 Sep 2012 19:24:49 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209061924.q86JOnJd072356@svn.freebsd.org> From: Joel Dahl Date: Thu, 6 Sep 2012 19:24: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: r240174 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 19:24:49 -0000 Author: joel (doc committer) Date: Thu Sep 6 19:24:48 2012 New Revision: 240174 URL: http://svn.freebsd.org/changeset/base/240174 Log: Remove trailing whitespace. Modified: head/lib/libpmc/pmc.ivybridge.3 Modified: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridge.3 Thu Sep 6 19:14:02 2012 (r240173) +++ head/lib/libpmc/pmc.ivybridge.3 Thu Sep 6 19:24:48 2012 (r240174) @@ -199,40 +199,40 @@ Ivy Bridge programmable PMCs support the .Bl -tag -width indent .It Li LD_BLOCKS.STORE_FORWARD .Pq Event 03H , Umask 02H -loads blocked by overlapping with store buffer that cannot be forwarded . +loads blocked by overlapping with store buffer that cannot be forwarded . .It Li MISALIGN_MEM_REF.LOADS .Pq Event 05H , Umask 01H -Speculative cache-line split load uops dispatched to L1D. +Speculative cache-line split load uops dispatched to L1D. .It Li MISALIGN_MEM_REF.STORES .Pq Event 05H , Umask 02H -Speculative cache-line split Store- address uops dispatched to L1D. +Speculative cache-line split Store- address uops dispatched to L1D. .It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS .Pq Event 07H , Umask 01H -False dependencies in MOB due to partial compare on address. +False dependencies in MOB due to partial compare on address. .It Li DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK .Pq Event 08H , Umask 81H -Misses in all TLB levels that cause a page walk of any page size from demand loads. +Misses in all TLB levels that cause a page walk of any page size from demand loads. .It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETED .Pq Event 08H , Umask 82H -Misses in all TLB levels that caused page walk completed of any size by demand loads. +Misses in all TLB levels that caused page walk completed of any size by demand loads. .It Li DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATION .Pq Event 08H , Umask 84H -Cycle PMH is busy with a walk due to demand loads. +Cycle PMH is busy with a walk due to demand loads. .It Li UOPS_ISSUED.ANY .Pq Event 0EH , Umask 01H -Increments each cycle the # of Uops issued by the RAT to RS. +Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1to count stalled cycles. -Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core. +Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core. .It Li UOPS_ISSUED.FLAGS_MERGE .Pq Event 0EH , Umask 10H -Number of flags-merge uops allocated. Such uops adds delay. +Number of flags-merge uops allocated. Such uops adds delay. .It Li UOPS_ISSUED.SLOW_LEA .Pq Event 0EH , Umask 20H Number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2 sources + immediate) regardless if as a result of LEA instruction or not. .It Li UOPS_ISSUED.SINGLE_MUL .Pq Event 0EH , Umask 40H -Number of multiply packed/scalar single precision uops allocated. +Number of multiply packed/scalar single precision uops allocated. .It Li ARITH.FPU_DIV_ACTIVE .Pq Event 14H , Umask 01H Cycles that the divider is active, includes INT and FP. Set 'edge =1, @@ -245,31 +245,31 @@ Demand Data Read requests that hit L2 ca Counts any demand and L1 HW prefetch data load requests to L2. .It Li L2_RQSTS.RFO_HITS .Pq Event 24H , Umask 04H -Counts the number of store RFO requests that hit the L2 cache. +Counts the number of store RFO requests that hit the L2 cache. .It Li L2_RQSTS.RFO_MISS .Pq Event 24H , Umask 08H -Counts the number of store RFO requests that miss the L2 cache. +Counts the number of store RFO requests that miss the L2 cache. .It Li L2_RQSTS.ALL_RFO .Pq Event 24H , Umask 0CH -Counts all L2 store RFO requests. +Counts all L2 store RFO requests. .It Li L2_RQSTS.CODE_RD_HIT .Pq Event 24H , Umask 10H -Number of instruction fetches that hit the L2 cache. +Number of instruction fetches that hit the L2 cache. .It Li L2_RQSTS.CODE_RD_MISS .Pq Event 24H , Umask 20H -Number of instruction fetches that missed the L2 cache. +Number of instruction fetches that missed the L2 cache. .It Li L2_RQSTS.ALL_CODE_RD .Pq Event 24H , Umask 30H -Counts all L2 code requests. +Counts all L2 code requests. .It Li L2_RQSTS.PF_HIT .Pq Event 24H , Umask 40H -Counts all L2 HW prefetcher requests that hit L2. +Counts all L2 HW prefetcher requests that hit L2. .It Li L2_RQSTS.PF_MISS .Pq Event 24H , Umask 80H -Counts all L2 HW prefetcher requests that missed L2. +Counts all L2 HW prefetcher requests that missed L2. .It Li L2_RQSTS.ALL_PF .Pq Event 24H , Umask C0H -Counts all L2 HW prefetcher requests. +Counts all L2 HW prefetcher requests. .It Li L2_STORE_LOCK_RQSTS.MISS .Pq Event 27H , Umask 01H RFOs that miss cache lines. @@ -307,13 +307,13 @@ core frequency may change from time to t throttling. .It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK .Pq Event 3CH , Umask 01H -Increments at the frequency of XCLK (100 MHz) when not halted. +Increments at the frequency of XCLK (100 MHz) when not halted. .It Li L1D_PEND_MISS.PENDING .Pq Event 48H , Umask 01H Increments the number of outstanding L1D misses every cycle. Set Cmaks = 1 and Edge =1 to count occurrences. Counter 2 only. -Set Cmask = 1 to count cycles. +Set Cmask = 1 to count cycles. .It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK .Pq Event 49H , Umask 01H Miss in all TLB levels causes an page walk of any page size (4K/2M/4M/1G). @@ -339,16 +339,16 @@ Non-SW-prefetch load dispatches that hit Counts the number of lines brought into the L1 data cache. .It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED .Pq Event 58H , Umask 01H -Number of integer Move Elimination candidate uops that were not eliminated. +Number of integer Move Elimination candidate uops that were not eliminated. .It Li MOVE_ELIMINATION.SIMD_NOT_ELIMINATED .Pq Event 58H , Umask 02H -Number of SIMD Move Elimination candidate uops that were not eliminated. +Number of SIMD Move Elimination candidate uops that were not eliminated. .It Li MOVE_ELIMINATION.INT_ELIMINATED .Pq Event 58H , Umask 04H -Number of integer Move Elimination candidate uops that were eliminated. +Number of integer Move Elimination candidate uops that were eliminated. .It Li MOVE_ELIMINATION.SIMD_ELIMINATED .Pq Event 58H , Umask 08H -Number of SIMD Move Elimination candidate uops that were eliminated. +Number of SIMD Move Elimination candidate uops that were eliminated. .It Li CPL_CYCLES.RING0 .Pq Event 5CH , Umask 01H Unhalted core cycles when the thread is in ring 0. @@ -389,14 +389,14 @@ Cycles in which the L1D is locked. Counts cycles the IDQ is empty. .It Li IDQ.MITE_UOPS .Pq Event 79H , Umask 04H -Increment each cycle # of uops delivered to IDQ from MITE path. +Increment each cycle # of uops delivered to IDQ from MITE path. Can combine Umask 04H and 20H. -Set Cmask = 1 to count cycles. +Set Cmask = 1 to count cycles. .It Li IDQ.DSB_UOPS .Pq Event 79H , Umask 08H -Increment each cycle. # of uops delivered to IDQ from DSB path. -Can combine Umask 08H and 10H -Set Cmask = 1 to count cycles. +Increment each cycle. # of uops delivered to IDQ from DSB path. +Can combine Umask 08H and 10H +Set Cmask = 1 to count cycles. .It Li IDQ.MS_DSB_UOPS .Pq Event 79H , Umask 10H Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set @@ -466,7 +466,7 @@ returns. Must combine with umask 80H. .It Li BR_INST_EXEC.RETURN_NEAR .Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return mnemonic. +Qualify indirect near branches that have a return mnemonic. Must combine with umask 80H. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL .Pq Event 88H , Umask 10H @@ -544,7 +544,7 @@ Cycles which a store address uop is disp Cycles which a Uop is dispatched on port 2. .It Li UOPS_DISPATCHED_PORT.PORT_3_LD .Pq Event A1H , Umask 10H -Cycles which a load uop is dispatched on port 3. +Cycles which a load uop is dispatched on port 3. .It Li UOPS_DISPATCHED_PORT.PORT_3_STA .Pq Event A1H , Umask 20H Cycles which a store address uop is dispatched on port 3. @@ -621,7 +621,7 @@ DTLB flush attempts of the thread- speci Count number of STLB flush attempts. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H -Number of instructions at retirement. +Number of instructions at retirement. .It Li INST_RETIRED.ALL .Pq Event C0H , Umask 01H Precise instruction retired event with HW to reduce effect of PEBS shadow in @@ -630,7 +630,7 @@ PMC1 only. Must quiesce other PMCs. .It Li OTHER_ASSISTS.AVX_STORE .Pq Event C1H , Umask 08H -Number of assists associated with 256-bit AVX store operations. +Number of assists associated with 256-bit AVX store operations. .It Li OTHER_ASSISTS.AVX_TO_SSE .Pq Event C1H , Umask 10H Number of transitions from AVX- 256 to legacy SSE when penalty applicable. @@ -725,7 +725,7 @@ Specify threshold in MSR 0x3F6. .It Li MEM_TRANS_RETIRED.PRECISE_STORE .Pq Event CDH , Umask 02H Sample stores and collect precise store operation via PEBS record. -PMC3 only. +PMC3 only. .It Li MEM_UOP_RETIRED.LOADS .Pq Event D0H , Umask 01H Qualify retired memory uops that are loads. Combine with umask 10H, 20H, @@ -798,47 +798,47 @@ RFO requests that access L2 cache. L2 cache accesses when fetching instructions. .It Li L2_TRANS.ALL_PF .Pq Event F0H , Umask 08H -Any MLC or LLC HW prefetch accessing L2, including rejects. +Any MLC or LLC HW prefetch accessing L2, including rejects. .It Li L2_TRANS.L1D_WB .Pq Event F0H , Umask 10H -L1D writebacks that access L2 cache. +L1D writebacks that access L2 cache. .It Li L2_TRANS.L2_FILL .Pq Event F0H , Umask 20H -L2 fill requests that access L2 cache. +L2 fill requests that access L2 cache. .It Li L2_TRANS.L2_WB .Pq Event F0H , Umask 40H -L2 writebacks that access L2 cache. +L2 writebacks that access L2 cache. .It Li L2_TRANS.ALL_REQUESTS .Pq Event F0H , Umask 80H -Transactions accessing L2 pipe. +Transactions accessing L2 pipe. .It Li L2_LINES_IN.I .Pq Event F1H , Umask 01H -L2 cache lines in I state filling L2. -Counting does not cover rejects. +L2 cache lines in I state filling L2. +Counting does not cover rejects. .It Li L2_LINES_IN.S .Pq Event F1H , Umask 02H -L2 cache lines in S state filling L2. -Counting does not cover rejects. +L2 cache lines in S state filling L2. +Counting does not cover rejects. .It Li L2_LINES_IN.E .Pq Event F1H , Umask 04H -L2 cache lines in E state filling L2. -Counting does not cover rejects. +L2 cache lines in E state filling L2. +Counting does not cover rejects. .It Li L2_LINES_IN.ALL .Pq Event F1H , Umask 07H -L2 cache lines filling L2. -Counting does not cover rejects. +L2 cache lines filling L2. +Counting does not cover rejects. .It Li L2_LINES_OUT.DEMAND_CLEAN .Pq Event F2H , Umask 01H -Clean L2 cache lines evicted by demand. +Clean L2 cache lines evicted by demand. .It Li L2_LINES_OUT.DEMAND_DIRTY .Pq Event F2H , Umask 02H -Dirty L2 cache lines evicted by demand. +Dirty L2 cache lines evicted by demand. .It Li L2_LINES_OUT.PF_CLEAN .Pq Event F2H , Umask 04H -Clean L2 cache lines evicted by the MLC prefetcher. +Clean L2 cache lines evicted by the MLC prefetcher. .It Li L2_LINES_OUT.PF_DIRTY .Pq Event F2H , Umask 08H -Dirty L2 cache lines evicted by the MLC prefetcher. +Dirty L2 cache lines evicted by the MLC prefetcher. .El .Sh SEE ALSO .Xr pmc 3 , From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 19:26:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4C4410656A5; Thu, 6 Sep 2012 19:26:59 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0DB98FC1B; Thu, 6 Sep 2012 19:26:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86JQx2q072633; Thu, 6 Sep 2012 19:26:59 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86JQxid072631; Thu, 6 Sep 2012 19:26:59 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209061926.q86JQxid072631@svn.freebsd.org> From: Joel Dahl Date: Thu, 6 Sep 2012 19:26: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: r240175 - head/cddl/usr.sbin/plockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 19:26:59 -0000 Author: joel (doc committer) Date: Thu Sep 6 19:26:59 2012 New Revision: 240175 URL: http://svn.freebsd.org/changeset/base/240175 Log: Remove trailing whitespace. Modified: head/cddl/usr.sbin/plockstat/plockstat.1 Modified: head/cddl/usr.sbin/plockstat/plockstat.1 ============================================================================== --- head/cddl/usr.sbin/plockstat/plockstat.1 Thu Sep 6 19:24:48 2012 (r240174) +++ head/cddl/usr.sbin/plockstat/plockstat.1 Thu Sep 6 19:26:59 2012 (r240175) @@ -49,7 +49,7 @@ .Op Fl s Ar depth .Op Fl e Ar secs .Op Fl x Ar opt Ns = Ns Ar val -.Fl p Ar pid +.Fl p Ar pid .Sh DESCRIPTION The .Nm From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 19:58:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29B9D1065677; Thu, 6 Sep 2012 19:58:44 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (stark.strangled.net [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id BB9C28FC0A; Thu, 6 Sep 2012 19:58:43 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:6c92:3a9f:f4ca:fb77] (unknown [IPv6:2601:9:4d00:85:6c92:3a9f:f4ca:fb77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 44FDC3981E; Thu, 6 Sep 2012 12:58:43 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Rui Paulo In-Reply-To: <20120906094238.GF85904@gpr.nnz-home.ru> Date: Thu, 6 Sep 2012 12:58:42 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <00E6EB72-A6D5-4611-819F-ACEF6135BAFF@FreeBSD.org> References: <201209060319.q863JnDe050504@svn.freebsd.org> <20120906094238.GF85904@gpr.nnz-home.ru> To: Gennady Proskurin X-Mailer: Apple Mail (2.1486) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240156 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 19:58:44 -0000 On 6 Sep 2012, at 02:42, Gennady Proskurin wrote: > On Thu, Sep 06, 2012 at 03:19:49AM +0000, Rui Paulo wrote: >> Author: rpaulo >> Date: Thu Sep 6 03:19:48 2012 >> New Revision: 240156 >> URL: http://svn.freebsd.org/changeset/base/240156 >>=20 >> Log: >> Add support for demangling C++ symbols. This requires linking = libproc with >> libc++rt/libsupc++. >>=20 >> Discussed with: theraven >>=20 >> Modified: >> head/lib/libproc/Makefile >> head/lib/libproc/proc_sym.c >>=20 >> Modified: head/lib/libproc/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libproc/Makefile Thu Sep 6 02:07:58 2012 = (r240155) >> +++ head/lib/libproc/Makefile Thu Sep 6 03:19:48 2012 = (r240156) >> @@ -1,5 +1,7 @@ >> # $FreeBSD$ >>=20 >> +.include >> + >> LIB=3D proc >>=20 >> SRCS=3D proc_bkpt.c \ >> @@ -13,6 +15,14 @@ INCS=3D libproc.h >>=20 >> CFLAGS+=3D -I${.CURDIR} >>=20 >> +.if ${MK_LIBCPLUSPLUS} !=3D "no" >> +LDADD+=3D -lcxxrt >> +DPADD+=3D ${LIBCXXRT} >> +.else >> +LDADD+=3D -lsupc++ >> +DPADD+=3D ${LIBSTDCPLUSPLUS} >> +.endif >> + >> SHLIB_MAJOR=3D 2 >>=20 >> WITHOUT_MAN=3D >>=20 >> Modified: head/lib/libproc/proc_sym.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libproc/proc_sym.c Thu Sep 6 02:07:58 2012 = (r240155) >> +++ head/lib/libproc/proc_sym.c Thu Sep 6 03:19:48 2012 = (r240156) >> @@ -46,6 +46,8 @@ >>=20 >> #include "_libproc.h" >>=20 >> +extern char *__cxa_demangle(const char *, char *, size_t *, int *); >> + >> static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); >>=20 >> static void >> @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin >> if (addr >=3D rsym && addr <=3D (rsym + sym.st_size)) { >> s =3D elf_strptr(e, dynsymstridx, sym.st_name); >> if (s) { >> - strlcpy(name, s, namesz); >> + if (strlen(s) > 2 &&=20 >> + s[0] =3D=3D '_' && s[1] =3D=3D 'Z') > checking "strlen(s) > 2" is useless and not optimal here, you can omit = it completely > checking s[0] and s[1] is enough, it implies that length is >=3D2 > you may add something like "s[2] !=3D 0" if length should be strictly = >2 It's not really useless but can be considered non-optimal, yes. That = said, the C++ demangler we're calling doesn't really care about being = fast :-)=20 Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 20:03:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E17491065670; Thu, 6 Sep 2012 20:03:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (stark.strangled.net [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id C697C8FC1A; Thu, 6 Sep 2012 20:03:07 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:6c92:3a9f:f4ca:fb77] (unknown [IPv6:2601:9:4d00:85:6c92:3a9f:f4ca:fb77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id F0D7139827; Thu, 6 Sep 2012 13:03:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Rui Paulo In-Reply-To: <20120906121513.GG1361@mole.fafoe.narf.at> Date: Thu, 6 Sep 2012 13:03:00 -0700 Content-Transfer-Encoding: 7bit Message-Id: <4C602B3A-9A6E-450C-B135-DE9A459D9053@FreeBSD.org> References: <201209060319.q863JnDe050504@svn.freebsd.org> <20120906121513.GG1361@mole.fafoe.narf.at> To: Stefan Farfeleder X-Mailer: Apple Mail (2.1486) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240156 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 20:03:08 -0000 On 6 Sep 2012, at 05:15, Stefan Farfeleder wrote: > On Thu, Sep 06, 2012 at 03:19:49AM +0000, Rui Paulo wrote: >> @@ -266,7 +268,11 @@ proc_addr2sym(struct proc_handle *p, uin >> if (addr >= rsym && addr <= (rsym + sym.st_size)) { >> s = elf_strptr(e, dynsymstridx, sym.st_name); >> if (s) { >> - strlcpy(name, s, namesz); >> + if (strlen(s) > 2 && >> + s[0] == '_' && s[1] == 'Z') >> + __cxa_demangle(s, name, &namesz, NULL); >> + else >> + strlcpy(name, s, namesz); >> memcpy(symcopy, &sym, sizeof(sym)); >> /* >> * DTrace expects the st_value to contain > > According to the documentation, __cxa_demangle will realloc the buffer > if it is too small and return the new buffer. This case is not handled > correctly. You're right. In fact this happens all the time with libcxxrt. Thanks, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 20:15:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC399106566C; Thu, 6 Sep 2012 20:15:44 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4BB98FC12; Thu, 6 Sep 2012 20:15:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86KFiwF078386; Thu, 6 Sep 2012 20:15:44 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86KFiHV078384; Thu, 6 Sep 2012 20:15:44 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <201209062015.q86KFiHV078384@svn.freebsd.org> From: Tom Rhodes Date: Thu, 6 Sep 2012 20:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240176 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 20:15:44 -0000 Author: trhodes Date: Thu Sep 6 20:15:44 2012 New Revision: 240176 URL: http://svn.freebsd.org/changeset/base/240176 Log: Avoid segfault if name is invalid. Basically, only check for CTL_USER if the sysctl fails with ENOENT. PR: 169056 Reviewed by: jhb Modified: head/lib/libc/gen/sysctl.c Modified: head/lib/libc/gen/sysctl.c ============================================================================== --- head/lib/libc/gen/sysctl.c Thu Sep 6 19:26:59 2012 (r240175) +++ head/lib/libc/gen/sysctl.c Thu Sep 6 20:15:44 2012 (r240176) @@ -50,8 +50,11 @@ int sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen) { - if (name[0] != CTL_USER) - return (__sysctl(name, namelen, oldp, oldlenp, newp, newlen)); + int retval; + + retval = __sysctl(name, namelen, oldp, oldlenp, newp, newlen); + if (retval != -1 || errno != ENOENT || name[0] != CTL_USER) + return (retval); if (newp != NULL) { errno = EPERM; From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 20:17:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C59A1065678; Thu, 6 Sep 2012 20:17:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666798FC0C; Thu, 6 Sep 2012 20:17:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86KH07q078648; Thu, 6 Sep 2012 20:17:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86KH0OW078644; Thu, 6 Sep 2012 20:17:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209062017.q86KH0OW078644@svn.freebsd.org> From: John Baldwin Date: Thu, 6 Sep 2012 20:17: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: r240177 - in head/sys: arm/arm mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 20:17:00 -0000 Author: jhb Date: Thu Sep 6 20:16:59 2012 New Revision: 240177 URL: http://svn.freebsd.org/changeset/base/240177 Log: Dynamically allocate the S/G lists passed to callback routines rather than allocating them on the stack of various bus_dmamap_load*() functions. The S/G lists are stored in the DMA tags. This matches the implementation on all other platforms. Discussed with: scottl, gibbs Tested by: stas (arm@) Modified: head/sys/arm/arm/busdma_machdep.c head/sys/mips/mips/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Thu Sep 6 20:15:44 2012 (r240176) +++ head/sys/arm/arm/busdma_machdep.c Thu Sep 6 20:16:59 2012 (r240177) @@ -81,6 +81,7 @@ struct bus_dma_tag { int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; + bus_dma_segment_t *segments; /* * DMA range for this tag. If the page doesn't fall within * one of these ranges, an error is returned. The caller @@ -374,6 +375,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } + newtag->segments = NULL; + /* * Take into account any restrictions imposed by our parent tag */ @@ -447,7 +450,6 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) #endif if (dmat != NULL) { - if (dmat->map_count != 0) return (EBUSY); @@ -457,6 +459,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { + if (dmat->segments != NULL) + free(dmat->segments, M_DEVBUF); free(dmat, M_DEVBUF); /* * Last reference count, so @@ -484,6 +488,17 @@ bus_dmamap_create(bus_dma_tag_t dmat, in bus_dmamap_t newmap; int error = 0; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) { + CTR3(KTR_BUSDMA, "%s: tag %p error %d", + __func__, dmat, ENOMEM); + return (ENOMEM); + } + } + newmap = _busdma_alloc_dmamap(); if (newmap == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); @@ -585,6 +600,16 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi mflags = M_NOWAIT; else mflags = M_WAITOK; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + mflags); + if (dmat->segments == NULL) { + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, ENOMEM); + return (ENOMEM); + } + } if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; @@ -883,11 +908,6 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ { vm_offset_t lastaddr = 0; int error, nsegs = -1; -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif KASSERT(dmat != NULL, ("dmatag is NULL")); KASSERT(map != NULL, ("dmamap is NULL")); @@ -898,14 +918,14 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ map->buffer = buf; map->len = buflen; error = bus_dmamap_load_buffer(dmat, - dm_segments, map, buf, buflen, kernel_pmap, + dmat->segments, map, buf, buflen, kernel_pmap, flags, &lastaddr, &nsegs); if (error == EINPROGRESS) return (error); if (error) (*callback)(callback_arg, NULL, 0, error); else - (*callback)(callback_arg, dm_segments, nsegs + 1, error); + (*callback)(callback_arg, dmat->segments, nsegs + 1, error); CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", __func__, dmat, dmat->flags, nsegs + 1, error); @@ -921,11 +941,6 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_callback2_t *callback, void *callback_arg, int flags) { -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs = -1, error = 0; M_ASSERTPKTHDR(m0); @@ -941,7 +956,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { error = bus_dmamap_load_buffer(dmat, - dm_segments, map, m->m_data, m->m_len, + dmat->segments, map, m->m_data, m->m_len, pmap_kernel(), flags, &lastaddr, &nsegs); map->len += m->m_len; } @@ -954,9 +969,9 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, /* * force "no valid mappings" on error in callback. */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, nsegs + 1, + (*callback)(callback_arg, dmat->segments, nsegs + 1, m0->m_pkthdr.len, error); } CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", @@ -1012,11 +1027,6 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, int flags) { vm_offset_t lastaddr = 0; -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, i, error; bus_size_t resid; struct iovec *iov; @@ -1048,8 +1058,8 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, caddr_t addr = (caddr_t) iov[i].iov_base; if (minlen > 0) { - error = bus_dmamap_load_buffer(dmat, dm_segments, map, - addr, minlen, pmap, flags, &lastaddr, &nsegs); + error = bus_dmamap_load_buffer(dmat, dmat->segments, + map, addr, minlen, pmap, flags, &lastaddr, &nsegs); map->len += minlen; resid -= minlen; @@ -1060,9 +1070,9 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, /* * force "no valid mappings" on error in callback. */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, nsegs+1, + (*callback)(callback_arg, dmat->segments, nsegs+1, uio->uio_resid, error); } Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Thu Sep 6 20:15:44 2012 (r240176) +++ head/sys/mips/mips/busdma_machdep.c Thu Sep 6 20:16:59 2012 (r240177) @@ -80,6 +80,7 @@ struct bus_dma_tag { int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; + bus_dma_segment_t *segments; struct bounce_zone *bounce_zone; }; @@ -352,6 +353,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } + newtag->segments = NULL; + /* * Take into account any restrictions imposed by our parent tag */ @@ -434,6 +437,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { + if (dmat->segments != NULL) + free(dmat->segments, M_DEVBUF); free(dmat, M_DEVBUF); /* * Last reference count, so @@ -442,7 +447,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) */ dmat = parent; } else - dmat = NULL; + dmat = NULL; } } CTR2(KTR_BUSDMA, "%s tag %p", __func__, dmat_copy); @@ -461,6 +466,17 @@ bus_dmamap_create(bus_dma_tag_t dmat, in bus_dmamap_t newmap; int error = 0; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + M_NOWAIT); + if (dmat->segments == NULL) { + CTR3(KTR_BUSDMA, "%s: tag %p error %d", + __func__, dmat, ENOMEM); + return (ENOMEM); + } + } + newmap = _busdma_alloc_dmamap(); if (newmap == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); @@ -563,6 +579,16 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi mflags = M_NOWAIT; else mflags = M_WAITOK; + if (dmat->segments == NULL) { + dmat->segments = (bus_dma_segment_t *)malloc( + sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + mflags); + if (dmat->segments == NULL) { + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, ENOMEM); + return (ENOMEM); + } + } if (flags & BUS_DMA_ZERO) mflags |= M_ZERO; @@ -824,11 +850,6 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ { vm_offset_t lastaddr = 0; int error, nsegs = -1; -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif KASSERT(dmat != NULL, ("dmatag is NULL")); KASSERT(map != NULL, ("dmamap is NULL")); @@ -839,14 +860,14 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_ map->buffer = buf; map->len = buflen; error = bus_dmamap_load_buffer(dmat, - dm_segments, map, buf, buflen, kernel_pmap, + dmat->segments, map, buf, buflen, kernel_pmap, flags, &lastaddr, &nsegs); if (error == EINPROGRESS) return (error); if (error) (*callback)(callback_arg, NULL, 0, error); else - (*callback)(callback_arg, dm_segments, nsegs + 1, error); + (*callback)(callback_arg, dmat->segments, nsegs + 1, error); CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", __func__, dmat, dmat->flags, nsegs + 1, error); @@ -862,11 +883,6 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_callback2_t *callback, void *callback_arg, int flags) { -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs = -1, error = 0; M_ASSERTPKTHDR(m0); @@ -882,7 +898,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { error = bus_dmamap_load_buffer(dmat, - dm_segments, map, m->m_data, m->m_len, + dmat->segments, map, m->m_data, m->m_len, kernel_pmap, flags, &lastaddr, &nsegs); map->len += m->m_len; } @@ -895,9 +911,9 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, /* * force "no valid mappings" on error in callback. */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, nsegs + 1, + (*callback)(callback_arg, dmat->segments, nsegs + 1, m0->m_pkthdr.len, error); } CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d", @@ -953,11 +969,6 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, int flags) { vm_offset_t lastaddr = 0; -#ifdef __CC_SUPPORTS_DYNAMIC_ARRAY_INIT - bus_dma_segment_t dm_segments[dmat->nsegments]; -#else - bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS]; -#endif int nsegs, i, error; bus_size_t resid; struct iovec *iov; @@ -990,8 +1001,8 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, caddr_t addr = (caddr_t) iov[i].iov_base; if (minlen > 0) { - error = bus_dmamap_load_buffer(dmat, dm_segments, map, - addr, minlen, pmap, flags, &lastaddr, &nsegs); + error = bus_dmamap_load_buffer(dmat, dmat->segments, + map, addr, minlen, pmap, flags, &lastaddr, &nsegs); map->len += minlen; resid -= minlen; @@ -1002,9 +1013,9 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, /* * force "no valid mappings" on error in callback. */ - (*callback)(callback_arg, dm_segments, 0, 0, error); + (*callback)(callback_arg, dmat->segments, 0, 0, error); } else { - (*callback)(callback_arg, dm_segments, nsegs+1, + (*callback)(callback_arg, dmat->segments, nsegs+1, uio->uio_resid, error); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 20:59:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD4651065755; Thu, 6 Sep 2012 20:59:49 +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 C75F88FC16; Thu, 6 Sep 2012 20:59:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q86KxnUH083750; Thu, 6 Sep 2012 20:59:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q86KxnNd083737; Thu, 6 Sep 2012 20:59:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209062059.q86KxnNd083737@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 6 Sep 2012 20:59: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: r240178 - in head/lib/libc/amd64: . gen 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: Thu, 06 Sep 2012 20:59:50 -0000 Author: jilles Date: Thu Sep 6 20:59:49 2012 New Revision: 240178 URL: http://svn.freebsd.org/changeset/base/240178 Log: libc/amd64: Do not export .cerror. For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden. Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump to it directly now, as in non-PIC mode. There are also some minor size optimizations to instructions but they yield virtually no benefit in the size of libc.so.7 due to padding. Reviewed by: kib Modified: head/lib/libc/amd64/SYS.h head/lib/libc/amd64/Symbol.map head/lib/libc/amd64/gen/rfork_thread.S head/lib/libc/amd64/sys/brk.S head/lib/libc/amd64/sys/exect.S head/lib/libc/amd64/sys/getcontext.S head/lib/libc/amd64/sys/pipe.S head/lib/libc/amd64/sys/ptrace.S head/lib/libc/amd64/sys/reboot.S head/lib/libc/amd64/sys/sbrk.S head/lib/libc/amd64/sys/setlogin.S head/lib/libc/amd64/sys/vfork.S Modified: head/lib/libc/amd64/SYS.h ============================================================================== --- head/lib/libc/amd64/SYS.h Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/SYS.h Thu Sep 6 20:59:49 2012 (r240178) @@ -36,38 +36,20 @@ #include #include -#ifdef PIC #define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(x); \ .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + mov __CONCAT($SYS_,x),%eax; KERNCALL; \ + jb HIDENAME(cerror); ret; \ END(__CONCAT(__sys_,x)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret ; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + mov __CONCAT($SYS_,x),%eax; KERNCALL; \ + jb HIDENAME(cerror); ret; \ END(__CONCAT(__sys_,x)) -#else -#define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(x); \ - .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror); \ - END(__CONCAT(__sys_,x)) - -#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror); \ - END(__CONCAT(__sys_,x)) -#endif #define KERNCALL movq %rcx, %r10; syscall Modified: head/lib/libc/amd64/Symbol.map ============================================================================== --- head/lib/libc/amd64/Symbol.map Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/Symbol.map Thu Sep 6 20:59:49 2012 (r240178) @@ -66,7 +66,6 @@ FBSDprivate_1.0 { .curbrk; .minbrk; _brk; - .cerror; _end; __sys_vfork; _vfork; Modified: head/lib/libc/amd64/gen/rfork_thread.S ============================================================================== --- head/lib/libc/amd64/gen/rfork_thread.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/gen/rfork_thread.S Thu Sep 6 20:59:49 2012 (r240178) @@ -93,12 +93,7 @@ ENTRY(rfork_thread) 2: popq %r12 popq %rbx -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)), %rdx - jmp *%rdx -#else jmp HIDENAME(cerror) -#endif END(rfork_thread) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/brk.S ============================================================================== --- head/lib/libc/amd64/sys/brk.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/brk.S Thu Sep 6 20:59:49 2012 (r240178) @@ -76,12 +76,7 @@ ok: ret err: addq $8, %rsp -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else jmp HIDENAME(cerror) -#endif END(brk) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/exect.S ============================================================================== --- head/lib/libc/amd64/sys/exect.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/exect.S Thu Sep 6 20:59:49 2012 (r240178) @@ -47,12 +47,7 @@ ENTRY(exect) pushq %r8 popfq KERNCALL -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else jmp HIDENAME(cerror) -#endif END(exect) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/getcontext.S ============================================================================== --- head/lib/libc/amd64/sys/getcontext.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/getcontext.S Thu Sep 6 20:59:49 2012 (r240178) @@ -42,16 +42,9 @@ ENTRY(__sys_getcontext) movq (%rsp),%rsi /* save getcontext return address */ mov $SYS_getcontext,%rax KERNCALL - jb 1f + jb HIDENAME(cerror) addq $8,%rsp /* remove stale (setcontext) return address */ jmp *%rsi /* restore return address */ -1: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(__sys_getcontext) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/pipe.S ============================================================================== --- head/lib/libc/amd64/sys/pipe.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/pipe.S Thu Sep 6 20:59:49 2012 (r240178) @@ -45,18 +45,11 @@ __FBSDID("$FreeBSD$"); ENTRY(__sys_pipe) mov $SYS_pipe,%rax KERNCALL - jb 1f + jb HIDENAME(cerror) movl %eax,(%rdi) /* %rdi is preserved by syscall */ movl %edx,4(%rdi) movq $0,%rax ret -1: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(__sys_pipe) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/ptrace.S ============================================================================== --- head/lib/libc/amd64/sys/ptrace.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/ptrace.S Thu Sep 6 20:59:49 2012 (r240178) @@ -48,15 +48,8 @@ ENTRY(ptrace) #endif mov $SYS_ptrace,%eax KERNCALL - jb err + jb HIDENAME(cerror) ret -err: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(ptrace) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/reboot.S ============================================================================== --- head/lib/libc/amd64/sys/reboot.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/reboot.S Thu Sep 6 20:59:49 2012 (r240178) @@ -45,15 +45,8 @@ __FBSDID("$FreeBSD$"); ENTRY(__sys_reboot) mov $SYS_reboot,%rax KERNCALL - jb 1f + jb HIDENAME(cerror) iretq -1: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(__sys_reboot) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/sbrk.S ============================================================================== --- head/lib/libc/amd64/sys/sbrk.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/sbrk.S Thu Sep 6 20:59:49 2012 (r240178) @@ -79,12 +79,7 @@ back: ret err: addq $8, %rsp -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else jmp HIDENAME(cerror) -#endif END(sbrk) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/setlogin.S ============================================================================== --- head/lib/libc/amd64/sys/setlogin.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/setlogin.S Thu Sep 6 20:59:49 2012 (r240178) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); ENTRY(__sys_setlogin) mov $SYS_setlogin,%rax KERNCALL - jb 1f + jb HIDENAME(cerror) #ifdef PIC movq PIC_GOT(CNAME(_logname_valid)),%rdx movl $0,(%rdx) @@ -55,13 +55,6 @@ ENTRY(__sys_setlogin) movl $0,CNAME(_logname_valid)(%rip) #endif ret /* setlogin(name) */ -1: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(__sys_setlogin) .section .note.GNU-stack,"",%progbits Modified: head/lib/libc/amd64/sys/vfork.S ============================================================================== --- head/lib/libc/amd64/sys/vfork.S Thu Sep 6 20:16:59 2012 (r240177) +++ head/lib/libc/amd64/sys/vfork.S Thu Sep 6 20:59:49 2012 (r240178) @@ -50,12 +50,7 @@ ENTRY(__sys_vfork) jmp *%rsi 1: pushq %rsi -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else jmp HIDENAME(cerror) -#endif END(__sys_vfork) .section .note.GNU-stack,"",%progbits From owner-svn-src-all@FreeBSD.ORG Thu Sep 6 21:50:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F12771065673 for ; Thu, 6 Sep 2012 21:50:26 +0000 (UTC) (envelope-from jos@catnook.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8D28FC12 for ; Thu, 6 Sep 2012 21:50:25 +0000 (UTC) Received: by eaak11 with SMTP id k11so799843eaa.13 for ; Thu, 06 Sep 2012 14:50:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=oXKWPh7/gBcUIEbTa1oLYJHgxLIPVueMLYzwEEesQKo=; b=CjmUHxApcCkmqxImNBQv2u1nIQU/ib0rdzUXzSLa6fQC8LXKDDHuQp4wvLthLptbXY BxUnsbXfczDLLtEx+bLM4OAUUhZUp0Sk5JFZUJKH48nLeOwi7x0tNVTGLxkwh97+bcL/ adMHuIDPijiL2xeECjuq+j1WFZtikycbRHdClOl1R2fk3ZMipqOEA9vvJy8UGoa2T4y0 wVQRlobgi3SwwxH3LeJ5THWhr8J1T0dI/aItWaCQti4iwz5rtUOVw+R7UGWGBjd8E2AJ vKS3WdGexmkU55OJRDQQStmlRGiuxpO/qPlGoxQL5J7uS6Eggp4IU0mSHe1YNgp9hL44 44jw== MIME-Version: 1.0 Received: by 10.14.218.134 with SMTP id k6mr5218536eep.14.1346968224813; Thu, 06 Sep 2012 14:50:24 -0700 (PDT) Received: by 10.14.174.72 with HTTP; Thu, 6 Sep 2012 14:50:24 -0700 (PDT) In-Reply-To: <201209061459.q86Exr56038506@svn.freebsd.org> References: <201209061459.q86Exr56038506@svn.freebsd.org> Date: Thu, 6 Sep 2012 14:50:24 -0700 Message-ID: From: Jos Backus To: Josh Paetzel X-Gm-Message-State: ALoCoQnlU6xMaZumAZ/7acPgyXdEvsEx626y8namEf4ELjoljkqqjV1O+g/bpqg/0ma676lfIJjt Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240165 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 06 Sep 2012 21:50:27 -0000 On Thu, Sep 6, 2012 at 7:59 AM, Josh Paetzel wrote: > Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh > > ============================================================================== > --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Sep 6 > 13:54:01 2012 (r240164) > +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Sep 6 > 14:59:53 2012 (r240165) > ... > FOUNDPARTS="1" > + USEDAUTOSIZE=0 > > # Lets read in the config file now and setup our partitions > if [ "${_pType}" = "gpt" ] ; then > @@ -245,7 +278,15 @@ setup_gpart_partitions() > > if [ "$SIZE" = "0" ] > then > - SOUT="" > + if [ $USEDAUTOSIZE -eq 1 ] ; then > Style question: if $USEDAUTOSIZE is treated as a boolean value, why not use `true' and `false' instead of `1' and `0'? No need to make shell code look like C code. That way one can write: if $USEDAUTOSIZE; then Jos -- Jos Backus jos at catnook.com From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 00:20:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE3F41065676; Fri, 7 Sep 2012 00:20:46 +0000 (UTC) (envelope-from mckay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF9758FC22; Fri, 7 Sep 2012 00:20:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q870Kkwg007989; Fri, 7 Sep 2012 00:20:46 GMT (envelope-from mckay@svn.freebsd.org) Received: (from mckay@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q870KkoD007985; Fri, 7 Sep 2012 00:20:46 GMT (envelope-from mckay@svn.freebsd.org) Message-Id: <201209070020.q870KkoD007985@svn.freebsd.org> From: Stephen McKay Date: Fri, 7 Sep 2012 00:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240179 - in releng/9.1: contrib/file lib/libmagic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 00:20:47 -0000 Author: mckay Date: Fri Sep 7 00:20:46 2012 New Revision: 240179 URL: http://svn.freebsd.org/changeset/base/240179 Log: MFS r240157 (MFC r235638,r239348): - Work around failure to compile on FreeBSD 7.x machines. - Correct a regression introduced during the import of file(1) 5.11. PR: 170415 Reviewed by: obrien Approved by: re (kib) Modified: releng/9.1/contrib/file/apprentice.c releng/9.1/lib/libmagic/Makefile releng/9.1/lib/libmagic/config.h Directory Properties: releng/9.1/ (props changed) releng/9.1/contrib/file/ (props changed) releng/9.1/lib/ (props changed) Modified: releng/9.1/contrib/file/apprentice.c ============================================================================== --- releng/9.1/contrib/file/apprentice.c Thu Sep 6 20:59:49 2012 (r240178) +++ releng/9.1/contrib/file/apprentice.c Fri Sep 7 00:20:46 2012 (r240179) @@ -648,7 +648,6 @@ set_test_type(struct magic *mstart, stru break; case FILE_REGEX: case FILE_SEARCH: -#ifndef COMPILE_ONLY /* Check for override */ if (mstart->str_flags & STRING_BINTEST) mstart->flag |= BINTEST; @@ -664,7 +663,6 @@ set_test_type(struct magic *mstart, stru mstart->flag |= BINTEST; else mstart->flag |= TEXTTEST; -#endif break; case FILE_DEFAULT: /* can't deduce anything; we shouldn't see this at the Modified: releng/9.1/lib/libmagic/Makefile ============================================================================== --- releng/9.1/lib/libmagic/Makefile Thu Sep 6 20:59:49 2012 (r240178) +++ releng/9.1/lib/libmagic/Makefile Fri Sep 7 00:20:46 2012 (r240179) @@ -40,8 +40,9 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic -mkmagic: apprentice.c funcs.c magic.c print.c - ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} +mkmagic: apprentice.c encoding.c funcs.c getline.c magic.c print.c + ${CC} ${CFLAGS} -DCOMPILE_ONLY -DHOSTPROG ${LDFLAGS} \ + -o ${.TARGET} ${.ALLSRC} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: releng/9.1/lib/libmagic/config.h ============================================================================== --- releng/9.1/lib/libmagic/config.h Thu Sep 6 20:59:49 2012 (r240178) +++ releng/9.1/lib/libmagic/config.h Fri Sep 7 00:20:46 2012 (r240179) @@ -39,7 +39,9 @@ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `getline' function. */ +#ifndef HOSTPROG #define HAVE_GETLINE 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 00:24:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3150106566B; Fri, 7 Sep 2012 00:24: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 95AF68FC08; Fri, 7 Sep 2012 00:24:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q870ORlL008442; Fri, 7 Sep 2012 00:24:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q870ORgZ008440; Fri, 7 Sep 2012 00:24:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209070024.q870ORgZ008440@svn.freebsd.org> From: Adrian Chadd Date: Fri, 7 Sep 2012 00:24: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: r240180 - 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, 07 Sep 2012 00:24:27 -0000 Author: adrian Date: Fri Sep 7 00:24:27 2012 New Revision: 240180 URL: http://svn.freebsd.org/changeset/base/240180 Log: Ensure that single-frame aggregate session frames are retransmitted with the correct configuration. Occasionally an aggregate TX would fail and the first frame would be retransmitted as a non-AMPDU frame. Since bfs_aggr=1 and bfs_nframes > 1 (from the previous AMPDU attempt), the aggr completion function would be called and be very confused about what's going on. Noticed by: Kim PR: kern/171394 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Sep 7 00:20:46 2012 (r240179) +++ head/sys/dev/ath/if_ath_tx.c Fri Sep 7 00:24:27 2012 (r240180) @@ -2528,6 +2528,25 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s return; } + /* + * This is a temporary check and should be removed once + * all the relevant code paths have been fixed. + * + * During aggregate retries, it's possible that the head + * frame will fail (which has the bfs_aggr and bfs_nframes + * fields set for said aggregate) and will be retried as + * a single frame. In this instance, the values should + * be reset or the completion code will get upset with you. + */ + if (bf->bf_state.bfs_aggr != 0 || bf->bf_state.bfs_nframes > 1) { + device_printf(sc->sc_dev, "%s: bfs_aggr=%d, bfs_nframes=%d\n", + __func__, + bf->bf_state.bfs_aggr, + bf->bf_state.bfs_nframes); + bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_nframes = 1; + } + /* Direct dispatch to hardware */ ath_tx_do_ratelookup(sc, bf); ath_tx_calc_duration(sc, bf); @@ -2624,6 +2643,16 @@ ath_tx_swq(struct ath_softc *sc, struct if (txq->axq_depth < sc->sc_hwq_limit) { bf = TAILQ_FIRST(&atid->axq_q); ATH_TXQ_REMOVE(atid, bf, bf_list); + + /* + * Ensure it's definitely treated as a non-AMPDU + * frame - this information may have been left + * over from a previous attempt. + */ + bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_nframes = 1; + + /* Queue to the hardware */ ath_tx_xmit_aggr(sc, an, txq, bf); DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: xmit_aggr\n", @@ -4018,7 +4047,23 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft "%s: non-baw packet\n", __func__); ATH_TXQ_REMOVE(tid, bf, bf_list); + + if (bf->bf_state.bfs_nframes > 1) + device_printf(sc->sc_dev, + "%s: aggr=%d, nframes=%d\n", + __func__, + bf->bf_state.bfs_aggr, + bf->bf_state.bfs_nframes); + + /* + * This shouldn't happen - such frames shouldn't + * ever have been queued as an aggregate in the + * first place. However, make sure the fields + * are correctly setup just to be totally sure. + */ bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_nframes = 1; + ath_tx_do_ratelookup(sc, bf); ath_tx_calc_duration(sc, bf); ath_tx_calc_protection(sc, bf); From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 01:33:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07EAC106564A; Fri, 7 Sep 2012 01:33:26 +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 E77628FC12; Fri, 7 Sep 2012 01:33:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q871XPGD016299; Fri, 7 Sep 2012 01:33:25 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q871XPS8016297; Fri, 7 Sep 2012 01:33:25 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209070133.q871XPS8016297@svn.freebsd.org> From: Alan Cox Date: Fri, 7 Sep 2012 01:33: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: r240181 - head/sys/arm/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: Fri, 07 Sep 2012 01:33:26 -0000 Author: alc Date: Fri Sep 7 01:33:25 2012 New Revision: 240181 URL: http://svn.freebsd.org/changeset/base/240181 Log: Eliminate an unused macro. Modified: head/sys/arm/include/pmap.h Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Fri Sep 7 00:24:27 2012 (r240180) +++ head/sys/arm/include/pmap.h Fri Sep 7 01:33:25 2012 (r240181) @@ -124,13 +124,6 @@ struct md_page { TAILQ_HEAD(,pv_entry) pv_list; }; -#define VM_MDPAGE_INIT(pg) \ -do { \ - TAILQ_INIT(&pg->pv_list); \ - mtx_init(&(pg)->md_page.pvh_mtx, "MDPAGE Mutex", NULL, MTX_DEV);\ - (pg)->mdpage.pvh_attrs = 0; \ -} while (/*CONSTCOND*/0) - struct l1_ttable; struct l2_dtable; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 02:38:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34531065672; Fri, 7 Sep 2012 02:38:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A2E98FC16; Fri, 7 Sep 2012 02:38:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q872c7K0023676; Fri, 7 Sep 2012 02:38:07 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q872c7E6023674; Fri, 7 Sep 2012 02:38:07 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209070238.q872c7E6023674@svn.freebsd.org> From: Rui Paulo Date: Fri, 7 Sep 2012 02:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240182 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 02:38:08 -0000 Author: rpaulo Date: Fri Sep 7 02:38:07 2012 New Revision: 240182 URL: http://svn.freebsd.org/changeset/base/240182 Log: When calling the C++ demangler, make sure to free the returned buffer, which might have been reallocated. Pointed out by: stefanf Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Fri Sep 7 01:33:25 2012 (r240181) +++ head/lib/libproc/proc_sym.c Fri Sep 7 02:38:07 2012 (r240182) @@ -51,6 +51,26 @@ extern char *__cxa_demangle(const char * static void proc_rdl2prmap(rd_loadobj_t *, prmap_t *); static void +demangle(const char *symbol, char *buf, size_t len) +{ + char *dembuf; + size_t demlen = len; + + dembuf = malloc(len); + if (!dembuf) + goto fail; + dembuf = __cxa_demangle(symbol, dembuf, &demlen, NULL); + if (!dembuf) + goto fail; + strlcpy(buf, dembuf, len); + free(dembuf); + + return; +fail: + strlcpy(buf, symbol, len); +} + +static void proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map) { map->pr_vaddr = rdl->rdl_saddr; @@ -268,9 +288,8 @@ proc_addr2sym(struct proc_handle *p, uin if (addr >= rsym && addr <= (rsym + sym.st_size)) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { - if (strlen(s) > 2 && - s[0] == '_' && s[1] == 'Z') - __cxa_demangle(s, name, &namesz, NULL); + if (s[0] == '_' && s[1] == 'Z' && s[2]) + demangle(s, name, namesz); else strlcpy(name, s, namesz); memcpy(symcopy, &sym, sizeof(sym)); @@ -308,9 +327,8 @@ symtab: if (addr >= rsym && addr <= (rsym + sym.st_size)) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { - if (strlen(s) > 2 && - s[0] == '_' && s[1] == 'Z') - __cxa_demangle(s, name, &namesz, NULL); + if (s[0] == '_' && s[1] == 'Z' && s[2]) + demangle(s, name, namesz); else strlcpy(name, s, namesz); memcpy(symcopy, &sym, sizeof(sym)); From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 06:02:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34EF7106564A; Fri, 7 Sep 2012 06:02:02 +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 2053C8FC08; Fri, 7 Sep 2012 06:02:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87621te048850; Fri, 7 Sep 2012 06:02:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87621nj048848; Fri, 7 Sep 2012 06:02:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209070602.q87621nj048848@svn.freebsd.org> From: Adrian Chadd Date: Fri, 7 Sep 2012 06:02: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: r240183 - head/tools/tools/ath/athratestats X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 06:02:02 -0000 Author: adrian Date: Fri Sep 7 06:02:01 2012 New Revision: 240183 URL: http://svn.freebsd.org/changeset/base/240183 Log: Make this build again! Modified: head/tools/tools/ath/athratestats/Makefile Modified: head/tools/tools/ath/athratestats/Makefile ============================================================================== --- head/tools/tools/ath/athratestats/Makefile Fri Sep 7 02:38:07 2012 (r240182) +++ head/tools/tools/ath/athratestats/Makefile Fri Sep 7 06:02:01 2012 (r240183) @@ -7,7 +7,7 @@ PROG= athratestats SRCS= main.c opt_ah.h ah_osdep.h -CLEANFILES+= opt_ah.h +CLEANFILES+= opt_ah.h ah_osdep.h .include <../Makefile.inc> @@ -23,5 +23,6 @@ ah_osdep.h: echo 'typedef void *HAL_SOFTC;' >ah_osdep.h echo 'typedef int HAL_BUS_TAG;' >>ah_osdep.h echo 'typedef void *HAL_BUS_HANDLE;' >>ah_osdep.h + echo 'typedef uint32_t *HAL_DMA_ADDR;' >>ah_osdep.h .include From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 06:02:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F72106564A; Fri, 7 Sep 2012 06:02:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73B018FC08; Fri, 7 Sep 2012 06:02:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8762fDD048957; Fri, 7 Sep 2012 06:02:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8762fTE048955; Fri, 7 Sep 2012 06:02:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209070602.q8762fTE048955@svn.freebsd.org> From: Adrian Chadd Date: Fri, 7 Sep 2012 06:02: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: r240184 - head/tools/tools/ath/athratestats X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 06:02:41 -0000 Author: adrian Date: Fri Sep 7 06:02:40 2012 New Revision: 240184 URL: http://svn.freebsd.org/changeset/base/240184 Log: Tidy up the output quite substantially, making it fit well within 80 columns. This makes it much easier to use in a shell script, to display a "top" style output with live rate control data. Modified: head/tools/tools/ath/athratestats/main.c Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Fri Sep 7 06:02:01 2012 (r240183) +++ head/tools/tools/ath/athratestats/main.c Fri Sep 7 06:02:40 2012 (r240184) @@ -123,21 +123,21 @@ ath_sample_stats(struct ath_ratestats *r sn->packets_since_sample[y], sn->sample_tt[y]); } + printf(" TX Rate TXTOTAL:TXOK EWMA T/ F" + " avg last xmit\n"); for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) { if ((mask & 1) == 0) continue; for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { if (sn->stats[y][rix].total_packets == 0) continue; - printf("[%2u %s:%4u] %8ju:%-8ju (%3d%%) " - "(EWMA %3d.%1d%%) T %8ju F %4d avg %5u last %u\n", + printf("[%2u %s:%4u] %8ju:%-8ju " + "(%3d.%1d%%) %8ju/%4d %5ums %u\n", dot11rate(rt, rix), dot11str(rt, rix), bin_to_size(y), (uintmax_t) sn->stats[y][rix].total_packets, (uintmax_t) sn->stats[y][rix].packets_acked, - (int) ((sn->stats[y][rix].packets_acked * 100ULL) / - sn->stats[y][rix].total_packets), sn->stats[y][rix].ewma_pct / 10, sn->stats[y][rix].ewma_pct % 10, (uintmax_t) sn->stats[y][rix].tries, From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 06:12:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22037106566B; Fri, 7 Sep 2012 06:12: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 0DF6B8FC0A; Fri, 7 Sep 2012 06:12:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q876CStl050104; Fri, 7 Sep 2012 06:12:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q876CSSD050102; Fri, 7 Sep 2012 06:12:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209070612.q876CSSD050102@svn.freebsd.org> From: Alan Cox Date: Fri, 7 Sep 2012 06:12: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: r240185 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 06:12:29 -0000 Author: alc Date: Fri Sep 7 06:12:28 2012 New Revision: 240185 URL: http://svn.freebsd.org/changeset/base/240185 Log: Eliminate unnecessary NULL checks. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Sep 7 06:02:40 2012 (r240184) +++ head/sys/mips/mips/pmap.c Fri Sep 7 06:12:28 2012 (r240185) @@ -359,7 +359,7 @@ pmap_pde(pmap_t pmap, vm_offset_t va) pd_entry_t *pdpe; pdpe = pmap_segmap(pmap, va); - if (pdpe == NULL || *pdpe == NULL) + if (*pdpe == NULL) return (NULL); return (pmap_pdpe_to_pde(pdpe, va)); @@ -1914,7 +1914,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv va_next = eva; pde = pmap_pdpe_to_pde(pdpe, sva); - if (pde == NULL || *pde == NULL) + if (*pde == NULL) continue; if (va_next > eva) va_next = eva; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 08:18:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABC94106564A; Fri, 7 Sep 2012 08:18:06 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 972D68FC16; Fri, 7 Sep 2012 08:18:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q878I6dw065548; Fri, 7 Sep 2012 08:18:06 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q878I6aJ065546; Fri, 7 Sep 2012 08:18:06 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209070818.q878I6aJ065546@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 7 Sep 2012 08:18: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: r240190 - head/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 08:18:06 -0000 Author: gavin Date: Fri Sep 7 08:18:06 2012 New Revision: 240190 URL: http://svn.freebsd.org/changeset/base/240190 Log: Prevent indent(1) from reformatting this comment, as it contains a formatting-sensitive table. Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Fri Sep 7 07:28:10 2012 (r240189) +++ head/sys/sparc64/include/vmparam.h Fri Sep 7 08:18:06 2012 (r240190) @@ -126,7 +126,7 @@ #define VM_LEVEL_0_ORDER 9 #endif -/* +/** * Address space layout. * * UltraSPARC I and II implement a 44 bit virtual address space. The address From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 08:58:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F231106564A; Fri, 7 Sep 2012 08:58:31 +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 88BAE8FC0A; Fri, 7 Sep 2012 08:58:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q878wVVc070293; Fri, 7 Sep 2012 08:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q878wVf2070291; Fri, 7 Sep 2012 08:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209070858.q878wVf2070291@svn.freebsd.org> From: Kevin Lo Date: Fri, 7 Sep 2012 08:58: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: r240191 - head/contrib/bsnmp/snmpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 08:58:31 -0000 Author: kevlo Date: Fri Sep 7 08:58:30 2012 New Revision: 240191 URL: http://svn.freebsd.org/changeset/base/240191 Log: Fully initialize the stack-allocated "struct sockaddr_in sa" structure. Modified: head/contrib/bsnmp/snmpd/trap.c Modified: head/contrib/bsnmp/snmpd/trap.c ============================================================================== --- head/contrib/bsnmp/snmpd/trap.c Fri Sep 7 08:18:06 2012 (r240190) +++ head/contrib/bsnmp/snmpd/trap.c Fri Sep 7 08:58:30 2012 (r240191) @@ -117,7 +117,7 @@ trapsink_create(struct trapsink_dep *tde return (SNMP_ERR_RES_UNAVAIL); } (void)shutdown(t->socket, SHUT_RD); - + memset(&sa, 0, sizeof(sa)); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl((t->index.subs[0] << 24) | @@ -725,6 +725,7 @@ target_activate_address(struct target_ad } (void)shutdown(addrs->socket, SHUT_RD); + memset(&sa, 0, sizeof(sa)); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 09:00:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEAE21065673; Fri, 7 Sep 2012 09:00:25 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA29E8FC18; Fri, 7 Sep 2012 09:00:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8790PCl070565; Fri, 7 Sep 2012 09:00:25 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8790PLG070563; Fri, 7 Sep 2012 09:00:25 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209070900.q8790PLG070563@svn.freebsd.org> From: Kevin Lo Date: Fri, 7 Sep 2012 09:00: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: r240192 - head/bin/cat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 09:00:25 -0000 Author: kevlo Date: Fri Sep 7 09:00:25 2012 New Revision: 240192 URL: http://svn.freebsd.org/changeset/base/240192 Log: Use "e.g.", not "i.e.", to introduce an example. Obtained from: NetBSD Modified: head/bin/cat/cat.1 Modified: head/bin/cat/cat.1 ============================================================================== --- head/bin/cat/cat.1 Fri Sep 7 08:58:30 2012 (r240191) +++ head/bin/cat/cat.1 Fri Sep 7 09:00:25 2012 (r240192) @@ -127,7 +127,7 @@ to the file truncating .Pa file3 if it already exists. -See the manual page for your shell (i.e., +See the manual page for your shell (e.g., .Xr sh 1 ) for more information on redirection. .Pp From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 09:22:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AA911065678; Fri, 7 Sep 2012 09:22:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D099C8FC18; Fri, 7 Sep 2012 09:22:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q879MBMN073300; Fri, 7 Sep 2012 09:22:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q879MB8l073297; Fri, 7 Sep 2012 09:22:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201209070922.q879MB8l073297@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 7 Sep 2012 09:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240193 - releng/9.1/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 09:22:12 -0000 Author: bz Date: Fri Sep 7 09:22:11 2012 New Revision: 240193 URL: http://svn.freebsd.org/changeset/base/240193 Log: MFC r238877-238878: Fix a comment that we do not have an SA yet but need to acquire one. For consistency put the IPsec comment iside the #fidef section. MFC r238934 Improve the should-never-hit printf to ease debugging in case we'd ever hit it again when doing the delayed IPv6 checksum calculations. Approved by: re (kib) Modified: releng/9.1/sys/netinet6/ip6_ipsec.c releng/9.1/sys/netinet6/ip6_output.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/netinet6/ip6_ipsec.c ============================================================================== --- releng/9.1/sys/netinet6/ip6_ipsec.c Fri Sep 7 09:00:25 2012 (r240192) +++ releng/9.1/sys/netinet6/ip6_ipsec.c Fri Sep 7 09:22:11 2012 (r240193) @@ -263,7 +263,7 @@ ip6_ipsec_output(struct mbuf **m, struct mtag->m_tag_id != PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED) continue; /* - * Check if policy has an SA associated with it. + * Check if policy has no SA associated with it. * This can happen when an SP has yet to acquire * an SA; e.g. on first reference. If it occurs, * then we let ipsec4_process_packet do its thing. Modified: releng/9.1/sys/netinet6/ip6_output.c ============================================================================== --- releng/9.1/sys/netinet6/ip6_output.c Fri Sep 7 09:00:25 2012 (r240192) +++ releng/9.1/sys/netinet6/ip6_output.c Fri Sep 7 09:22:11 2012 (r240193) @@ -195,8 +195,9 @@ in6_delayed_cksum(struct mbuf *m, uint32 offset += m->m_pkthdr.csum_data; /* checksum offset */ if (offset + sizeof(u_short) > m->m_len) { - printf("%s: delayed m_pullup, m->len: %d off: %d\n", - __func__, m->m_len, offset); + printf("%s: delayed m_pullup, m->len: %d plen %u off %u " + "csum_flags=0x%04x\n", __func__, m->m_len, plen, offset, + m->m_pkthdr.csum_flags); /* * XXX this should not happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate @@ -292,11 +293,11 @@ ip6_output(struct mbuf *m0, struct ip6_p MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); } +#ifdef IPSEC /* * IPSec checking which handles several cases. * FAST IPSEC: We re-injected the packet. */ -#ifdef IPSEC switch(ip6_ipsec_output(&m, inp, &flags, &error, &ifp, &sp)) { case 1: /* Bad packet */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 09:45:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ADBF106564A; Fri, 7 Sep 2012 09:45:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13CB08FC12; Fri, 7 Sep 2012 09:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q879j8TC076082; Fri, 7 Sep 2012 09:45:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q879j8EY076079; Fri, 7 Sep 2012 09:45:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201209070945.q879j8EY076079@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 7 Sep 2012 09:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240194 - releng/9.1/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 09:45:09 -0000 Author: bz Date: Fri Sep 7 09:45:08 2012 New Revision: 240194 URL: http://svn.freebsd.org/changeset/base/240194 Log: MFC r238935,238960: Properly apply #ifdef INET and leave a comment that we are (will) apply delayed IPv6 checksum processing in ip6_output.c when doing IPsec. In case of IPsec he have to do delayed checksum calculations before adding any extension header, or rather before calling into IPsec processing as we may send the packet and not return to IPv6 output processing here. PR: kern/170116 Approved by: re (kib) Modified: releng/9.1/sys/netinet6/ip6_ipsec.c releng/9.1/sys/netinet6/ip6_output.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/netinet6/ip6_ipsec.c ============================================================================== --- releng/9.1/sys/netinet6/ip6_ipsec.c Fri Sep 7 09:22:11 2012 (r240193) +++ releng/9.1/sys/netinet6/ip6_ipsec.c Fri Sep 7 09:45:08 2012 (r240194) @@ -291,16 +291,16 @@ ip6_ipsec_output(struct mbuf **m, struct /* * Do delayed checksums now because we send before * this is done in the normal processing path. - * XXX-BZ CSUM_DELAY_DATA_IPV6? + * For IPv6 we do delayed checksums in ip6_output.c. */ +#ifdef INET if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { ipseclog((LOG_DEBUG, "%s: we do not support IPv4 over IPv6", __func__)); -#ifdef INET in_delayed_cksum(*m); -#endif (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } +#endif /* * Preserve KAME behaviour: ENOENT can be returned Modified: releng/9.1/sys/netinet6/ip6_output.c ============================================================================== --- releng/9.1/sys/netinet6/ip6_output.c Fri Sep 7 09:22:11 2012 (r240193) +++ releng/9.1/sys/netinet6/ip6_output.c Fri Sep 7 09:45:08 2012 (r240194) @@ -304,6 +304,20 @@ ip6_output(struct mbuf *m0, struct ip6_p goto freehdrs; case -1: /* Do IPSec */ needipsec = 1; + /* + * Do delayed checksums now, as we may send before returning. + */ + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + plen = m->m_pkthdr.len - sizeof(*ip6); + in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif case 0: /* No IPSec */ default: break; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 10:11:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC0741065670; Fri, 7 Sep 2012 10:11: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 D74638FC0C; Fri, 7 Sep 2012 10:11:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87ABSg4079538; Fri, 7 Sep 2012 10:11:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87ABS7K079536; Fri, 7 Sep 2012 10:11:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209071011.q87ABS7K079536@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 Sep 2012 10:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240195 - stable/9/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 10:11:29 -0000 Author: kib Date: Fri Sep 7 10:11:28 2012 New Revision: 240195 URL: http://svn.freebsd.org/changeset/base/240195 Log: MFC r239039: The header uma_int.h is internal uma header, unused by this source file. Do not include it needlessly. Modified: stable/9/sys/fs/nfs/nfs_commonport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonport.c ============================================================================== --- stable/9/sys/fs/nfs/nfs_commonport.c Fri Sep 7 09:45:08 2012 (r240194) +++ stable/9/sys/fs/nfs/nfs_commonport.c Fri Sep 7 10:11:28 2012 (r240195) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include extern int nfscl_ticks; extern int nfsrv_nfsuserd; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 13:17:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1D261065674; Fri, 7 Sep 2012 13:17:19 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 831168FC0A; Fri, 7 Sep 2012 13:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87DHJRg005470; Fri, 7 Sep 2012 13:17:19 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87DHJ93005468; Fri, 7 Sep 2012 13:17:19 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201209071317.q87DHJ93005468@svn.freebsd.org> From: Rick Macklem Date: Fri, 7 Sep 2012 13:17: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: r240197 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 13:17:19 -0000 Author: rmacklem Date: Fri Sep 7 13:17:18 2012 New Revision: 240197 URL: http://svn.freebsd.org/changeset/base/240197 Log: MFC: r237200 Move the nfsrpc_close() call in ncl_reclaim() for the NFSv4 client to below the vnode_destroy_vobject() call, since that is where writes are flushed. Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/compat/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) stable/8/sys/dev/virtio/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clnode.c Fri Sep 7 11:11:56 2012 (r240196) +++ stable/8/sys/fs/nfsclient/nfs_clnode.c Fri Sep 7 13:17:18 2012 (r240197) @@ -254,15 +254,6 @@ ncl_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (NFS_ISV4(vp) && vp->v_type == VREG) - /* - * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4 - * Close operations are delayed until ncl_inactive(). - * However, since VOP_INACTIVE() is not guaranteed to be - * called, we need to do it again here. - */ - (void) nfsrpc_close(vp, 1, ap->a_td); - /* * If the NLM is running, give it a chance to abort pending * locks. @@ -275,6 +266,15 @@ ncl_reclaim(struct vop_reclaim_args *ap) */ vnode_destroy_vobject(vp); + if (NFS_ISV4(vp) && vp->v_type == VREG) + /* + * We can now safely close any remaining NFSv4 Opens for + * this file. Most opens will have already been closed by + * ncl_inactive(), but there are cases where it is not + * called, so we need to do it again here. + */ + (void) nfsrpc_close(vp, 1, ap->a_td); + vfs_hash_remove(vp); /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 13:36:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD045106566B; Fri, 7 Sep 2012 13:36:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D89E8FC14; Fri, 7 Sep 2012 13:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87Dahfi008115; Fri, 7 Sep 2012 13:36:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87Dahu1008109; Fri, 7 Sep 2012 13:36:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209071336.q87Dahu1008109@svn.freebsd.org> From: Michael Tuexen Date: Fri, 7 Sep 2012 13:36: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: r240198 - 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: Fri, 07 Sep 2012 13:36:43 -0000 Author: tuexen Date: Fri Sep 7 13:36:42 2012 New Revision: 240198 URL: http://svn.freebsd.org/changeset/base/240198 Log: Don't include a structure containing a flexible array in another structure. MFC after: 10 days Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Fri Sep 7 13:17:18 2012 (r240197) +++ head/sys/netinet/sctp_header.h Fri Sep 7 13:36:42 2012 (r240198) @@ -510,16 +510,6 @@ struct sctp_stream_reset_add_strm { * streams then the request will need to be an overlay structure. */ -struct sctp_stream_reset_out_req { - struct sctp_chunkhdr ch; - struct sctp_stream_reset_out_request sr_req; -} SCTP_PACKED; - -struct sctp_stream_reset_in_req { - struct sctp_chunkhdr ch; - struct sctp_stream_reset_in_request sr_req; -} SCTP_PACKED; - struct sctp_stream_reset_tsn_req { struct sctp_chunkhdr ch; struct sctp_stream_reset_tsn_request sr_req; Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Sep 7 13:17:18 2012 (r240197) +++ head/sys/netinet/sctp_indata.c Fri Sep 7 13:36:42 2012 (r240198) @@ -2113,7 +2113,7 @@ finish_express_del: */ struct sctp_queued_to_read *ctl, *nctl; - sctp_reset_in_stream(stcb, liste->number_entries, liste->req.list_of_streams); + sctp_reset_in_stream(stcb, liste->number_entries, liste->list_of_streams); TAILQ_REMOVE(&asoc->resetHead, liste, next_resp); SCTP_FREE(liste, SCTP_M_STRESET); /* sa_ignore FREED_MEMORY */ Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Sep 7 13:17:18 2012 (r240197) +++ head/sys/netinet/sctp_input.c Fri Sep 7 13:36:42 2012 (r240198) @@ -3455,9 +3455,9 @@ process_chunk_drop(struct sctp_tcb *stcb } void -sctp_reset_in_stream(struct sctp_tcb *stcb, int number_entries, uint16_t * list) +sctp_reset_in_stream(struct sctp_tcb *stcb, uint32_t number_entries, uint16_t * list) { - int i; + uint32_t i; uint16_t temp; /* @@ -3511,7 +3511,7 @@ struct sctp_stream_reset_out_request * sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk) { struct sctp_association *asoc; - struct sctp_stream_reset_out_req *req; + struct sctp_chunkhdr *ch; struct sctp_stream_reset_out_request *r; struct sctp_tmit_chunk *chk; int len, clen; @@ -3534,8 +3534,8 @@ sctp_find_stream_reset(struct sctp_tcb * *bchk = chk; } clen = chk->send_size; - req = mtod(chk->data, struct sctp_stream_reset_out_req *); - r = &req->sr_req; + ch = mtod(chk->data, struct sctp_chunkhdr *); + r = (struct sctp_stream_reset_out_request *)(ch + 1); if (ntohl(r->request_seq) == seq) { /* found it */ return (r); @@ -3888,8 +3888,7 @@ sctp_handle_str_reset_request_out(struct } liste->tsn = tsn; liste->number_entries = number_entries; - memcpy(&liste->req, req, - (sizeof(struct sctp_stream_reset_out_request) + (number_entries * sizeof(uint16_t)))); + memcpy(&liste->list_of_streams, req->list_of_streams, number_entries * sizeof(uint16_t)); TAILQ_INSERT_TAIL(&asoc->resetHead, liste, next_resp); asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; } @@ -4059,7 +4058,7 @@ __attribute__((noinline)) #endif static int sctp_handle_stream_reset(struct sctp_tcb *stcb, struct mbuf *m, int offset, - struct sctp_stream_reset_out_req *sr_req) + struct sctp_chunkhdr *ch_req) { int chk_length, param_len, ptype; struct sctp_paramhdr pstore; @@ -4074,7 +4073,7 @@ __attribute__((noinline)) int num_param = 0; /* now it may be a reset or a reset-response */ - chk_length = ntohs(sr_req->ch.chunk_length); + chk_length = ntohs(ch_req->chunk_length); /* setup for adding the response */ sctp_alloc_a_chunk(stcb, chk); @@ -5413,7 +5412,7 @@ process_control_chunks: */ stcb->asoc.peer_supports_strreset = 1; } - if (sctp_handle_stream_reset(stcb, m, *offset, (struct sctp_stream_reset_out_req *)ch)) { + if (sctp_handle_stream_reset(stcb, m, *offset, ch)) { /* stop processing */ *offset = length; return (NULL); Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Fri Sep 7 13:17:18 2012 (r240197) +++ head/sys/netinet/sctp_input.h Fri Sep 7 13:36:42 2012 (r240198) @@ -53,7 +53,7 @@ sctp_find_stream_reset(struct sctp_tcb * struct sctp_tmit_chunk **bchk); void -sctp_reset_in_stream(struct sctp_tcb *stcb, int number_entries, +sctp_reset_in_stream(struct sctp_tcb *stcb, uint32_t number_entries, uint16_t * list); Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Fri Sep 7 13:17:18 2012 (r240197) +++ head/sys/netinet/sctp_structs.h Fri Sep 7 13:36:42 2012 (r240198) @@ -77,8 +77,8 @@ TAILQ_HEAD(sctpnetlisthead, sctp_nets); struct sctp_stream_reset_list { TAILQ_ENTRY(sctp_stream_reset_list) next_resp; uint32_t tsn; - int number_entries; - struct sctp_stream_reset_out_request req; + uint32_t number_entries; + uint16_t list_of_streams[]; }; TAILQ_HEAD(sctp_resethead, sctp_stream_reset_list); From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 14:04:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 998F41065670; Fri, 7 Sep 2012 14:04:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69CBC8FC0A; Fri, 7 Sep 2012 14:04:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87E41R3011558; Fri, 7 Sep 2012 14:04:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87E41wI011553; Fri, 7 Sep 2012 14:04:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209071404.q87E41wI011553@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Sep 2012 14:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240199 - in stable/9/sys/dev: ahci ata 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: Fri, 07 Sep 2012 14:04:01 -0000 Author: mav Date: Fri Sep 7 14:04:00 2012 New Revision: 240199 URL: http://svn.freebsd.org/changeset/base/240199 Log: MFC r239907: Add IDs for JMicron JMB360/JMB362 AHCI SATA controllers. Modified: stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-pci.h stable/9/sys/dev/ata/chipsets/ata-jmicron.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Fri Sep 7 13:36:42 2012 (r240198) +++ stable/9/sys/dev/ahci/ahci.c Fri Sep 7 14:04:00 2012 (r240199) @@ -181,7 +181,9 @@ static struct { {0x1e0e8086, 0x00, "Intel Panther Point", 0}, {0x1e0f8086, 0x00, "Intel Panther Point", 0}, {0x23238086, 0x00, "Intel DH89xxCC", 0}, + {0x2360197b, 0x00, "JMicron JMB360", 0}, {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, + {0x2362197b, 0x00, "JMicron JMB362", 0}, {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, Modified: stable/9/sys/dev/ata/ata-pci.h ============================================================================== --- stable/9/sys/dev/ata/ata-pci.h Fri Sep 7 13:36:42 2012 (r240198) +++ stable/9/sys/dev/ata/ata-pci.h Fri Sep 7 14:04:00 2012 (r240199) @@ -266,6 +266,7 @@ struct ata_pci_controller { #define ATA_JMICRON_ID 0x197b #define ATA_JMB360 0x2360197b #define ATA_JMB361 0x2361197b +#define ATA_JMB362 0x2362197b #define ATA_JMB363 0x2363197b #define ATA_JMB365 0x2365197b #define ATA_JMB366 0x2366197b Modified: stable/9/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-jmicron.c Fri Sep 7 13:36:42 2012 (r240198) +++ stable/9/sys/dev/ata/chipsets/ata-jmicron.c Fri Sep 7 14:04:00 2012 (r240199) @@ -67,6 +67,7 @@ ata_jmicron_probe(device_t dev) static const struct ata_chip_id const ids[] = {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" }, { ATA_JMB361, 0, 1, 1, ATA_UDMA6, "JMB361" }, + { ATA_JMB362, 0, 2, 0, ATA_SA300, "JMB362" }, { ATA_JMB363, 0, 2, 1, ATA_UDMA6, "JMB363" }, { ATA_JMB365, 0, 1, 2, ATA_UDMA6, "JMB365" }, { ATA_JMB366, 0, 2, 2, ATA_UDMA6, "JMB366" }, From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 14:05:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F6771065672; Fri, 7 Sep 2012 14:05:09 +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 E788E8FC0C; Fri, 7 Sep 2012 14:05:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87E58f2011755; Fri, 7 Sep 2012 14:05:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87E58eO011751; Fri, 7 Sep 2012 14:05:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209071405.q87E58eO011751@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Sep 2012 14:05: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: r240200 - in stable/8/sys/dev: ahci ata 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: Fri, 07 Sep 2012 14:05:09 -0000 Author: mav Date: Fri Sep 7 14:05:08 2012 New Revision: 240200 URL: http://svn.freebsd.org/changeset/base/240200 Log: MFC r239907: Add IDs for JMicron JMB360/JMB362 AHCI SATA controllers. Modified: stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ata/ata-pci.h stable/8/sys/dev/ata/chipsets/ata-jmicron.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Fri Sep 7 14:04:00 2012 (r240199) +++ stable/8/sys/dev/ahci/ahci.c Fri Sep 7 14:05:08 2012 (r240200) @@ -181,7 +181,9 @@ static struct { {0x1e0e8086, 0x00, "Intel Panther Point", 0}, {0x1e0f8086, 0x00, "Intel Panther Point", 0}, {0x23238086, 0x00, "Intel DH89xxCC", 0}, + {0x2360197b, 0x00, "JMicron JMB360", 0}, {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, + {0x2362197b, 0x00, "JMicron JMB362", 0}, {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, Modified: stable/8/sys/dev/ata/ata-pci.h ============================================================================== --- stable/8/sys/dev/ata/ata-pci.h Fri Sep 7 14:04:00 2012 (r240199) +++ stable/8/sys/dev/ata/ata-pci.h Fri Sep 7 14:05:08 2012 (r240200) @@ -266,6 +266,7 @@ struct ata_pci_controller { #define ATA_JMICRON_ID 0x197b #define ATA_JMB360 0x2360197b #define ATA_JMB361 0x2361197b +#define ATA_JMB362 0x2362197b #define ATA_JMB363 0x2363197b #define ATA_JMB365 0x2365197b #define ATA_JMB366 0x2366197b Modified: stable/8/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-jmicron.c Fri Sep 7 14:04:00 2012 (r240199) +++ stable/8/sys/dev/ata/chipsets/ata-jmicron.c Fri Sep 7 14:05:08 2012 (r240200) @@ -67,6 +67,7 @@ ata_jmicron_probe(device_t dev) static const struct ata_chip_id const ids[] = {{ ATA_JMB360, 0, 1, 0, ATA_SA300, "JMB360" }, { ATA_JMB361, 0, 1, 1, ATA_UDMA6, "JMB361" }, + { ATA_JMB362, 0, 2, 0, ATA_SA300, "JMB362" }, { ATA_JMB363, 0, 2, 1, ATA_UDMA6, "JMB363" }, { ATA_JMB365, 0, 1, 2, ATA_UDMA6, "JMB365" }, { ATA_JMB366, 0, 2, 2, ATA_UDMA6, "JMB366" }, From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 14:07:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52BFB1065674; Fri, 7 Sep 2012 14:07:14 +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 22E5E8FC15; Fri, 7 Sep 2012 14:07:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87E7DoG012090; Fri, 7 Sep 2012 14:07:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87E7Dkx012087; Fri, 7 Sep 2012 14:07:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209071407.q87E7Dkx012087@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Sep 2012 14:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240201 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 14:07:14 -0000 Author: mav Date: Fri Sep 7 14:07:13 2012 New Revision: 240201 URL: http://svn.freebsd.org/changeset/base/240201 Log: MFC r239908: Add bunch of ATI HDMI HDA controller IDs. Modified: stable/9/sys/dev/sound/pci/hda/hdac.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.c Fri Sep 7 14:05:08 2012 (r240200) +++ stable/9/sys/dev/sound/pci/hda/hdac.c Fri Sep 7 14:07:13 2012 (r240201) @@ -138,6 +138,15 @@ static const struct { { HDA_ATI_RV730, "ATI RV730", 0, 0 }, { HDA_ATI_RV740, "ATI RV740", 0, 0 }, { HDA_ATI_RV770, "ATI RV770", 0, 0 }, + { HDA_ATI_RV810, "ATI RV810", 0, 0 }, + { HDA_ATI_RV830, "ATI RV830", 0, 0 }, + { HDA_ATI_RV840, "ATI RV840", 0, 0 }, + { HDA_ATI_RV870, "ATI RV870", 0, 0 }, + { HDA_ATI_RV910, "ATI RV910", 0, 0 }, + { HDA_ATI_RV930, "ATI RV930", 0, 0 }, + { HDA_ATI_RV940, "ATI RV940", 0, 0 }, + { HDA_ATI_RV970, "ATI RV970", 0, 0 }, + { HDA_ATI_R1000, "ATI R1000", 0, 0 }, { HDA_RDC_M3010, "RDC M3010", 0, 0 }, { HDA_VIA_VT82XX, "VIA VT8251/8237A",0, 0 }, { HDA_SIS_966, "SiS 966", 0, 0 }, Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Fri Sep 7 14:05:08 2012 (r240200) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Fri Sep 7 14:07:13 2012 (r240201) @@ -110,6 +110,15 @@ #define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38) #define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40) #define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) +#define HDA_ATI_RV870 HDA_MODEL_CONSTRUCT(ATI, 0xaa50) +#define HDA_ATI_RV840 HDA_MODEL_CONSTRUCT(ATI, 0xaa58) +#define HDA_ATI_RV830 HDA_MODEL_CONSTRUCT(ATI, 0xaa60) +#define HDA_ATI_RV810 HDA_MODEL_CONSTRUCT(ATI, 0xaa68) +#define HDA_ATI_RV970 HDA_MODEL_CONSTRUCT(ATI, 0xaa80) +#define HDA_ATI_RV940 HDA_MODEL_CONSTRUCT(ATI, 0xaa88) +#define HDA_ATI_RV930 HDA_MODEL_CONSTRUCT(ATI, 0xaa90) +#define HDA_ATI_RV910 HDA_MODEL_CONSTRUCT(ATI, 0xaa98) +#define HDA_ATI_R1000 HDA_MODEL_CONSTRUCT(ATI, 0xaaa0) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) /* RDC */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 14:10:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7345B106564A; Fri, 7 Sep 2012 14:10:23 +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 44F468FC18; Fri, 7 Sep 2012 14:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87EANYb012520; Fri, 7 Sep 2012 14:10:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87EANkg012517; Fri, 7 Sep 2012 14:10:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209071410.q87EANkg012517@svn.freebsd.org> From: Alexander Motin Date: Fri, 7 Sep 2012 14:10:23 +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: r240202 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 14:10:23 -0000 Author: mav Date: Fri Sep 7 14:10:22 2012 New Revision: 240202 URL: http://svn.freebsd.org/changeset/base/240202 Log: MFC r239908: Add bunch of ATI HDMI HDA controller IDs. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c stable/8/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.c Fri Sep 7 14:07:13 2012 (r240201) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Fri Sep 7 14:10:22 2012 (r240202) @@ -138,6 +138,15 @@ static const struct { { HDA_ATI_RV730, "ATI RV730", 0, 0 }, { HDA_ATI_RV740, "ATI RV740", 0, 0 }, { HDA_ATI_RV770, "ATI RV770", 0, 0 }, + { HDA_ATI_RV810, "ATI RV810", 0, 0 }, + { HDA_ATI_RV830, "ATI RV830", 0, 0 }, + { HDA_ATI_RV840, "ATI RV840", 0, 0 }, + { HDA_ATI_RV870, "ATI RV870", 0, 0 }, + { HDA_ATI_RV910, "ATI RV910", 0, 0 }, + { HDA_ATI_RV930, "ATI RV930", 0, 0 }, + { HDA_ATI_RV940, "ATI RV940", 0, 0 }, + { HDA_ATI_RV970, "ATI RV970", 0, 0 }, + { HDA_ATI_R1000, "ATI R1000", 0, 0 }, { HDA_RDC_M3010, "RDC M3010", 0, 0 }, { HDA_VIA_VT82XX, "VIA VT8251/8237A",0, 0 }, { HDA_SIS_966, "SiS 966", 0, 0 }, Modified: stable/8/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.h Fri Sep 7 14:07:13 2012 (r240201) +++ stable/8/sys/dev/sound/pci/hda/hdac.h Fri Sep 7 14:10:22 2012 (r240202) @@ -110,6 +110,15 @@ #define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38) #define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40) #define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) +#define HDA_ATI_RV870 HDA_MODEL_CONSTRUCT(ATI, 0xaa50) +#define HDA_ATI_RV840 HDA_MODEL_CONSTRUCT(ATI, 0xaa58) +#define HDA_ATI_RV830 HDA_MODEL_CONSTRUCT(ATI, 0xaa60) +#define HDA_ATI_RV810 HDA_MODEL_CONSTRUCT(ATI, 0xaa68) +#define HDA_ATI_RV970 HDA_MODEL_CONSTRUCT(ATI, 0xaa80) +#define HDA_ATI_RV940 HDA_MODEL_CONSTRUCT(ATI, 0xaa88) +#define HDA_ATI_RV930 HDA_MODEL_CONSTRUCT(ATI, 0xaa90) +#define HDA_ATI_RV910 HDA_MODEL_CONSTRUCT(ATI, 0xaa98) +#define HDA_ATI_R1000 HDA_MODEL_CONSTRUCT(ATI, 0xaaa0) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) /* RDC */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 14:46:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FEE106564A; Fri, 7 Sep 2012 14:46:00 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6758FC08; Fri, 7 Sep 2012 14:46:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87Ek0kH017009; Fri, 7 Sep 2012 14:46:00 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87Ejxkr017007; Fri, 7 Sep 2012 14:45:59 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201209071445.q87Ejxkr017007@svn.freebsd.org> From: Fabien Thomas Date: Fri, 7 Sep 2012 14:45: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: r240203 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 14:46:00 -0000 Author: fabient Date: Fri Sep 7 14:45:59 2012 New Revision: 240203 URL: http://svn.freebsd.org/changeset/base/240203 Log: Complete and merge the list between Sandy/Ivy bridge of events that can run on specific PMC. MFC after: 1 month Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Fri Sep 7 14:10:22 2012 (r240202) +++ head/sys/dev/hwpmc/hwpmc_core.c Fri Sep 7 14:45:59 2012 (r240203) @@ -1695,36 +1695,29 @@ iap_event_westmere_ok_on_counter(enum pm } static int -iap_event_sandybridge_ok_on_counter(enum pmc_event pe, int ri) -{ - uint32_t mask; - - switch (pe) { - /* - * Events valid only on counter 2. - */ - case PMC_EV_IAP_EVENT_48H_01H: - mask = 0x4; - break; - default: - mask = ~0; /* Any row index is ok. */ - } - - return (mask & (1 << ri)); -} - -static int -iap_event_ivybridge_ok_on_counter(enum pmc_event pe, int ri) +iap_event_sb_ib_ok_on_counter(enum pmc_event pe, int ri) { uint32_t mask; switch (pe) { - /* - * Events valid only on counter 2. - */ + /* Events valid only on counter 0. */ + case PMC_EV_IAP_EVENT_B7H_01H: + mask = 0x1; + break; + /* Events valid only on counter 1. */ + case PMC_EV_IAP_EVENT_C0H_01H: + mask = 0x1; + break; + /* Events valid only on counter 2. */ case PMC_EV_IAP_EVENT_48H_01H: mask = 0x4; break; + /* Events valid only on counter 3. */ + case PMC_EV_IAP_EVENT_BBH_01H: + case PMC_EV_IAP_EVENT_CDH_01H: + case PMC_EV_IAP_EVENT_CDH_02H: + mask = 0x8; + break; default: mask = ~0; /* Any row index is ok. */ } @@ -1808,12 +1801,9 @@ iap_allocate_pmc(int cpu, int ri, struct if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; - case PMC_CPU_INTEL_IVYBRIDGE: - if (iap_event_ivybridge_ok_on_counter(ev, ri) == 0) - return (EINVAL); - break; case PMC_CPU_INTEL_SANDYBRIDGE: - if (iap_event_sandybridge_ok_on_counter(ev, ri) == 0) + case PMC_CPU_INTEL_IVYBRIDGE: + if (iap_event_sb_ib_ok_on_counter(ev, ri) == 0) return (EINVAL); break; case PMC_CPU_INTEL_WESTMERE: From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 15:10:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A94F31065680; Fri, 7 Sep 2012 15:10:46 +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 94C1E8FC15; Fri, 7 Sep 2012 15:10:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87FAkEj019950; Fri, 7 Sep 2012 15:10:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87FAk17019947; Fri, 7 Sep 2012 15:10:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209071510.q87FAk17019947@svn.freebsd.org> From: John Baldwin Date: Fri, 7 Sep 2012 15:10: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: r240204 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 15:10:46 -0000 Author: jhb Date: Fri Sep 7 15:10:46 2012 New Revision: 240204 URL: http://svn.freebsd.org/changeset/base/240204 Log: A few whitespace and comment fixes. Modified: head/sys/kern/kern_exit.c head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Sep 7 14:45:59 2012 (r240203) +++ head/sys/kern/kern_exit.c Fri Sep 7 15:10:46 2012 (r240204) @@ -157,8 +157,8 @@ exit1(struct thread *td, int rv) PROC_LOCK(p); while (p->p_flag & P_HADTHREADS) { /* - * First check if some other thread got here before us.. - * if so, act apropriatly, (exit or suspend); + * First check if some other thread got here before us. + * If so, act appropriately: exit or suspend. */ thread_suspend_check(0); @@ -179,7 +179,7 @@ exit1(struct thread *td, int rv) * re-check all suspension request, the thread should * either be suspended there or exit. */ - if (! thread_single(SINGLE_EXIT)) + if (!thread_single(SINGLE_EXIT)) break; /* Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Fri Sep 7 14:45:59 2012 (r240203) +++ head/sys/kern/kern_thread.c Fri Sep 7 15:10:46 2012 (r240204) @@ -718,7 +718,7 @@ stopme: /* * We have gotten rid of all the other threads and we * are about to either exit or exec. In either case, - * we try our utmost to revert to being a non-threaded + * we try our utmost to revert to being a non-threaded * process. */ p->p_singlethread = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 16:59:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B806106566C; Fri, 7 Sep 2012 16:59:31 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 670398FC0A; Fri, 7 Sep 2012 16:59:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87GxVJt032759; Fri, 7 Sep 2012 16:59:31 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87GxUuo032756; Fri, 7 Sep 2012 16:59:30 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201209071659.q87GxUuo032756@svn.freebsd.org> From: Niclas Zeising Date: Fri, 7 Sep 2012 16:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240205 - 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: Fri, 07 Sep 2012 16:59:31 -0000 Author: zeising (ports committer) Date: Fri Sep 7 16:59:30 2012 New Revision: 240205 URL: http://svn.freebsd.org/changeset/base/240205 Log: Change the link pointing to more information about the Yarrow algorithm, the current link points to a irrelevant catchall site. PR: docs/171411 Submitted by: Mark Martinec (pr), me (patch) Approved by: joel (mentor) MFC after: 2 weeks Modified: head/share/man/man4/random.4 Modified: head/share/man/man4/random.4 ============================================================================== --- head/share/man/man4/random.4 Fri Sep 7 15:10:46 2012 (r240204) +++ head/share/man/man4/random.4 Fri Sep 7 16:59:30 2012 (r240205) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2006 +.Dd September 7, 2012 .Dt RANDOM 4 .Os .Sh NAME @@ -142,7 +142,7 @@ if you wish to use them for entropy harv The other variables are explained in the paper describing the .Em Yarrow algorithm at -.Pa http://www.counterpane.com/yarrow.html . +.Pa http://www.schneier.com/yarrow.html . .Pp These variables are all limited in terms of the values they may contain: From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 17:51:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42C601065674; Fri, 7 Sep 2012 17:51:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2CD8FC18; Fri, 7 Sep 2012 17:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87HpDFg039002; Fri, 7 Sep 2012 17:51:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87HpCb8039000; Fri, 7 Sep 2012 17:51:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209071751.q87HpCb8039000@svn.freebsd.org> From: Dimitry Andric Date: Fri, 7 Sep 2012 17:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240206 - stable/9/sys/i386/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 17:51:13 -0000 Author: dim Date: Fri Sep 7 17:51:12 2012 New Revision: 240206 URL: http://svn.freebsd.org/changeset/base/240206 Log: MFC r239869: Remove the argument-less .align directive in sys/i386/bios/smapi_bios.S. Specifying no argument is undocumented in the gas manual, and clang's integrated assembler refuses to parse it. Also, removing it causes no change at all in the resulting object file. Modified: stable/9/sys/i386/bios/smapi_bios.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/bios/smapi_bios.S ============================================================================== --- stable/9/sys/i386/bios/smapi_bios.S Fri Sep 7 16:59:30 2012 (r240205) +++ stable/9/sys/i386/bios/smapi_bios.S Fri Sep 7 17:51:12 2012 (r240206) @@ -6,7 +6,6 @@ __FBSDID("$FreeBSD$"); * Thomas Hood. */ - .align smapi32_entry: /* far pointer to SMAPI entry */ .globl smapi32_offset smapi32_offset: .long 0x00000000 /* set by caller */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 17:58:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3883E106564A; Fri, 7 Sep 2012 17:58:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21D5C8FC15; Fri, 7 Sep 2012 17:58:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87HwadQ040040; Fri, 7 Sep 2012 17:58:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87Hwa51040031; Fri, 7 Sep 2012 17:58:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209071758.q87Hwa51040031@svn.freebsd.org> From: Dimitry Andric Date: Fri, 7 Sep 2012 17:58:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240207 - in stable/9/sys: conf gnu/fs/xfs gnu/fs/xfs/FreeBSD modules/xfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 17:58:37 -0000 Author: dim Date: Fri Sep 7 17:58:36 2012 New Revision: 240207 URL: http://svn.freebsd.org/changeset/base/240207 Log: MFC r239959: Work around several warnings from clang in the xfs filesystem, when linking it statically into the kernel. With our gcc in base there are no warnings, so also remove the WERROR= from the module makefile. Noted by: Eir Nym MFC r240011: Partially revert r239959, after actually fixing most of the clang warnings in sys/gnu/fs/xfs. The only warnings that still need to be suppressed are those about array bound overruns of flexible array members in xfs_dir2_{block,sf}.c, which are too expensive (in terms of cascading code changes) to fix. Modified: stable/9/sys/conf/files stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c stable/9/sys/gnu/fs/xfs/xfs_alloc.c stable/9/sys/gnu/fs/xfs/xfs_vfsops.c stable/9/sys/modules/xfs/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/conf/files Fri Sep 7 17:58:36 2012 (r240207) @@ -3407,7 +3407,7 @@ gnu/fs/xfs/xfs_dir.c optional xfs \ gnu/fs/xfs/xfs_dir2.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_block.c optional xfs \ - compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_data.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_leaf.c optional xfs \ @@ -3415,7 +3415,7 @@ gnu/fs/xfs/xfs_dir2_leaf.c optional xfs gnu/fs/xfs/xfs_dir2_node.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_sf.c optional xfs \ - compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir2_trace.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/xfs_dir_leaf.c optional xfs \ @@ -3505,7 +3505,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ - compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ Modified: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Fri Sep 7 17:58:36 2012 (r240207) @@ -1249,7 +1249,6 @@ xfs_ioc_xattr( XFS_AT_NEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1287,7 +1286,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } @@ -1296,7 +1294,6 @@ xfs_ioc_xattr( XFS_AT_ANEXTENTS | XFS_AT_PROJID; XVOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { - error = error; break; } @@ -1347,7 +1344,6 @@ xfs_ioc_xattr( if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ #endif - error = error; break; } Modified: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_stats.c Fri Sep 7 17:58:36 2012 (r240207) @@ -65,7 +65,7 @@ xfs_read_xfsstats( }; for (i=j=len = 0; i < sizeof(xstats)/sizeof(struct xstats_entry); i++) { - len += sprintf(buffer + len, xstats[i].desc); + len += sprintf(buffer + len, "%s", xstats[i].desc); /* inner loop does each group */ while (j < xstats[i].endpoint) { len += sprintf(buffer + len, " %u", Modified: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_super.c Fri Sep 7 17:58:36 2012 (r240207) @@ -251,7 +251,7 @@ xfs_blkdev_issue_flush( int init_xfs_fs( void ) { - static char message[] = + static const char message[] = XFS_VERSION_STRING " with " XFS_BUILD_OPTIONS " enabled\n"; printf(message); Modified: stable/9/sys/gnu/fs/xfs/xfs_alloc.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/xfs_alloc.c Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/gnu/fs/xfs/xfs_alloc.c Fri Sep 7 17:58:36 2012 (r240207) @@ -1479,8 +1479,10 @@ xfs_alloc_ag_vextent_small( /* * Can't allocate from the freelist for some reason. */ - else + else { + fbno = NULLAGBLOCK; flen = 0; + } /* * Can't do the allocation, give up. */ Modified: stable/9/sys/gnu/fs/xfs/xfs_vfsops.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/xfs_vfsops.c Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/gnu/fs/xfs/xfs_vfsops.c Fri Sep 7 17:58:36 2012 (r240207) @@ -1955,7 +1955,7 @@ xfs_showargs( for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { if (mp->m_flags & xfs_infop->flag) - sbuf_printf(m, xfs_infop->str); + sbuf_printf(m, "%s", xfs_infop->str); } if (mp->m_flags & XFS_MOUNT_IHASHSIZE) Modified: stable/9/sys/modules/xfs/Makefile ============================================================================== --- stable/9/sys/modules/xfs/Makefile Fri Sep 7 17:51:12 2012 (r240206) +++ stable/9/sys/modules/xfs/Makefile Fri Sep 7 17:58:36 2012 (r240207) @@ -6,8 +6,6 @@ KMOD= xfs -WERROR= - SRCS = vnode_if.h \ xfs_alloc.c \ xfs_alloc_btree.c \ @@ -86,5 +84,6 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/F -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \ -I${.CURDIR}/../../gnu/fs/xfs -CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xfs_dir2_block.c= ${NO_WARRAY_BOUNDS} +CWARNFLAGS.xfs_dir2_sf.c= ${NO_WARRAY_BOUNDS} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 18:03:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7EB0106564A; Fri, 7 Sep 2012 18:03:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1F198FC08; Fri, 7 Sep 2012 18:03:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87I3TBl040768; Fri, 7 Sep 2012 18:03:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87I3TJ8040766; Fri, 7 Sep 2012 18:03:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209071803.q87I3TJ8040766@svn.freebsd.org> From: Dimitry Andric Date: Fri, 7 Sep 2012 18:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240208 - in stable: 7/contrib/binutils/binutils 8/contrib/binutils/binutils 9/contrib/binutils/binutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 18:03:30 -0000 Author: dim Date: Fri Sep 7 18:03:29 2012 New Revision: 240208 URL: http://svn.freebsd.org/changeset/base/240208 Log: MFC r239962: Fix a twelve year old bug in readelf: when process_dynamic_segment() encounters a DT_RUNPATH entry, the global dynamic_info[] array is overrun, causing some other global variable to be overwritten. In my testcase, this was the section_headers variable, leading to segfaults or jemalloc assertions when it was freed later on. Thanks to Koop Mast for providing samples of a few "bad" .so files. Modified: stable/9/contrib/binutils/binutils/readelf.c Directory Properties: stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/7/contrib/binutils/binutils/readelf.c stable/8/contrib/binutils/binutils/readelf.c Directory Properties: stable/7/contrib/binutils/ (props changed) stable/8/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/9/contrib/binutils/binutils/readelf.c Fri Sep 7 17:58:36 2012 (r240207) +++ stable/9/contrib/binutils/binutils/readelf.c Fri Sep 7 18:03:29 2012 (r240208) @@ -174,7 +174,7 @@ static Elf_Internal_Syminfo *dynamic_sym static unsigned long dynamic_syminfo_offset; static unsigned int dynamic_syminfo_nent; static char program_interpreter[PATH_MAX]; -static bfd_vma dynamic_info[DT_JMPREL + 1]; +static bfd_vma dynamic_info[DT_ENCODING]; static bfd_vma dynamic_info_DT_GNU_HASH; static bfd_vma version_info[16]; static Elf_Internal_Ehdr elf_header; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 18:03:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32209106566B; Fri, 7 Sep 2012 18:03:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2AC8FC0A; Fri, 7 Sep 2012 18:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87I3TUV040775; Fri, 7 Sep 2012 18:03:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87I3Tvu040772; Fri, 7 Sep 2012 18:03:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209071803.q87I3Tvu040772@svn.freebsd.org> From: Dimitry Andric Date: Fri, 7 Sep 2012 18:03: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: r240208 - in stable: 7/contrib/binutils/binutils 8/contrib/binutils/binutils 9/contrib/binutils/binutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 18:03:30 -0000 Author: dim Date: Fri Sep 7 18:03:29 2012 New Revision: 240208 URL: http://svn.freebsd.org/changeset/base/240208 Log: MFC r239962: Fix a twelve year old bug in readelf: when process_dynamic_segment() encounters a DT_RUNPATH entry, the global dynamic_info[] array is overrun, causing some other global variable to be overwritten. In my testcase, this was the section_headers variable, leading to segfaults or jemalloc assertions when it was freed later on. Thanks to Koop Mast for providing samples of a few "bad" .so files. Modified: stable/8/contrib/binutils/binutils/readelf.c Directory Properties: stable/8/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/7/contrib/binutils/binutils/readelf.c stable/9/contrib/binutils/binutils/readelf.c Directory Properties: stable/7/contrib/binutils/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/8/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/8/contrib/binutils/binutils/readelf.c Fri Sep 7 17:58:36 2012 (r240207) +++ stable/8/contrib/binutils/binutils/readelf.c Fri Sep 7 18:03:29 2012 (r240208) @@ -128,7 +128,7 @@ Elf_Internal_Syminfo *dynamic_syminfo; unsigned long dynamic_syminfo_offset; unsigned int dynamic_syminfo_nent; char program_interpreter[64]; -bfd_vma dynamic_info[DT_JMPREL + 1]; +bfd_vma dynamic_info[DT_ENCODING]; bfd_vma version_info[16]; Elf_Internal_Ehdr elf_header; Elf_Internal_Shdr *section_headers; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 18:03:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 702FF1065670; Fri, 7 Sep 2012 18:03:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5995E8FC0C; Fri, 7 Sep 2012 18:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87I3UIL040783; Fri, 7 Sep 2012 18:03:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87I3UUQ040780; Fri, 7 Sep 2012 18:03:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209071803.q87I3UUQ040780@svn.freebsd.org> From: Dimitry Andric Date: Fri, 7 Sep 2012 18:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240208 - in stable: 7/contrib/binutils/binutils 8/contrib/binutils/binutils 9/contrib/binutils/binutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 18:03:30 -0000 Author: dim Date: Fri Sep 7 18:03:29 2012 New Revision: 240208 URL: http://svn.freebsd.org/changeset/base/240208 Log: MFC r239962: Fix a twelve year old bug in readelf: when process_dynamic_segment() encounters a DT_RUNPATH entry, the global dynamic_info[] array is overrun, causing some other global variable to be overwritten. In my testcase, this was the section_headers variable, leading to segfaults or jemalloc assertions when it was freed later on. Thanks to Koop Mast for providing samples of a few "bad" .so files. Modified: stable/7/contrib/binutils/binutils/readelf.c Directory Properties: stable/7/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/binutils/binutils/readelf.c stable/9/contrib/binutils/binutils/readelf.c Directory Properties: stable/8/contrib/binutils/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/7/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/7/contrib/binutils/binutils/readelf.c Fri Sep 7 17:58:36 2012 (r240207) +++ stable/7/contrib/binutils/binutils/readelf.c Fri Sep 7 18:03:29 2012 (r240208) @@ -128,7 +128,7 @@ Elf_Internal_Syminfo *dynamic_syminfo; unsigned long dynamic_syminfo_offset; unsigned int dynamic_syminfo_nent; char program_interpreter[64]; -bfd_vma dynamic_info[DT_JMPREL + 1]; +bfd_vma dynamic_info[DT_ENCODING]; bfd_vma version_info[16]; Elf_Internal_Ehdr elf_header; Elf_Internal_Shdr *section_headers; From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 18:41:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 51239106564A; Fri, 7 Sep 2012 18:41:20 +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 3C62F8FC08; Fri, 7 Sep 2012 18:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87IfKK8045698; Fri, 7 Sep 2012 18:41:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87IfJEF045693; Fri, 7 Sep 2012 18:41:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209071841.q87IfJEF045693@svn.freebsd.org> From: John Baldwin Date: Fri, 7 Sep 2012 18:41: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: r240209 - head/sys/dev/twe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 18:41:20 -0000 Author: jhb Date: Fri Sep 7 18:41:19 2012 New Revision: 240209 URL: http://svn.freebsd.org/changeset/base/240209 Log: Remove remaining 4.x compat shims. No resulting changes (verified by md5). Modified: head/sys/dev/twe/twe.c head/sys/dev/twe/twe_compat.h head/sys/dev/twe/twe_freebsd.c head/sys/dev/twe/twevar.h Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Fri Sep 7 18:03:29 2012 (r240208) +++ head/sys/dev/twe/twe.c Fri Sep 7 18:41:19 2012 (r240209) @@ -400,7 +400,7 @@ twe_startio(struct twe_softc *sc) { struct twe_request *tr; TWE_Command *cmd; - twe_bio *bp; + struct bio *bp; int error; debug_called(4); @@ -431,10 +431,10 @@ twe_startio(struct twe_softc *sc) /* connect the bio to the command */ tr->tr_complete = twe_completeio; tr->tr_private = bp; - tr->tr_data = TWE_BIO_DATA(bp); - tr->tr_length = TWE_BIO_LENGTH(bp); + tr->tr_data = bp->bio_data; + tr->tr_length = bp->bio_bcount; cmd = TWE_FIND_COMMAND(tr); - if (TWE_BIO_IS_READ(bp)) { + if (bp->bio_cmd == BIO_READ) { tr->tr_flags |= TWE_CMD_DATAIN; cmd->io.opcode = TWE_OP_READ; } else { @@ -444,9 +444,9 @@ twe_startio(struct twe_softc *sc) /* build a suitable I/O command (assumes 512-byte rounded transfers) */ cmd->io.size = 3; - cmd->io.unit = TWE_BIO_UNIT(bp); + cmd->io.unit = *(int *)(bp->bio_driver1); cmd->io.block_count = (tr->tr_length + TWE_BLOCK_SIZE - 1) / TWE_BLOCK_SIZE; - cmd->io.lba = TWE_BIO_LBA(bp); + cmd->io.lba = bp->bio_pblkno; } /* did we find something to do? */ @@ -461,8 +461,9 @@ twe_startio(struct twe_softc *sc) break; tr->tr_status = TWE_CMD_ERROR; if (tr->tr_private != NULL) { - bp = (twe_bio *)(tr->tr_private); - TWE_BIO_SET_ERROR(bp, error); + bp = (struct bio *)(tr->tr_private); + bp->bio_error = error; + bp->bio_flags |= BIO_ERROR; tr->tr_private = NULL; twed_intr(bp); twe_release_request(tr); @@ -1012,15 +1013,17 @@ twe_completeio(struct twe_request *tr) { TWE_Command *cmd = TWE_FIND_COMMAND(tr); struct twe_softc *sc = tr->tr_sc; - twe_bio *bp = (twe_bio *)tr->tr_private; + struct bio *bp = tr->tr_private; debug_called(4); if (tr->tr_status == TWE_CMD_COMPLETE) { if (cmd->generic.status) - if (twe_report_request(tr)) - TWE_BIO_SET_ERROR(bp, EIO); + if (twe_report_request(tr)) { + bp->bio_error = EIO; + bp->bio_flags |= BIO_ERROR; + } } else { twe_panic(sc, "twe_completeio on incomplete command"); Modified: head/sys/dev/twe/twe_compat.h ============================================================================== --- head/sys/dev/twe/twe_compat.h Fri Sep 7 18:03:29 2012 (r240208) +++ head/sys/dev/twe/twe_compat.h Fri Sep 7 18:41:19 2012 (r240209) @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -61,6 +62,8 @@ #include #include +#include + #define TWE_DRIVER_NAME twe #define TWED_DRIVER_NAME twed #define TWE_MALLOC_CLASS M_TWE @@ -108,27 +111,6 @@ #define twe_printf(sc, fmt, args...) device_printf(sc->twe_dev, fmt , ##args) #define twed_printf(twed, fmt, args...) device_printf(twed->twed_dev, fmt , ##args) -# include -# include -typedef struct bio twe_bio; -typedef struct bio_queue_head twe_bioq; -# define TWE_BIO_QINIT(bq) bioq_init(&bq); -# define TWE_BIO_QINSERT(bq, bp) bioq_insert_tail(&bq, bp) -# define TWE_BIO_QFIRST(bq) bioq_first(&bq) -# define TWE_BIO_QREMOVE(bq, bp) bioq_remove(&bq, bp) -# define TWE_BIO_IS_READ(bp) ((bp)->bio_cmd == BIO_READ) -# define TWE_BIO_DATA(bp) (bp)->bio_data -# define TWE_BIO_LENGTH(bp) (bp)->bio_bcount -# define TWE_BIO_LBA(bp) (bp)->bio_pblkno -# define TWE_BIO_SOFTC(bp) (bp)->bio_disk->d_drv1 -# define TWE_BIO_UNIT(bp) *(int *)(bp->bio_driver1) -# define TWE_BIO_SET_ERROR(bp, err) do { (bp)->bio_error = err; (bp)->bio_flags |= BIO_ERROR;} while(0) -# define TWE_BIO_HAS_ERROR(bp) ((bp)->bio_flags & BIO_ERROR) -# define TWE_BIO_RESID(bp) (bp)->bio_resid -# define TWE_BIO_DONE(bp) biodone(bp) -# define TWE_BIO_STATS_START(bp) -# define TWE_BIO_STATS_END(bp) - #define TWE_IO_LOCK(sc) mtx_lock(&(sc)->twe_io_lock) #define TWE_IO_UNLOCK(sc) mtx_unlock(&(sc)->twe_io_lock) #define TWE_IO_ASSERT_LOCKED(sc) mtx_assert(&(sc)->twe_io_lock, MA_OWNED) Modified: head/sys/dev/twe/twe_freebsd.c ============================================================================== --- head/sys/dev/twe/twe_freebsd.c Fri Sep 7 18:03:29 2012 (r240208) +++ head/sys/dev/twe/twe_freebsd.c Fri Sep 7 18:41:19 2012 (r240209) @@ -720,9 +720,9 @@ twed_open(struct disk *dp) * Handle an I/O request. */ static void -twed_strategy(twe_bio *bp) +twed_strategy(struct bio *bp) { - struct twed_softc *sc = (struct twed_softc *)TWE_BIO_SOFTC(bp); + struct twed_softc *sc = bp->bio_disk->d_drv1; debug_called(4); @@ -731,16 +731,14 @@ twed_strategy(twe_bio *bp) /* bogus disk? */ if (sc == NULL || sc->twed_drive->td_disk == NULL) { - TWE_BIO_SET_ERROR(bp, EINVAL); + bp->bio_error = EINVAL; + bp->bio_flags |= BIO_ERROR; printf("twe: bio for invalid disk!\n"); - TWE_BIO_DONE(bp); + biodone(bp); TWED_BIO_OUT; return; } - /* perform accounting */ - TWE_BIO_STATS_START(bp); - /* queue the bio on the controller */ TWE_IO_LOCK(sc->twed_controller); twe_enqueue_bio(sc->twed_controller, bp); @@ -779,16 +777,15 @@ twed_dump(void *arg, void *virtual, vm_o * Handle completion of an I/O request. */ void -twed_intr(twe_bio *bp) +twed_intr(struct bio *bp) { debug_called(4); /* if no error, transfer completed */ - if (!TWE_BIO_HAS_ERROR(bp)) - TWE_BIO_RESID(bp) = 0; + if (!(bp->bio_flags & BIO_ERROR)) + bp->bio_resid = 0; - TWE_BIO_STATS_END(bp); - TWE_BIO_DONE(bp); + biodone(bp); TWED_BIO_OUT; } Modified: head/sys/dev/twe/twevar.h ============================================================================== --- head/sys/dev/twe/twevar.h Fri Sep 7 18:03:29 2012 (r240208) +++ head/sys/dev/twe/twevar.h Fri Sep 7 18:41:19 2012 (r240209) @@ -114,7 +114,7 @@ struct twe_softc { /* controller queues and arrays */ TAILQ_HEAD(, twe_request) twe_free; /* command structures available for reuse */ - twe_bioq twe_bioq; /* outstanding I/O operations */ + struct bio_queue_head twe_bioq; /* outstanding I/O operations */ TAILQ_HEAD(, twe_request) twe_ready; /* requests ready for the controller */ TAILQ_HEAD(, twe_request) twe_busy; /* requests busy in the controller */ TAILQ_HEAD(, twe_request) twe_complete; /* active commands (busy or waiting for completion) */ @@ -166,7 +166,7 @@ extern int twe_detach_drive(struct twe_s int unit); /* detach drive */ extern void twe_clear_pci_parity_error(struct twe_softc *sc); extern void twe_clear_pci_abort(struct twe_softc *sc); -extern void twed_intr(twe_bio *bp); /* return bio from core */ +extern void twed_intr(struct bio *bp); /* return bio from core */ extern struct twe_request *twe_allocate_request(struct twe_softc *sc, int tag); /* allocate request structure */ extern void twe_free_request(struct twe_request *tr); /* free request structure */ extern int twe_map_request(struct twe_request *tr); /* make request visible to controller, do s/g */ @@ -249,24 +249,24 @@ TWEQ_REQUEST_QUEUE(complete, TWEQ_COMPLE static __inline void twe_initq_bio(struct twe_softc *sc) { - TWE_BIO_QINIT(sc->twe_bioq); + bioq_init(&sc->twe_bioq); TWEQ_INIT(sc, TWEQ_BIO); } static __inline void -twe_enqueue_bio(struct twe_softc *sc, twe_bio *bp) +twe_enqueue_bio(struct twe_softc *sc, struct bio *bp) { - TWE_BIO_QINSERT(sc->twe_bioq, bp); + bioq_insert_tail(&sc->twe_bioq, bp); TWEQ_ADD(sc, TWEQ_BIO); } -static __inline twe_bio * +static __inline struct bio * twe_dequeue_bio(struct twe_softc *sc) { - twe_bio *bp; + struct bio *bp; - if ((bp = TWE_BIO_QFIRST(sc->twe_bioq)) != NULL) { - TWE_BIO_QREMOVE(sc->twe_bioq, bp); + if ((bp = bioq_first(&sc->twe_bioq)) != NULL) { + bioq_remove(&sc->twe_bioq, bp); TWEQ_REMOVE(sc, TWEQ_BIO); } return(bp); From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 19:00:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AFA8F106566C; Fri, 7 Sep 2012 19:00: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 9A6DA8FC17; Fri, 7 Sep 2012 19:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87J0RZm047892; Fri, 7 Sep 2012 19:00:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87J0RO0047890; Fri, 7 Sep 2012 19:00:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209071900.q87J0RO0047890@svn.freebsd.org> From: Xin LI Date: Fri, 7 Sep 2012 19:00: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: r240210 - head/sys/dev/hptmv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 19:00:27 -0000 Author: delphij Date: Fri Sep 7 19:00:27 2012 New Revision: 240210 URL: http://svn.freebsd.org/changeset/base/240210 Log: It seems that what the code really meant is that when a write is completed, do a BUS_DMASYNC_POSTWRITE over the DMA map. The way it currently is would only do POSTREAD for read transactions. Submitted by: Sascha Wildner MFC after: 1 month Modified: head/sys/dev/hptmv/entry.c Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Fri Sep 7 18:41:19 2012 (r240209) +++ head/sys/dev/hptmv/entry.c Fri Sep 7 19:00:27 2012 (r240210) @@ -3046,7 +3046,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) if (pCmd->cf_data_in) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTREAD); } - else if (pCmd->cf_data_in) { + else if (pCmd->cf_data_out) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTWRITE); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 19:16:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0167F106567F; Fri, 7 Sep 2012 19:16:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B5D1E8FC12; Fri, 7 Sep 2012 19:16:47 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 36283B93B; Fri, 7 Sep 2012 15:16:47 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Fri, 7 Sep 2012 15:14:30 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209071841.q87IfJEF045693@svn.freebsd.org> In-Reply-To: <201209071841.q87IfJEF045693@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209071514.30725.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 07 Sep 2012 15:16:47 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r240209 - head/sys/dev/twe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 19:16:48 -0000 On Friday, September 07, 2012 2:41:19 pm John Baldwin wrote: > Author: jhb > Date: Fri Sep 7 18:41:19 2012 > New Revision: 240209 > URL: http://svn.freebsd.org/changeset/base/240209 > > Log: > Remove remaining 4.x compat shims. No resulting changes (verified by > md5). FYI, verifying by md5 did require some tweaking. First, I had to hack ensure LOCK_DEBUG was off in so that merely shuffling things around wouldn't introduce noise in __LINE__ args passed to mtx_*(). Second, I had to leave the typedefs for 'twe_bio' and 'twe_bioq' in even if they were unused. With those changes the md5 sums were the same. I removed the 'twe_bio' and 'twe_bioq' typedefs for the commit however. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 19:42:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA72610656D4; Fri, 7 Sep 2012 19:42:37 +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 873498FC16; Fri, 7 Sep 2012 19:42:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87JgblG052892; Fri, 7 Sep 2012 19:42:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87Jgb08052890; Fri, 7 Sep 2012 19:42:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201209071942.q87Jgb08052890@svn.freebsd.org> From: John Baldwin Date: Fri, 7 Sep 2012 19:42: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: r240211 - head/sys/dev/atkbdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 19:42:38 -0000 Author: jhb Date: Fri Sep 7 19:42:36 2012 New Revision: 240211 URL: http://svn.freebsd.org/changeset/base/240211 Log: Use callout(9) instead of timeout(9) to manage timers. Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Fri Sep 7 19:00:27 2012 (r240210) +++ head/sys/dev/atkbdc/psm.c Fri Sep 7 19:42:36 2012 (r240211) @@ -291,8 +291,8 @@ struct psm_softc { /* Driver status inf struct timeval lastinputerr; /* time last sync error happened */ struct timeval taptimeout; /* tap timeout for touchpads */ int watchdog; /* watchdog timer flag */ - struct callout_handle callout; /* watchdog timer call out */ - struct callout_handle softcallout; /* buffer timer call out */ + struct callout callout; /* watchdog timer call out */ + struct callout softcallout; /* buffer timer call out */ struct cdev *dev; struct cdev *bdev; int lasterr; @@ -960,7 +960,7 @@ doopen(struct psm_softc *sc, int command /* start the watchdog timer */ sc->watchdog = FALSE; - sc->callout = timeout(psmtimeout, (void *)(uintptr_t)sc, hz*2); + callout_reset(&sc->callout, hz * 2, psmtimeout, sc); return (0); } @@ -979,8 +979,7 @@ reinitialize(struct psm_softc *sc, int d /* block our watchdog timer */ sc->watchdog = FALSE; - untimeout(psmtimeout, (void *)(uintptr_t)sc, sc->callout); - callout_handle_init(&sc->callout); + callout_stop(&sc->callout); /* save the current controller command byte */ empty_both_buffers(sc->kbdc, 10); @@ -1418,7 +1417,8 @@ psmattach(device_t dev) /* Setup initial state */ sc->state = PSM_VALID; - callout_handle_init(&sc->callout); + callout_init(&sc->callout, 0); + callout_init(&sc->softcallout, 0); /* Setup our interrupt handler */ rid = KBDC_RID_AUX; @@ -1487,6 +1487,9 @@ psmdetach(device_t dev) destroy_dev(sc->dev); destroy_dev(sc->bdev); + callout_drain(&sc->callout); + callout_drain(&sc->softcallout); + return (0); } @@ -1615,8 +1618,7 @@ psmclose(struct cdev *dev, int flag, int splx(s); /* stop the watchdog timer */ - untimeout(psmtimeout, (void *)(uintptr_t)sc, sc->callout); - callout_handle_init(&sc->callout); + callout_stop(&sc->callout); /* remove anything left in the output buffer */ empty_aux_buffer(sc->kbdc, 10); @@ -1839,7 +1841,7 @@ dropqueue(struct psm_softc *sc) sc->queue.tail = 0; if ((sc->state & PSM_SOFTARMED) != 0) { sc->state &= ~PSM_SOFTARMED; - untimeout(psmsoftintr, (void *)(uintptr_t)sc, sc->softcallout); + callout_stop(&sc->softcallout); } sc->pqueue_start = sc->pqueue_end; } @@ -2255,7 +2257,7 @@ psmtimeout(void *arg) } sc->watchdog = TRUE; splx(s); - sc->callout = timeout(psmtimeout, (void *)(uintptr_t)sc, hz); + callout_reset(&sc->callout, hz, psmtimeout, sc); } /* Add all sysctls under the debug.psm and hw.psm nodes */ @@ -2437,13 +2439,13 @@ next: (sc->pqueue_end == sc->pqueue_start)) { if ((sc->state & PSM_SOFTARMED) != 0) { sc->state &= ~PSM_SOFTARMED; - untimeout(psmsoftintr, arg, sc->softcallout); + callout_stop(&sc->softcallout); } psmsoftintr(arg); } else if ((sc->state & PSM_SOFTARMED) == 0) { sc->state |= PSM_SOFTARMED; - sc->softcallout = timeout(psmsoftintr, arg, - psmhz < 1 ? 1 : (hz/psmhz)); + callout_reset(&sc->softcallout, + psmhz < 1 ? 1 : (hz/psmhz), psmsoftintr, arg); } } } From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 20:57:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64F70106566B; Fri, 7 Sep 2012 20:57:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35D6C8FC12; Fri, 7 Sep 2012 20:57:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87Kvbmc061972; Fri, 7 Sep 2012 20:57:37 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87Kvahi061970; Fri, 7 Sep 2012 20:57:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201209072057.q87Kvahi061970@svn.freebsd.org> From: Rick Macklem Date: Fri, 7 Sep 2012 20:57: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: r240213 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 20:57:37 -0000 Author: rmacklem Date: Fri Sep 7 20:57:36 2012 New Revision: 240213 URL: http://svn.freebsd.org/changeset/base/240213 Log: MFC: r237244 Fix the NFSv4 client for the case where mmap'd files are written, but not msync'd by a process. A VOP_PUTPAGES() called when VOP_RECLAIM() happens will usually fail, since the NFSv4 Open has already been closed by VOP_INACTIVE(). Add a vm_object_page_clean() call to the NFSv4 client's VOP_INACTIVE(), so that the write happens before the NFSv4 Open is closed. kib@ suggested using vgone() instead and I will explore this, but this patch fixes things in the meantime. For some reason, the VOP_PUTPAGES() is still attempted in VOP_RECLAIM(), but having this fail doesn't cause any problems except a "stateid0 in write" being logged. Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/compat/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) stable/8/sys/dev/virtio/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clnode.c Fri Sep 7 20:57:36 2012 (r240212) +++ stable/8/sys/fs/nfsclient/nfs_clnode.c Fri Sep 7 20:57:36 2012 (r240213) @@ -207,18 +207,28 @@ ncl_inactive(struct vop_inactive_args *a struct nfsnode *np; struct sillyrename *sp; struct vnode *vp = ap->a_vp; + boolean_t retv; np = VTONFS(vp); if (NFS_ISV4(vp) && vp->v_type == VREG) { /* * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4 - * Close operations are delayed until now. Any dirty buffers - * must be flushed before the close, so that the stateid is - * available for the writes. + * Close operations are delayed until now. Any dirty + * buffers/pages must be flushed before the close, so that the + * stateid is available for the writes. */ - (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); - (void) nfsrpc_close(vp, 1, ap->a_td); + if (vp->v_object != NULL) { + VM_OBJECT_LOCK(vp->v_object); + retv = vm_object_page_clean(vp->v_object, 0, 0, + OBJPC_SYNC); + VM_OBJECT_UNLOCK(vp->v_object); + } else + retv = TRUE; + if (retv == TRUE) { + (void)ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); + (void)nfsrpc_close(vp, 1, ap->a_td); + } } mtx_lock(&np->n_mtx); From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 21:06:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C583106566B; Fri, 7 Sep 2012 21:06:55 +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 37B138FC12; Fri, 7 Sep 2012 21:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87L6tSA063353; Fri, 7 Sep 2012 21:06:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87L6tWp063351; Fri, 7 Sep 2012 21:06:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209072106.q87L6tWp063351@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 7 Sep 2012 21: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: r240214 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 21:06:55 -0000 Author: glebius Date: Fri Sep 7 21:06:54 2012 New Revision: 240214 URL: http://svn.freebsd.org/changeset/base/240214 Log: Supply the pr_ctloutput method for local datagram sockets, so that setsockopt() and getsockopt() work on them. This makes 'tools/regression/sockets/unix_cmsg -t dgram' more successful. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Sep 7 20:57:36 2012 (r240213) +++ head/sys/kern/uipc_usrreq.c Fri Sep 7 21:06:54 2012 (r240214) @@ -306,6 +306,7 @@ static struct protosw localsw[] = { .pr_type = SOCK_DGRAM, .pr_domain = &localdomain, .pr_flags = PR_ATOMIC|PR_ADDR|PR_RIGHTS, + .pr_ctloutput = &uipc_ctloutput, .pr_usrreqs = &uipc_usrreqs_dgram }, { From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 21:46:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 710F8106564A; Fri, 7 Sep 2012 21:46:31 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from emx.nitro.dk (emx.nitro.dk [IPv6:2a01:4f8:120:7384::102]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8498FC08; Fri, 7 Sep 2012 21:46:31 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id 948402CBF59; Fri, 7 Sep 2012 21:46:23 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id o0Y7UUGYmmkR; Fri, 7 Sep 2012 21:46:21 +0000 (UTC) Received: from [192.168.4.35] (unknown [89.100.2.68]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id 87BA12CBF54; Fri, 7 Sep 2012 21:46:21 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: "Simon L. B. Nielsen" In-Reply-To: <201209061010.q86AAvgA002636@svn.freebsd.org> Date: Fri, 7 Sep 2012 22:46:21 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201209061010.q86AAvgA002636@svn.freebsd.org> To: Mikolaj Golub X-Mailer: Apple Mail (2.1486) 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: r240161 - stable/8/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: Fri, 07 Sep 2012 21:46:31 -0000 On 6 Sep 2012, at 11:10, Mikolaj Golub wrote: > Author: trociny > Date: Thu Sep 6 10:10:56 2012 > New Revision: 240161 > URL: http://svn.freebsd.org/changeset/base/240161 >=20 > Log: > Direct commit to stable/8 to fix the mis-merge in r239983: in 8.x > read-locking of the inpcbinfo is not used in the TCP timer code. Thanks for the quick fix! BTW. stuff like this (which was triggered on www.FreeBSD.org) is why we = run -stable on FreeBSD.org production servers, so we can find things = before they make it into releases. --=20 Simon L. B. Nielsen From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 22:30:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52C3B106564A; Fri, 7 Sep 2012 22:30:21 +0000 (UTC) (envelope-from thomas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23B1F8FC15; Fri, 7 Sep 2012 22:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87MUKQT074584; Fri, 7 Sep 2012 22:30:20 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87MUKfA074582; Fri, 7 Sep 2012 22:30:20 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201209072230.q87MUKfA074582@svn.freebsd.org> From: Thomas Quinot Date: Fri, 7 Sep 2012 22:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240217 - stable/9/sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 22:30:21 -0000 Author: thomas Date: Fri Sep 7 22:30:20 2012 New Revision: 240217 URL: http://svn.freebsd.org/changeset/base/240217 Log: Merge rev. 239673 from head to stable/9: (g_multipath_rotate): Fix algorithm so that it does rotate over all good providers, not just the last two. Modified: stable/9/sys/geom/multipath/g_multipath.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/9/sys/geom/multipath/g_multipath.c Fri Sep 7 22:16:50 2012 (r240216) +++ stable/9/sys/geom/multipath/g_multipath.c Fri Sep 7 22:30:20 2012 (r240217) @@ -590,19 +590,26 @@ g_multipath_destroy_geom(struct gctl_req static int g_multipath_rotate(struct g_geom *gp) { - struct g_consumer *lcp; + struct g_consumer *lcp, *first_good_cp = NULL; struct g_multipath_softc *sc = gp->softc; + int active_cp_seen = 0; g_topology_assert(); if (sc == NULL) return (ENXIO); LIST_FOREACH(lcp, &gp->consumer, consumer) { if ((lcp->index & MP_BAD) == 0) { - if (sc->sc_active != lcp) + if (first_good_cp == NULL) + first_good_cp = lcp; + if (active_cp_seen) break; } + if (sc->sc_active == lcp) + active_cp_seen = 1; } - if (lcp) { + if (lcp == NULL) + lcp = first_good_cp; + if (lcp && lcp != sc->sc_active) { sc->sc_active = lcp; if (sc->sc_active_active != 1) printf("GEOM_MULTIPATH: %s is now active path in %s\n", From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 22:34:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D23301065670; Fri, 7 Sep 2012 22:34:30 +0000 (UTC) (envelope-from thomas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBC468FC0C; Fri, 7 Sep 2012 22:34:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87MYUSo075178; Fri, 7 Sep 2012 22:34:30 GMT (envelope-from thomas@svn.freebsd.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87MYUBx075175; Fri, 7 Sep 2012 22:34:30 GMT (envelope-from thomas@svn.freebsd.org) Message-Id: <201209072234.q87MYUBx075175@svn.freebsd.org> From: Thomas Quinot Date: Fri, 7 Sep 2012 22:34: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: r240218 - in stable/8/sys: . dev/sound geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Sep 2012 22:34:31 -0000 Author: thomas Date: Fri Sep 7 22:34:30 2012 New Revision: 240218 URL: http://svn.freebsd.org/changeset/base/240218 Log: Merge rev. 239673 from head to stable/8: (g_multipath_rotate): Fix algorithm so that it does rotate over all good providers, not just the last two. Modified: stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/Makefile (props changed) stable/8/sys/amd64/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/bsm/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/compat/ (props changed) stable/8/sys/conf/ (props changed) stable/8/sys/contrib/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/crypto/ (props changed) stable/8/sys/ddb/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/aac/ (props changed) stable/8/sys/dev/acpi_support/ (props changed) stable/8/sys/dev/acpica/ (props changed) stable/8/sys/dev/adb/ (props changed) stable/8/sys/dev/adlink/ (props changed) stable/8/sys/dev/advansys/ (props changed) stable/8/sys/dev/ae/ (props changed) stable/8/sys/dev/age/ (props changed) stable/8/sys/dev/agp/ (props changed) stable/8/sys/dev/aha/ (props changed) stable/8/sys/dev/ahb/ (props changed) stable/8/sys/dev/ahci/ (props changed) stable/8/sys/dev/aic/ (props changed) stable/8/sys/dev/aic7xxx/ (props changed) stable/8/sys/dev/alc/ (props changed) stable/8/sys/dev/ale/ (props changed) stable/8/sys/dev/amd/ (props changed) stable/8/sys/dev/amdsbwd/ (props changed) stable/8/sys/dev/amdtemp/ (props changed) stable/8/sys/dev/amr/ (props changed) stable/8/sys/dev/an/ (props changed) stable/8/sys/dev/arcmsr/ (props changed) stable/8/sys/dev/asmc/ (props changed) stable/8/sys/dev/asr/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ath/ (props changed) stable/8/sys/dev/atkbdc/ (props changed) stable/8/sys/dev/auxio/ (props changed) stable/8/sys/dev/bce/ (props changed) stable/8/sys/dev/bfe/ (props changed) stable/8/sys/dev/bge/ (props changed) stable/8/sys/dev/bktr/ (props changed) stable/8/sys/dev/bm/ (props changed) stable/8/sys/dev/buslogic/ (props changed) stable/8/sys/dev/bwi/ (props changed) stable/8/sys/dev/bwn/ (props changed) stable/8/sys/dev/cardbus/ (props changed) stable/8/sys/dev/cas/ (props changed) stable/8/sys/dev/ce/ (props changed) stable/8/sys/dev/cfe/ (props changed) stable/8/sys/dev/cfi/ (props changed) stable/8/sys/dev/ciss/ (props changed) stable/8/sys/dev/cm/ (props changed) stable/8/sys/dev/cmx/ (props changed) stable/8/sys/dev/coretemp/ (props changed) stable/8/sys/dev/cp/ (props changed) stable/8/sys/dev/cpuctl/ (props changed) stable/8/sys/dev/cpufreq/ (props changed) stable/8/sys/dev/cs/ (props changed) stable/8/sys/dev/ct/ (props changed) stable/8/sys/dev/ctau/ (props changed) stable/8/sys/dev/cx/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) stable/8/sys/dev/cy/ (props changed) stable/8/sys/dev/dc/ (props changed) stable/8/sys/dev/dcons/ (props changed) stable/8/sys/dev/de/ (props changed) stable/8/sys/dev/digi/ (props changed) stable/8/sys/dev/dpms/ (props changed) stable/8/sys/dev/dpt/ (props changed) stable/8/sys/dev/drm/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/ed/ (props changed) stable/8/sys/dev/eisa/ (props changed) stable/8/sys/dev/en/ (props changed) stable/8/sys/dev/ep/ (props changed) stable/8/sys/dev/esp/ (props changed) stable/8/sys/dev/et/ (props changed) stable/8/sys/dev/ex/ (props changed) stable/8/sys/dev/exca/ (props changed) stable/8/sys/dev/fatm/ (props changed) stable/8/sys/dev/fb/ (props changed) stable/8/sys/dev/fdc/ (props changed) stable/8/sys/dev/fe/ (props changed) stable/8/sys/dev/firewire/ (props changed) stable/8/sys/dev/flash/ (props changed) stable/8/sys/dev/fxp/ (props changed) stable/8/sys/dev/gem/ (props changed) stable/8/sys/dev/glxsb/ (props changed) stable/8/sys/dev/hatm/ (props changed) stable/8/sys/dev/hifn/ (props changed) stable/8/sys/dev/hme/ (props changed) stable/8/sys/dev/hpt27xx/ (props changed) stable/8/sys/dev/hptiop/ (props changed) stable/8/sys/dev/hptmv/ (props changed) stable/8/sys/dev/hptrr/ (props changed) stable/8/sys/dev/hwpmc/ (props changed) stable/8/sys/dev/ic/ (props changed) stable/8/sys/dev/ichsmb/ (props changed) stable/8/sys/dev/ichwd/ (props changed) stable/8/sys/dev/ida/ (props changed) stable/8/sys/dev/ie/ (props changed) stable/8/sys/dev/ieee488/ (props changed) stable/8/sys/dev/if_ndis/ (props changed) stable/8/sys/dev/iicbus/ (props changed) stable/8/sys/dev/iir/ (props changed) stable/8/sys/dev/io/ (props changed) stable/8/sys/dev/ipmi/ (props changed) stable/8/sys/dev/ips/ (props changed) stable/8/sys/dev/ipw/ (props changed) stable/8/sys/dev/isci/ (props changed) stable/8/sys/dev/iscsi/ (props changed) stable/8/sys/dev/isp/ (props changed) stable/8/sys/dev/ispfw/ (props changed) stable/8/sys/dev/iwi/ (props changed) stable/8/sys/dev/iwn/ (props changed) stable/8/sys/dev/ixgb/ (props changed) stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/jme/ (props changed) stable/8/sys/dev/joy/ (props changed) stable/8/sys/dev/kbd/ (props changed) stable/8/sys/dev/kbdmux/ (props changed) stable/8/sys/dev/ksyms/ (props changed) stable/8/sys/dev/le/ (props changed) stable/8/sys/dev/led/ (props changed) stable/8/sys/dev/lge/ (props changed) stable/8/sys/dev/lindev/ (props changed) stable/8/sys/dev/lmc/ (props changed) stable/8/sys/dev/malo/ (props changed) stable/8/sys/dev/mc146818/ (props changed) stable/8/sys/dev/mca/ (props changed) stable/8/sys/dev/mcd/ (props changed) stable/8/sys/dev/md/ (props changed) stable/8/sys/dev/mem/ (props changed) stable/8/sys/dev/mfi/ (props changed) stable/8/sys/dev/mge/ (props changed) stable/8/sys/dev/mii/ (props changed) stable/8/sys/dev/mk48txx/ (props changed) stable/8/sys/dev/mlx/ (props changed) stable/8/sys/dev/mly/ (props changed) stable/8/sys/dev/mmc/ (props changed) stable/8/sys/dev/mn/ (props changed) stable/8/sys/dev/mps/ (props changed) stable/8/sys/dev/mpt/ (props changed) stable/8/sys/dev/mse/ (props changed) stable/8/sys/dev/msk/ (props changed) stable/8/sys/dev/mvs/ (props changed) stable/8/sys/dev/mwl/ (props changed) stable/8/sys/dev/mxge/ (props changed) stable/8/sys/dev/my/ (props changed) stable/8/sys/dev/ncv/ (props changed) stable/8/sys/dev/netmap/ (props changed) stable/8/sys/dev/nfe/ (props changed) stable/8/sys/dev/nge/ (props changed) stable/8/sys/dev/nmdm/ (props changed) stable/8/sys/dev/nsp/ (props changed) stable/8/sys/dev/null/ (props changed) stable/8/sys/dev/nve/ (props changed) stable/8/sys/dev/nvram/ (props changed) stable/8/sys/dev/nxge/ (props changed) stable/8/sys/dev/oce/ (props changed) stable/8/sys/dev/ofw/ (props changed) stable/8/sys/dev/patm/ (props changed) stable/8/sys/dev/pbio/ (props changed) stable/8/sys/dev/pccard/ (props changed) stable/8/sys/dev/pccbb/ (props changed) stable/8/sys/dev/pcf/ (props changed) stable/8/sys/dev/pci/ (props changed) stable/8/sys/dev/pcn/ (props changed) stable/8/sys/dev/pdq/ (props changed) stable/8/sys/dev/powermac_nvram/ (props changed) stable/8/sys/dev/ppbus/ (props changed) stable/8/sys/dev/ppc/ (props changed) stable/8/sys/dev/pst/ (props changed) stable/8/sys/dev/puc/ (props changed) stable/8/sys/dev/quicc/ (props changed) stable/8/sys/dev/ral/ (props changed) stable/8/sys/dev/random/ (props changed) stable/8/sys/dev/rc/ (props changed) stable/8/sys/dev/re/ (props changed) stable/8/sys/dev/rndtest/ (props changed) stable/8/sys/dev/rp/ (props changed) stable/8/sys/dev/safe/ (props changed) stable/8/sys/dev/sbni/ (props changed) stable/8/sys/dev/scc/ (props changed) stable/8/sys/dev/scd/ (props changed) stable/8/sys/dev/sdhci/ (props changed) stable/8/sys/dev/sec/ (props changed) stable/8/sys/dev/sf/ (props changed) stable/8/sys/dev/sge/ (props changed) stable/8/sys/dev/si/ (props changed) stable/8/sys/dev/siba/ (props changed) stable/8/sys/dev/siis/ (props changed) stable/8/sys/dev/sio/ (props changed) stable/8/sys/dev/sis/ (props changed) stable/8/sys/dev/sk/ (props changed) stable/8/sys/dev/smbus/ (props changed) stable/8/sys/dev/smc/ (props changed) stable/8/sys/dev/sn/ (props changed) stable/8/sys/dev/snc/ (props changed) stable/8/sys/dev/snp/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/chip.h (props changed) stable/8/sys/dev/sound/clone.c (props changed) stable/8/sys/dev/sound/clone.h (props changed) stable/8/sys/dev/sound/driver.c (props changed) stable/8/sys/dev/sound/isa/ (props changed) stable/8/sys/dev/sound/macio/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) stable/8/sys/dev/sound/pcm/ (props changed) stable/8/sys/dev/sound/sbus/ (props changed) stable/8/sys/dev/sound/unit.c (props changed) stable/8/sys/dev/sound/unit.h (props changed) stable/8/sys/dev/sound/usb/ (props changed) stable/8/sys/dev/sound/version.h (props changed) stable/8/sys/dev/speaker/ (props changed) stable/8/sys/dev/spibus/ (props changed) stable/8/sys/dev/ste/ (props changed) stable/8/sys/dev/stg/ (props changed) stable/8/sys/dev/stge/ (props changed) stable/8/sys/dev/streams/ (props changed) stable/8/sys/dev/sym/ (props changed) stable/8/sys/dev/syscons/ (props changed) stable/8/sys/dev/tdfx/ (props changed) stable/8/sys/dev/ti/ (props changed) stable/8/sys/dev/tl/ (props changed) stable/8/sys/dev/tpm/ (props changed) stable/8/sys/dev/trm/ (props changed) stable/8/sys/dev/tsec/ (props changed) stable/8/sys/dev/twa/ (props changed) stable/8/sys/dev/twe/ (props changed) stable/8/sys/dev/tws/ (props changed) stable/8/sys/dev/tx/ (props changed) stable/8/sys/dev/txp/ (props changed) stable/8/sys/dev/uart/ (props changed) stable/8/sys/dev/ubsec/ (props changed) stable/8/sys/dev/usb/ (props changed) stable/8/sys/dev/utopia/ (props changed) stable/8/sys/dev/vge/ (props changed) stable/8/sys/dev/viawd/ (props changed) stable/8/sys/dev/virtio/ (props changed) stable/8/sys/dev/vkbd/ (props changed) stable/8/sys/dev/vr/ (props changed) stable/8/sys/dev/vte/ (props changed) stable/8/sys/dev/vx/ (props changed) stable/8/sys/dev/watchdog/ (props changed) stable/8/sys/dev/wb/ (props changed) stable/8/sys/dev/wbwd/ (props changed) stable/8/sys/dev/wds/ (props changed) stable/8/sys/dev/wi/ (props changed) stable/8/sys/dev/wl/ (props changed) stable/8/sys/dev/wpi/ (props changed) stable/8/sys/dev/xe/ (props changed) stable/8/sys/dev/xen/ (props changed) stable/8/sys/dev/xl/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/gdb/ (props changed) stable/8/sys/geom/ (props changed) stable/8/sys/gnu/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/ia64/ (props changed) stable/8/sys/isa/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/kgssapi/ (props changed) stable/8/sys/libkern/ (props changed) stable/8/sys/mips/ (props changed) stable/8/sys/modules/ (props changed) stable/8/sys/net/ (props changed) stable/8/sys/net80211/ (props changed) stable/8/sys/netatalk/ (props changed) stable/8/sys/netgraph/ (props changed) stable/8/sys/netinet/ (props changed) stable/8/sys/netinet6/ (props changed) stable/8/sys/netipsec/ (props changed) stable/8/sys/netipx/ (props changed) stable/8/sys/netnatm/ (props changed) stable/8/sys/netncp/ (props changed) stable/8/sys/netsmb/ (props changed) stable/8/sys/nfs/ (props changed) stable/8/sys/nfsclient/ (props changed) stable/8/sys/nfsserver/ (props changed) stable/8/sys/nlm/ (props changed) stable/8/sys/opencrypto/ (props changed) stable/8/sys/pc98/ (props changed) stable/8/sys/pci/ (props changed) stable/8/sys/powerpc/ (props changed) stable/8/sys/rpc/ (props changed) stable/8/sys/security/ (props changed) stable/8/sys/sparc64/ (props changed) stable/8/sys/sun4v/ (props changed) stable/8/sys/sys/ (props changed) stable/8/sys/tools/ (props changed) stable/8/sys/ufs/ (props changed) stable/8/sys/vm/ (props changed) stable/8/sys/x86/ (props changed) stable/8/sys/xdr/ (props changed) stable/8/sys/xen/ (props changed) Modified: stable/8/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/8/sys/geom/multipath/g_multipath.c Fri Sep 7 22:30:20 2012 (r240217) +++ stable/8/sys/geom/multipath/g_multipath.c Fri Sep 7 22:34:30 2012 (r240218) @@ -588,19 +588,26 @@ g_multipath_destroy_geom(struct gctl_req static int g_multipath_rotate(struct g_geom *gp) { - struct g_consumer *lcp; + struct g_consumer *lcp, *first_good_cp = NULL; struct g_multipath_softc *sc = gp->softc; + int active_cp_seen = 0; g_topology_assert(); if (sc == NULL) return (ENXIO); LIST_FOREACH(lcp, &gp->consumer, consumer) { if ((lcp->index & MP_BAD) == 0) { - if (sc->sc_active != lcp) + if (first_good_cp == NULL) + first_good_cp = lcp; + if (active_cp_seen) break; } + if (sc->sc_active == lcp) + active_cp_seen = 1; } - if (lcp) { + if (lcp == NULL) + lcp = first_good_cp; + if (lcp && lcp != sc->sc_active) { sc->sc_active = lcp; if (sc->sc_active_active != 1) printf("GEOM_MULTIPATH: %s is now active path in %s\n", From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 22:45:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D35106564A; Fri, 7 Sep 2012 22:45:32 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54C078FC0A; Fri, 7 Sep 2012 22:45:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q87MjWio076547; Fri, 7 Sep 2012 22:45:32 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q87MjWue076544; Fri, 7 Sep 2012 22:45:32 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201209072245.q87MjWue076544@svn.freebsd.org> From: Matt Jacob Date: Fri, 7 Sep 2012 22:45: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: r240219 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 22:45:32 -0000 Author: mjacob Date: Fri Sep 7 22:45:31 2012 New Revision: 240219 URL: http://svn.freebsd.org/changeset/base/240219 Log: Remove useless extra test. Pointed out by: Sascha of DragonFly BSD MFC after: 2 weeks Modified: head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Fri Sep 7 22:34:30 2012 (r240218) +++ head/sys/dev/isp/isp_pci.c Fri Sep 7 22:45:31 2012 (r240219) @@ -1268,8 +1268,7 @@ isp_pci_rd_reg_1080(ispsoftc_t *isp, int { uint32_t rv, oc = 0; - if ((regoff & _BLK_REG_MASK) == SXP_BLOCK || - (regoff & _BLK_REG_MASK) == (SXP_BLOCK|SXP_BANK1_SELECT)) { + if ((regoff & _BLK_REG_MASK) == SXP_BLOCK) { uint32_t tc; /* * We will assume that someone has paused the RISC processor. @@ -1301,8 +1300,7 @@ isp_pci_wr_reg_1080(ispsoftc_t *isp, int { int oc = 0; - if ((regoff & _BLK_REG_MASK) == SXP_BLOCK || - (regoff & _BLK_REG_MASK) == (SXP_BLOCK|SXP_BANK1_SELECT)) { + if ((regoff & _BLK_REG_MASK) == SXP_BLOCK) { uint32_t tc; /* * We will assume that someone has paused the RISC processor. From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 23:02:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B26991065670; Fri, 7 Sep 2012 23:02:18 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 0804E8FC19; Fri, 7 Sep 2012 23:02:17 +0000 (UTC) Received: from rnote.ddteam.net (88-243-133-95.pool.ukrtel.net [95.133.243.88]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id EF2BDC493D; Sat, 8 Sep 2012 02:02:10 +0300 (EEST) Date: Sat, 8 Sep 2012 02:02:05 +0300 From: Aleksandr Rybalko To: Bruce Evans Message-Id: <20120908020205.fd7f0c7f.ray@freebsd.org> In-Reply-To: <20120905135841.D1053@besplex.bde.org> References: <201209042316.q84NGtuA035023@svn.freebsd.org> <20120905135841.D1053@besplex.bde.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: [PATCH]Re: svn commit: r240119 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 23:02:18 -0000 Hi Bruce! Did not absorb all details of style(9) yet. But I'm working on that :) On Wed, 5 Sep 2012 14:18:40 +1000 (EST) Bruce Evans wrote: > On Tue, 4 Sep 2012, Aleksandr Rybalko wrote: > > > Log: > > Style fixes. > > > > Suggested by: mdf > > Approved by: adrian (menthor) > > The following style bugs remain. (The density of style bugs is low > enough for them to be easy to fix.) > > > Modified: head/sys/kern/subr_hints.c > > ============================================================================== > > --- head/sys/kern/subr_hints.c Tue Sep 4 23:13:24 > > 2012 (r240118) +++ head/sys/kern/subr_hints.c Tue > > Sep 4 23:16:55 2012 (r240119) @@ -31,8 +31,8 @@ __FBSDID > > ("$FreeBSD$"); > > #include > > #include > > #include > > -#include > > #include > > +#include > > Sorting this correctly would be an unrelated fix (it is a prerequisite > for most headers, since almost any header may use KASSERT()). Yeah, now I found right place for it. > > > #include > > Sorting this correctly woruld be an unrelated fix. > Yeah, kind of second for kernel. > > > > /* > > @@ -52,9 +52,9 @@ static char *hintp; > > Sorting and indenting the static variables would be an unrelated fix. I swear, I was not touch hintp. Same with checkmethod and use_kenv. :) > > > static int > > sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > A bug in svn diff is visible. The variable declaration is worse than > useless as a header for this block of code. > Did not get it. About which variable you saying? > > > { > > - int error, i, from_kenv, value, eqidx; > > const char *cp; > > char *line, *eq; > > + int eqidx, error, from_kenv, i, value; > > > > from_kenv = 0; > > cp = kern_envp; > > @@ -62,7 +62,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > > > /* Fetch candidate for new hintmode value */ > > Comments (except possibly ones at the right of code) should be real > sentences. This one is missing a ".", unlike all older comments > (not at the right of code) in this file. Fixed. > > > error = sysctl_handle_int(oidp, &value, 0, req); > > - if (error || !req->newptr) > > + if (error || req->newptr == NULL) > > return (error); > > > > if (value != 2) > > This still has a boolean test for the non-boolean `error'. Now the > older code sets a bad example in all cases where `error' is tested. Fixed. > > > @@ -73,8 +73,11 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > switch (hintmode) { > > case 0: > > if (dynamic_kenv) { > > - /* Already here */ > > - hintmode = value; /* XXX: Need we switch > > or not ? */ > > + /* > > + * Already here. But assign hintmode to 2, > > to not > > + * check it in the future. > > + */ > > Sentence breaks should be 2 spaces, as in all older comments in this > file, starting as usual with the copyright. But outside of the > copyright, the style bug of single-space sentence breaks was avoided > in this file mostly by using the larger style bug of using a new line > for most new sentences. Already start delimiting sentences with double space. When folks last time arguing about it, I found power to read only about 10 first mails. :) > > > + hintmode = 2; > > return (0); > > } > > from_kenv = 1; > > @@ -98,7 +101,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > continue; > > } > > eq = strchr(cp, '='); > > - if (!eq) > > + if (eq == NULL) > > /* Bad hint value */ > > continue; > > eqidx = eq - cp; > > Bruce Thank you very much Bruce! I am understand how much important is code style, but still on the way to that point. Patch: --------------------------------------------------------------------- Index: subr_hints.c =================================================================== --- subr_hints.c (revision 240161) +++ subr_hints.c (working copy) @@ -28,12 +28,12 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include #include -#include -#include /* * Access functions for device resources. @@ -45,7 +45,7 @@ static char *hintp; /* * Define kern.hintmode sysctl, which only accept value 2, that cause to - * switch from Static KENV mode to Dynamic KENV. So systems that have hints + * switch from Static KENV mode to Dynamic KENV. So systems that have hints * compiled into kernel will be able to see/modify KENV (and hints too). */ @@ -60,21 +60,20 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) cp = kern_envp; value = hintmode; - /* Fetch candidate for new hintmode value */ + /* Fetch candidate for new hintmode value. */ error = sysctl_handle_int(oidp, &value, 0, req); - if (error || req->newptr == NULL) + if (error != 0 || req->newptr == NULL) return (error); - if (value != 2) - /* Only accept swithing to hintmode 2 */ + if (value != 2) /* Only accept swithing to hintmode 2 */ return (EINVAL); - /* Migrate from static to dynamic hints */ + /* Migrate from static to dynamic hints. */ switch (hintmode) { case 0: if (dynamic_kenv) { /* - * Already here. But assign hintmode to 2, to not + * Already here. But assign hintmode to 2, to not * check it in the future. */ hintmode = 2; @@ -87,22 +86,21 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) cp = static_hints; break; case 2: - /* Nothing to do, hintmode already 2 */ + /* Nothing to do, if hintmode already 2. */ return (0); } - while (cp) { + while (cp != '\0') { i = strlen(cp); if (i == 0) break; if (from_kenv) { if (strncmp(cp, "hint.", 5) != 0) - /* kenv can have not only hints */ + /* kenv can have not only hints. */ continue; } eq = strchr(cp, '='); - if (eq == NULL) - /* Bad hint value */ + if (eq == NULL) /* Bad hint value */ continue; eqidx = eq - cp; --------------------------------------------------------------------- WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 01:14:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E20A8106564A; Sat, 8 Sep 2012 01:14: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 872158FC17; Sat, 8 Sep 2012 01:14:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q881EEvX095387; Sat, 8 Sep 2012 01:14:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q881EEXG095384; Sat, 8 Sep 2012 01:14:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209080114.q881EEXG095384@svn.freebsd.org> From: Adrian Chadd Date: Sat, 8 Sep 2012 01:14: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: r240223 - head/tools/tools/ath/athratestats X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 01:14:15 -0000 Author: adrian Date: Sat Sep 8 01:14:13 2012 New Revision: 240223 URL: http://svn.freebsd.org/changeset/base/240223 Log: Add a '-s ' option which will display live rate control statistics. Modified: head/tools/tools/ath/athratestats/Makefile head/tools/tools/ath/athratestats/main.c Modified: head/tools/tools/ath/athratestats/Makefile ============================================================================== --- head/tools/tools/ath/athratestats/Makefile Fri Sep 7 23:18:13 2012 (r240222) +++ head/tools/tools/ath/athratestats/Makefile Sat Sep 8 01:14:13 2012 (r240223) @@ -7,6 +7,8 @@ PROG= athratestats SRCS= main.c opt_ah.h ah_osdep.h +LDADD+= -lcurses + CLEANFILES+= opt_ah.h ah_osdep.h .include <../Makefile.inc> Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Fri Sep 7 23:18:13 2012 (r240222) +++ head/tools/tools/ath/athratestats/main.c Sat Sep 8 01:14:13 2012 (r240223) @@ -48,6 +48,8 @@ #include #include +#include + #include "ah.h" #include "ah_desc.h" #include "net80211/ieee80211_ioctl.h" @@ -57,12 +59,21 @@ #include "ath_rate/sample/sample.h" +static int do_loop = 0; + /* * This needs to be big enough to fit the two TLVs, the rate table * and the rate statistics table for a single node. */ #define STATS_BUF_SIZE 8192 +#define PRINTMSG(...) do { \ + if (do_loop == 0) \ + printf(__VA_ARGS__); \ + else \ + printw(__VA_ARGS__); \ + } while (0) + struct ath_ratestats { int s; struct ath_rateioctl re; @@ -96,12 +107,12 @@ ath_sample_stats(struct ath_ratestats *r uint32_t mask; int rix, y; - printf("static_rix (%d) ratemask 0x%x\n", + PRINTMSG("static_rix (%d) ratemask 0x%x\n", sn->static_rix, sn->ratemask); for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { - printf("[%4u] cur rate %d %s since switch: " + PRINTMSG("[%4u] cur rate %d %s since switch: " "packets %d ticks %u\n", bin_to_size(y), dot11rate(rt, sn->current_rix[y]), @@ -109,7 +120,7 @@ ath_sample_stats(struct ath_ratestats *r sn->packets_since_switch[y], sn->ticks_since_switch[y]); - printf("[%4u] last sample (%d %s) cur sample (%d %s) " + PRINTMSG("[%4u] last sample (%d %s) cur sample (%d %s) " "packets sent %d\n", bin_to_size(y), dot11rate(rt, sn->last_sample_rix[y]), @@ -118,12 +129,12 @@ ath_sample_stats(struct ath_ratestats *r dot11str(rt, sn->current_sample_rix[y]), sn->packets_sent[y]); - printf("[%4u] packets since sample %d sample tt %u\n", + PRINTMSG("[%4u] packets since sample %d sample tt %u\n", bin_to_size(y), sn->packets_since_sample[y], sn->sample_tt[y]); } - printf(" TX Rate TXTOTAL:TXOK EWMA T/ F" + PRINTMSG(" TX Rate TXTOTAL:TXOK EWMA T/ F" " avg last xmit\n"); for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) { if ((mask & 1) == 0) @@ -131,8 +142,8 @@ ath_sample_stats(struct ath_ratestats *r for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { if (sn->stats[y][rix].total_packets == 0) continue; - printf("[%2u %s:%4u] %8ju:%-8ju " - "(%3d.%1d%%) %8ju/%4d %5ums %u\n", + PRINTMSG("[%2u %s:%4u] %8ju:%-8ju " + "(%3d.%1d%%) %8ju/%4d %5uuS %u\n", dot11rate(rt, rix), dot11str(rt, rix), bin_to_size(y), @@ -223,6 +234,29 @@ rate_node_stats(struct ath_ratestats *r, ath_sample_stats(r, rt, sn); } +static void +fetch_and_print_stats(struct ath_ratestats *r, struct ether_addr *e, + uint8_t *buf) +{ + + /* Zero the buffer before it's passed in */ + memset(buf, '\0', STATS_BUF_SIZE); + + /* + * Set the station address for this lookup. + */ + ath_setsta(r, e->octet); + + /* + * Fetch the data from the driver. + */ + ath_rate_ioctl(r); + + /* + * Decode and parse statistics. + */ + rate_node_stats(r, e); +} int main(int argc, char *argv[]) @@ -233,12 +267,14 @@ main(int argc, char *argv[]) struct ether_addr *e; struct ath_ratestats r; uint8_t *buf; + useconds_t sleep_period; + float f; ifname = getenv("ATH"); if (ifname == NULL) ifname = "ath0"; - while ((c = getopt(argc, argv, "ahi:m:")) != -1) { + while ((c = getopt(argc, argv, "ahi:m:s:")) != -1) { switch (c) { case 'a': do_all = 1; @@ -249,10 +285,14 @@ main(int argc, char *argv[]) case 'm': macaddr = optarg; break; - + case 's': + sscanf(optarg, "%f", &f); + do_loop = 1; + sleep_period = (useconds_t) (f * 1000000.0); + break; default: errx(1, - "usage: %s [-h] [-i ifname] [-a] [-m macaddr]\n", + "usage: %s [-h] [-i ifname] [-a] [-m macaddr] [-s sleep period]\n", argv[0]); /* NOTREACHED */ } @@ -283,24 +323,30 @@ main(int argc, char *argv[]) if (r.s < 0) { err(1, "socket"); } + /* XXX error check */ ath_setifname(&r, ifname); - /* Zero the buffer before it's passed in */ - memset(buf, '\0', STATS_BUF_SIZE); - - /* - * Set the station address for this lookup. - */ - ath_setsta(&r, e->octet); - - /* - * Fetch the data from the driver. - */ - ath_rate_ioctl(&r); + if (do_loop) { + initscr(); + start_color(); + use_default_colors(); + cbreak(); + noecho(); + nonl(); + nodelay(stdscr, 1); + intrflush(stdscr, FALSE); + keypad(stdscr, TRUE); + + while (1) { + clear(); + move(0, 0); + fetch_and_print_stats(&r, e, buf); + refresh(); + usleep(sleep_period); + } + } else + fetch_and_print_stats(&r, e, buf); - /* - * Decode and parse statistics. - */ - rate_node_stats(&r, e); + exit(0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 01:26:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3470106564A; Sat, 8 Sep 2012 01:26:52 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA358FC16; Sat, 8 Sep 2012 01:26:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q881Qq72096947; Sat, 8 Sep 2012 01:26:52 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q881QqVd096945; Sat, 8 Sep 2012 01:26:52 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201209080126.q881QqVd096945@svn.freebsd.org> From: Rui Paulo Date: Sat, 8 Sep 2012 01:26: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: r240224 - head/sys/powerpc/wii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 01:26:52 -0000 Author: rpaulo Date: Sat Sep 8 01:26:52 2012 New Revision: 240224 URL: http://svn.freebsd.org/changeset/base/240224 Log: Add IRQ support to the resource list handling functions. Modified: head/sys/powerpc/wii/wii_bus.c Modified: head/sys/powerpc/wii/wii_bus.c ============================================================================== --- head/sys/powerpc/wii/wii_bus.c Sat Sep 8 01:14:13 2012 (r240223) +++ head/sys/powerpc/wii/wii_bus.c Sat Sep 8 01:26:52 2012 (r240224) @@ -104,6 +104,7 @@ DRIVER_MODULE(wiibus, nexus, wiibus_driv static void wiibus_identify(driver_t *driver, device_t parent) { + if (strcmp(installed_platform(), "wii") != 0) return; @@ -115,7 +116,6 @@ wiibus_identify(driver_t *driver, device static int wiibus_probe(device_t dev) { - /* Do not attach to any OF nodes that may be present */ device_set_desc(dev, "Nintendo Wii System Bus"); @@ -127,6 +127,7 @@ wiibus_init_device_resources(struct rman unsigned int rid, uintptr_t addr, size_t len, unsigned int irq) { + if (!dinfo->di_init) { resource_list_init(&dinfo->di_resources); dinfo->di_init++; @@ -246,7 +247,9 @@ wiibus_alloc_resource(device_t bus, devi } rman_set_rid(rv, *rid); break; - /* XXX IRQ */ + case SYS_RES_IRQ: + return (resource_list_alloc(&dinfo->di_resources, bus, child, + type, rid, start, end, count, flags)); default: device_printf(bus, "unknown resource request from %s\n", device_get_nameunit(child)); @@ -280,7 +283,8 @@ wiibus_activate_resource(device_t bus, d rman_set_bustag(res, &bs_be_tag); rman_set_bushandle(res, (unsigned long)p); break; - /* XXX IRQ */ + case SYS_RES_IRQ: + return (bus_activate_resource(bus, type, rid, res)); default: device_printf(bus, "unknown activate resource request from %s\n", From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 02:41:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33D191065670; Sat, 8 Sep 2012 02:41:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E2C48FC14; Sat, 8 Sep 2012 02:41:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q882fo1K005950; Sat, 8 Sep 2012 02:41:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q882foC1005948; Sat, 8 Sep 2012 02:41:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209080241.q882foC1005948@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 02:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 02:41:51 -0000 Author: eadler Date: Sat Sep 8 02:41:50 2012 New Revision: 240225 URL: http://svn.freebsd.org/changeset/base/240225 Log: MFC r230454: Use provided name when allocating ksid domain. It isn't really used on FreeBSD, but should fix a panic when pool is imported from another OS that is using this. No objections from; pjd Approved by: cperciva (implicit) Modified: stable/9/sys/cddl/compat/opensolaris/sys/sid.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/sys/sid.h ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 01:26:52 2012 (r240224) +++ stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 02:41:50 2012 (r240225) @@ -30,7 +30,7 @@ #define _OPENSOLARIS_SYS_SID_H_ typedef struct ksiddomain { - char kd_name[16]; /* Domain part of SID */ + char kd_name[1]; /* Domain part of SID */ } ksiddomain_t; typedef void ksid_t; @@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain) { ksiddomain_t *kd; - kd = kmem_alloc(sizeof(*kd), KM_SLEEP); - strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name)); + kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP); + strcpy(kd->kd_name, domain); return (kd); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 02:56:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF8E91065672; Sat, 8 Sep 2012 02:56: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 BA9078FC15; Sat, 8 Sep 2012 02:56:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q882u9cU007907; Sat, 8 Sep 2012 02:56:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q882u9fY007905; Sat, 8 Sep 2012 02:56:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209080256.q882u9fY007905@svn.freebsd.org> From: Adrian Chadd Date: Sat, 8 Sep 2012 02:56: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: r240226 - 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, 08 Sep 2012 02:56:09 -0000 Author: adrian Date: Sat Sep 8 02:56:09 2012 New Revision: 240226 URL: http://svn.freebsd.org/changeset/base/240226 Log: Correctly mask out the RTS/CTS flags when forming aggregates. This had the side effect of clearing HAL_TXDESC_CLRDMASK for a bunch of frames, meaning they'd end up being potentially filtered if there were an error. This is fine in the previous world as they'd just be software retried but now that I'm working on filtered frames, these descriptors would be endlessly retried until another valid frame would come along that had CLRDMASK set. 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 Sat Sep 8 02:41:50 2012 (r240225) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Sep 8 02:56:09 2012 (r240226) @@ -742,7 +742,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s * subsequent frame with this config. */ bf->bf_state.bfs_txflags &= - (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); bf->bf_state.bfs_txflags |= bf_first->bf_state.bfs_txflags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 03:10:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938741065670; Sat, 8 Sep 2012 03:10:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E7D18FC08; Sat, 8 Sep 2012 03:10:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q883Av10010001; Sat, 8 Sep 2012 03:10:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q883Avjc009998; Sat, 8 Sep 2012 03:10:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209080310.q883Avjc009998@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 03:10: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: r240227 - stable/7/sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 03:10:57 -0000 Author: eadler Date: Sat Sep 8 03:10:56 2012 New Revision: 240227 URL: http://svn.freebsd.org/changeset/base/240227 Log: MFC r238202: Remove ancient vnconfig symlink Approved by: cperciva (implicit) Modified: stable/7/sbin/mdconfig/Makefile Directory Properties: stable/7/sbin/mdconfig/ (props changed) Modified: stable/7/sbin/mdconfig/Makefile ============================================================================== --- stable/7/sbin/mdconfig/Makefile Sat Sep 8 02:56:09 2012 (r240226) +++ stable/7/sbin/mdconfig/Makefile Sat Sep 8 03:10:56 2012 (r240227) @@ -2,7 +2,6 @@ PROG= mdconfig MAN= mdconfig.8 -MLINKS= mdconfig.8 vnconfig.8 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 03:10:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 173EB106564A; Sat, 8 Sep 2012 03:10:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01B508FC15; Sat, 8 Sep 2012 03:10:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q883Aw6Z010036; Sat, 8 Sep 2012 03:10:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q883AwAn010034; Sat, 8 Sep 2012 03:10:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209080310.q883AwAn010034@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 03:10:58 +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: r240228 - stable/8/sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 03:10:59 -0000 Author: eadler Date: Sat Sep 8 03:10:58 2012 New Revision: 240228 URL: http://svn.freebsd.org/changeset/base/240228 Log: MFC r238202: Remove ancient vnconfig symlink Approved by: cperciva (implicit) Modified: stable/8/sbin/mdconfig/Makefile Directory Properties: stable/8/sbin/mdconfig/ (props changed) Modified: stable/8/sbin/mdconfig/Makefile ============================================================================== --- stable/8/sbin/mdconfig/Makefile Sat Sep 8 03:10:56 2012 (r240227) +++ stable/8/sbin/mdconfig/Makefile Sat Sep 8 03:10:58 2012 (r240228) @@ -2,7 +2,6 @@ PROG= mdconfig MAN= mdconfig.8 -MLINKS= mdconfig.8 vnconfig.8 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 03:11:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA19B1065781; Sat, 8 Sep 2012 03:11:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55FD38FC14; Sat, 8 Sep 2012 03:11:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q883B340010090; Sat, 8 Sep 2012 03:11:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q883B3ql010089; Sat, 8 Sep 2012 03:11:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209080311.q883B3ql010089@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 03:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240229 - stable/9/sbin/mdconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 03:11:12 -0000 Author: eadler Date: Sat Sep 8 03:11:02 2012 New Revision: 240229 URL: http://svn.freebsd.org/changeset/base/240229 Log: MFC r238202: Remove ancient vnconfig symlink Approved by: cperciva (implicit) Modified: stable/9/sbin/mdconfig/Makefile Directory Properties: stable/9/sbin/mdconfig/ (props changed) Modified: stable/9/sbin/mdconfig/Makefile ============================================================================== --- stable/9/sbin/mdconfig/Makefile Sat Sep 8 03:10:58 2012 (r240228) +++ stable/9/sbin/mdconfig/Makefile Sat Sep 8 03:11:02 2012 (r240229) @@ -2,7 +2,6 @@ PROG= mdconfig MAN= mdconfig.8 -MLINKS= mdconfig.8 vnconfig.8 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 04:35:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 784FD106564A; Sat, 8 Sep 2012 04:35:55 +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 63A9A8FC0C; Sat, 8 Sep 2012 04:35:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q884ZttL020969; Sat, 8 Sep 2012 04:35:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q884ZtMO020967; Sat, 8 Sep 2012 04:35:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209080435.q884ZtMO020967@svn.freebsd.org> From: Glen Barber Date: Sat, 8 Sep 2012 04:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240230 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 04:35:55 -0000 Author: gjb (doc,ports committer) Date: Sat Sep 8 04:35:54 2012 New Revision: 240230 URL: http://svn.freebsd.org/changeset/base/240230 Log: MFC r240077: - Fix 'distributeworld' target when WITHOUT_GAMES is set. Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Sat Sep 8 03:11:02 2012 (r240229) +++ stable/9/Makefile.inc1 Sat Sep 8 04:35:54 2012 (r240230) @@ -640,7 +640,10 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod # # Non-base distributions produced by the base system -EXTRA_DISTRIBUTIONS= doc games +EXTRA_DISTRIBUTIONS= doc +.if ${MK_GAMES} != "no" +EXTRA_DISTRIBUTIONS+= games +.endif .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 04:42:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 382C2106564A; Sat, 8 Sep 2012 04:42: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 228D68FC0A; Sat, 8 Sep 2012 04:42:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q884g9BT021704; Sat, 8 Sep 2012 04:42:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q884g9J9021702; Sat, 8 Sep 2012 04:42:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209080442.q884g9J9021702@svn.freebsd.org> From: Glen Barber Date: Sat, 8 Sep 2012 04:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240231 - stable/9/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 04:42:10 -0000 Author: gjb (doc,ports committer) Date: Sat Sep 8 04:42:09 2012 New Revision: 240231 URL: http://svn.freebsd.org/changeset/base/240231 Log: MFC r240153: - Typo fix and minor word swap. PR: 171356 Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Sep 8 04:35:54 2012 (r240230) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Sep 8 04:42:09 2012 (r240231) @@ -22,10 +22,11 @@ .\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek +.\" Copyright (c) 2012, Bryan Drewery .\" .\" $FreeBSD$ .\" -.Dd August 12, 2012 +.Dd September 5, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -1076,7 +1077,7 @@ bit is respected for the file system. Th .It Sy sharesmb Ns = Ns Cm on | off | Ar opts The .Sy sharesmb -property has currently no effect o +property currently has no effect on .Fx . .It Sy sharenfs Ns = Ns Cm on | off | Ar opts Controls whether the file system is shared via @@ -2022,7 +2023,7 @@ The default is .Pp The default can be changed to include group types. .It Fl i -Translate SID to POSIX ID. This flag has currently no effect on +Translate SID to POSIX ID. This flag currently has no effect on .Fx . .El .It Xo From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 04:42:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1767B10657BD; Sat, 8 Sep 2012 04:42:34 +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 01BF88FC08; Sat, 8 Sep 2012 04:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q884gX7I021781; Sat, 8 Sep 2012 04:42:33 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q884gXDN021778; Sat, 8 Sep 2012 04:42:33 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201209080442.q884gXDN021778@svn.freebsd.org> From: Glen Barber Date: Sat, 8 Sep 2012 04:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240232 - stable/8/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 04:42:34 -0000 Author: gjb (doc,ports committer) Date: Sat Sep 8 04:42:33 2012 New Revision: 240232 URL: http://svn.freebsd.org/changeset/base/240232 Log: MFC r240153: - Typo fix and minor word swap. PR: 171356 Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Sep 8 04:42:09 2012 (r240231) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Sep 8 04:42:33 2012 (r240232) @@ -22,10 +22,11 @@ .\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek +.\" Copyright (c) 2012, Bryan Drewery .\" .\" $FreeBSD$ .\" -.Dd August 12, 2012 +.Dd September 5, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -1076,7 +1077,7 @@ bit is respected for the file system. Th .It Sy sharesmb Ns = Ns Cm on | off | Ar opts The .Sy sharesmb -property has currently no effect o +property currently has no effect on .Fx . .It Sy sharenfs Ns = Ns Cm on | off | Ar opts Controls whether the file system is shared via @@ -2022,7 +2023,7 @@ The default is .Pp The default can be changed to include group types. .It Fl i -Translate SID to POSIX ID. This flag has currently no effect on +Translate SID to POSIX ID. This flag currently has no effect on .Fx . .El .It Xo From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 06:41:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A36F106564A; Sat, 8 Sep 2012 06:41:55 +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 0FB3D8FC14; Sat, 8 Sep 2012 06:41:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q886fsHJ037209; Sat, 8 Sep 2012 06:41:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q886fslk037192; Sat, 8 Sep 2012 06:41:54 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209080641.q886fslk037192@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 8 Sep 2012 06:41: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: r240233 - in head: . contrib/pf/man contrib/pf/pfctl sys/contrib/altq/altq sys/contrib/pf/net sys/modules/pf sys/net sys/netinet sys/netinet/ipfw sys/netinet6 sys/netipsec sys/sys usr.b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 06:41:55 -0000 Author: glebius Date: Sat Sep 8 06:41:54 2012 New Revision: 240233 URL: http://svn.freebsd.org/changeset/base/240233 Log: Merge the projects/pf/head branch, that was worked on for last six months, into head. The most significant achievements in the new code: o Fine grained locking, thus much better performance. o Fixes to many problems in pf, that were specific to FreeBSD port. New code doesn't have that many ifdefs and much less OpenBSDisms, thus is more attractive to our developers. Those interested in details, can browse through SVN log of the projects/pf/head branch. And for reference, here is exact list of revisions merged: r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330, r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656, r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782, r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868, r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223, r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456, r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505, r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168, r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230, r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398, r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548, r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672, r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169, r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442, r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522, r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661, r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212. I'd like to thank people who participated in early testing: Tested by: Florian Smeets Tested by: Chekaluk Vitaly Tested by: Ben Wilber Tested by: Ian FREISLICH Deleted: head/sys/contrib/pf/net/if_pflow.h Modified: head/UPDATING head/contrib/pf/man/pf.4 head/contrib/pf/man/pf.conf.5 head/contrib/pf/pfctl/parse.y head/contrib/pf/pfctl/pf_print_state.c head/contrib/pf/pfctl/pfctl.c head/contrib/pf/pfctl/pfctl_parser.c head/contrib/pf/pfctl/pfctl_table.c head/sys/contrib/altq/altq/altq_cbq.c head/sys/contrib/altq/altq/altq_hfsc.c head/sys/contrib/altq/altq/altq_priq.c head/sys/contrib/altq/altq/altq_subr.c head/sys/contrib/pf/net/if_pflog.c head/sys/contrib/pf/net/if_pflog.h head/sys/contrib/pf/net/if_pfsync.c head/sys/contrib/pf/net/if_pfsync.h head/sys/contrib/pf/net/pf.c head/sys/contrib/pf/net/pf_if.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_lb.c head/sys/contrib/pf/net/pf_mtag.h head/sys/contrib/pf/net/pf_norm.c head/sys/contrib/pf/net/pf_osfp.c head/sys/contrib/pf/net/pf_ruleset.c head/sys/contrib/pf/net/pf_table.c head/sys/contrib/pf/net/pfvar.h head/sys/modules/pf/Makefile head/sys/net/if.c head/sys/netinet/in_gif.c head/sys/netinet/ip_icmp.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_subr.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_gif.c head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform_ipip.c head/sys/sys/mbuf.h head/sys/sys/param.h head/usr.bin/netstat/if.c head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 8 04:42:33 2012 (r240232) +++ head/UPDATING Sat Sep 8 06:41:54 2012 (r240233) @@ -24,6 +24,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120908: + The pf(4) packet filter ABI has been changed. pfctl(8) and + snmp_pf module need to be recompiled to work with new kernel. + 20120828: A new ZFS feature flag "com.delphix:empty_bpobj" has been merged to -HEAD. Pools that have empty_bpobj in active state can not be Modified: head/contrib/pf/man/pf.4 ============================================================================== --- head/contrib/pf/man/pf.4 Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/man/pf.4 Sat Sep 8 06:41:54 2012 (r240233) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 17 2011 +.Dd June 29 2012 .Dt PF 4 .Os .Sh NAME @@ -75,6 +75,25 @@ separated by characters, similar to how file system hierarchies are laid out. The final component of the anchor path is the anchor under which operations will be performed. +.Sh SYSCTL VARIABLES AND LOADER TUNABLES +The following +.Xr loader 8 +tunables are available. +.Bl -tag -width indent +.It Va net.pf.states_hashsize +Size of hash tables that store states. +Should be power of 2. +Default value is 32768. +.It Va net.pf.source_nodes_hashsize +Size of hash table that store source nodes. +Should be power of 2. +Default value is 8192. +.El +.Pp +Read only +.Xr sysctl 8 +variables with matching names are provided to obtain current values +at runtime. .Sh IOCTL INTERFACE .Nm supports the following @@ -351,7 +370,6 @@ struct pf_status { u_int64_t scounters[SCNT_MAX]; u_int64_t pcounters[2][2][3]; u_int64_t bcounters[2][2]; - u_int64_t stateid; u_int32_t running; u_int32_t states; u_int32_t src_nodes; @@ -493,7 +511,7 @@ struct pfioc_limit { }; enum { PF_LIMIT_STATES, PF_LIMIT_SRC_NODES, PF_LIMIT_FRAGS, - PF_LIMIT_TABLES, PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_MAX }; + PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_MAX }; .Ed .It Dv DIOCGETLIMIT Fa "struct pfioc_limit *pl" Get the hard Modified: head/contrib/pf/man/pf.conf.5 ============================================================================== --- head/contrib/pf/man/pf.conf.5 Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/man/pf.conf.5 Sat Sep 8 06:41:54 2012 (r240233) @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 31 2009 +.Dd June 29 2012 .Dt PF.CONF 5 .Os .Sh NAME @@ -1421,7 +1421,7 @@ has the socket open where the packet is (depending on which socket is local). This is in addition to the normal information logged. .Pp -Due to the problems described in the BUGS section only the first packet +Only the first packet logged via .Ar log (all, user) will have the user credentials logged when using stateful matching. @@ -1479,13 +1479,6 @@ of the following keywords: .Bl -tag -width xxxxxxxxxxxxxx -compact .It Ar any Any address. -.It Ar route Aq Ar label -Any address whose associated route has label -.Aq Ar label . -See -.Xr route 4 -and -.Xr route 8 . .It Ar no-route Any address which is not currently routable. .It Ar urpf-failed @@ -1594,7 +1587,6 @@ pass in proto tcp from any to any port 2 pass in proto tcp from 10.0.0.0/8 port \*(Gt 1024 \e to ! 10.1.2.3 port != ssh pass in proto tcp from any os "OpenBSD" -pass in proto tcp from route "DTAG" .Ed .It Ar all This is equivalent to "from any to any". @@ -2949,9 +2941,9 @@ proto-list = ( proto-name | proto-nu hosts = "all" | "from" ( "any" | "no-route" | "urpf-failed" | "self" | host | - "{" host-list "}" | "route" string ) [ port ] [ os ] + "{" host-list "}" ) [ port ] [ os ] "to" ( "any" | "no-route" | "self" | host | - "{" host-list "}" | "route" string ) [ port ] + "{" host-list "}" ) [ port ] ipspec = "any" | host | "{" host-list "}" host = [ "!" ] ( address [ "/" mask-bits ] | "\*(Lt" string "\*(Gt" ) @@ -3048,28 +3040,6 @@ Protocol name database. .It Pa /etc/services Service name database. .El -.Sh BUGS -Due to a lock order reversal (LOR) with the socket layer, the use of the -.Ar group -and -.Ar user -filter parameter in conjuction with a Giant-free netstack -can result in a deadlock. -A workaround is available under the -.Va debug.pfugidhack -sysctl which is automatically enabled when a -.Ar user -/ -.Ar group -rule is added or -.Ar log (user) -is specified. -.Pp -Route labels are not supported by the -.Fx -.Xr route 4 -system. -Rules with a route label do not match any traffic. .Sh SEE ALSO .Xr altq 4 , .Xr carp 4 , @@ -3080,7 +3050,6 @@ Rules with a route label do not match an .Xr pf 4 , .Xr pflow 4 , .Xr pfsync 4 , -.Xr route 4 , .Xr tcp 4 , .Xr udp 4 , .Xr hosts 5 , @@ -3090,7 +3059,6 @@ Rules with a route label do not match an .Xr ftp-proxy 8 , .Xr pfctl 8 , .Xr pflogd 8 , -.Xr route 8 .Sh HISTORY The .Nm Modified: head/contrib/pf/pfctl/parse.y ============================================================================== --- head/contrib/pf/pfctl/parse.y Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/pfctl/parse.y Sat Sep 8 06:41:54 2012 (r240233) @@ -159,8 +159,7 @@ enum { PF_STATE_OPT_MAX, PF_STATE_OPT_NO PF_STATE_OPT_MAX_SRC_STATES, PF_STATE_OPT_MAX_SRC_CONN, PF_STATE_OPT_MAX_SRC_CONN_RATE, PF_STATE_OPT_MAX_SRC_NODES, PF_STATE_OPT_OVERLOAD, PF_STATE_OPT_STATELOCK, - PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY, - PF_STATE_OPT_PFLOW }; + PF_STATE_OPT_TIMEOUT, PF_STATE_OPT_SLOPPY, }; enum { PF_SRCTRACK_NONE, PF_SRCTRACK, PF_SRCTRACK_GLOBAL, PF_SRCTRACK_RULE }; @@ -451,7 +450,7 @@ int parseport(char *, struct range *r, i %token QUEUE PRIORITY QLIMIT RTABLE %token LOAD RULESET_OPTIMIZATION %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE -%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY PFLOW +%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS %token DIVERTTO DIVERTREPLY %token STRING @@ -2081,15 +2080,6 @@ pfrule : action dir logquick interface } r.rule_flag |= PFRULE_STATESLOPPY; break; - case PF_STATE_OPT_PFLOW: - if (r.rule_flag & PFRULE_PFLOW) { - yyerror("state pflow " - "option: multiple " - "definitions"); - YYERROR; - } - r.rule_flag |= PFRULE_PFLOW; - break; case PF_STATE_OPT_TIMEOUT: if (o->data.timeout.number == PFTM_ADAPTIVE_START || @@ -2909,26 +2899,6 @@ host : STRING { $$->next = NULL; $$->tail = $$; } - | ROUTE STRING { - $$ = calloc(1, sizeof(struct node_host)); - if ($$ == NULL) { - free($2); - err(1, "host: calloc"); - } - $$->addr.type = PF_ADDR_RTLABEL; - if (strlcpy($$->addr.v.rtlabelname, $2, - sizeof($$->addr.v.rtlabelname)) >= - sizeof($$->addr.v.rtlabelname)) { - yyerror("route label too long, max %u chars", - sizeof($$->addr.v.rtlabelname) - 1); - free($2); - free($$); - YYERROR; - } - $$->next = NULL; - $$->tail = $$; - free($2); - } ; number : NUMBER @@ -3597,14 +3567,6 @@ state_opt_item : MAXIMUM NUMBER { $$->next = NULL; $$->tail = $$; } - | PFLOW { - $$ = calloc(1, sizeof(struct node_state_opt)); - if ($$ == NULL) - err(1, "state_opt_item: calloc"); - $$->type = PF_STATE_OPT_PFLOW; - $$->next = NULL; - $$->tail = $$; - } | STRING NUMBER { int i; @@ -5320,7 +5282,6 @@ lookup(char *s) { "out", OUT}, { "overload", OVERLOAD}, { "pass", PASS}, - { "pflow", PFLOW}, { "port", PORT}, { "priority", PRIORITY}, { "priq", PRIQ}, Modified: head/contrib/pf/pfctl/pf_print_state.c ============================================================================== --- head/contrib/pf/pfctl/pf_print_state.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/pfctl/pf_print_state.c Sat Sep 8 06:41:54 2012 (r240233) @@ -119,9 +119,6 @@ print_addr(struct pf_addr_wrap *addr, sa case PF_ADDR_URPFFAILED: printf("urpf-failed"); return; - case PF_ADDR_RTLABEL: - printf("route \"%s\"", addr->v.rtlabelname); - return; default: printf("?"); return; @@ -339,8 +336,6 @@ print_state(struct pfsync_state *s, int printf(", rule %u", ntohl(s->rule)); if (s->state_flags & PFSTATE_SLOPPY) printf(", sloppy"); - if (s->state_flags & PFSTATE_PFLOW) - printf(", pflow"); if (s->sync_flags & PFSYNC_FLAG_SRCNODE) printf(", source-track"); if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE) Modified: head/contrib/pf/pfctl/pfctl.c ============================================================================== --- head/contrib/pf/pfctl/pfctl.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/pfctl/pfctl.c Sat Sep 8 06:41:54 2012 (r240233) @@ -144,7 +144,6 @@ static const struct { { "states", PF_LIMIT_STATES }, { "src-nodes", PF_LIMIT_SRC_NODES }, { "frags", PF_LIMIT_FRAGS }, - { "tables", PF_LIMIT_TABLES }, { "table-entries", PF_LIMIT_TABLE_ENTRIES }, { NULL, 0 } }; @@ -1553,9 +1552,6 @@ pfctl_fopen(const char *name, const char void pfctl_init_options(struct pfctl *pf) { - int64_t mem; - int mib[2]; - size_t size; pf->timeout[PFTM_TCP_FIRST_PACKET] = PFTM_TCP_FIRST_PACKET_VAL; pf->timeout[PFTM_TCP_OPENING] = PFTM_TCP_OPENING_VAL; @@ -1581,21 +1577,8 @@ pfctl_init_options(struct pfctl *pf) pf->limit[PF_LIMIT_STATES] = PFSTATE_HIWAT; pf->limit[PF_LIMIT_FRAGS] = PFFRAG_FRENT_HIWAT; pf->limit[PF_LIMIT_SRC_NODES] = PFSNODE_HIWAT; - pf->limit[PF_LIMIT_TABLES] = PFR_KTABLE_HIWAT; pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT; - mib[0] = CTL_HW; -#ifdef __FreeBSD__ - mib[1] = HW_PHYSMEM; -#else - mib[1] = HW_PHYSMEM64; -#endif - size = sizeof(mem); - if (sysctl(mib, 2, &mem, &size, NULL, 0) == -1) - err(1, "sysctl"); - if (mem <= 100*1024*1024) - pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT_SMALL; - pf->debug = PF_DEBUG_URGENT; } Modified: head/contrib/pf/pfctl/pfctl_parser.c ============================================================================== --- head/contrib/pf/pfctl/pfctl_parser.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/pfctl/pfctl_parser.c Sat Sep 8 06:41:54 2012 (r240233) @@ -955,12 +955,6 @@ print_rule(struct pf_rule *r, const char printf("sloppy"); opts = 0; } - if (r->rule_flag & PFRULE_PFLOW) { - if (!opts) - printf(", "); - printf("pflow"); - opts = 0; - } for (i = 0; i < PFTM_MAX; ++i) if (r->timeout[i]) { int j; Modified: head/contrib/pf/pfctl/pfctl_table.c ============================================================================== --- head/contrib/pf/pfctl/pfctl_table.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/contrib/pf/pfctl/pfctl_table.c Sat Sep 8 06:41:54 2012 (r240233) @@ -621,8 +621,7 @@ print_iface(struct pfi_kif *p, int opts) if (!(opts & PF_OPT_VERBOSE2)) return; printf("\tCleared: %s", ctime(&tzero)); - printf("\tReferences: [ States: %-18d Rules: %-18d ]\n", - p->pfik_states, p->pfik_rules); + printf("\tReferences: %-18d\n", p->pfik_rulerefs); for (i = 0; i < 8; i++) { af = (i>>2) & 1; dir = (i>>1) &1; Modified: head/sys/contrib/altq/altq/altq_cbq.c ============================================================================== --- head/sys/contrib/altq/altq/altq_cbq.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/altq/altq/altq_cbq.c Sat Sep 8 06:41:54 2012 (r240233) @@ -271,10 +271,9 @@ cbq_add_altq(struct pf_altq *a) return (ENODEV); /* allocate and initialize cbq_state_t */ - cbqp = malloc(sizeof(cbq_state_t), M_DEVBUF, M_WAITOK); + cbqp = malloc(sizeof(cbq_state_t), M_DEVBUF, M_NOWAIT | M_ZERO); if (cbqp == NULL) return (ENOMEM); - bzero(cbqp, sizeof(cbq_state_t)); CALLOUT_INIT(&cbqp->cbq_callout); cbqp->cbq_qlen = 0; cbqp->ifnp.ifq_ = &ifp->if_snd; /* keep the ifq */ Modified: head/sys/contrib/altq/altq/altq_hfsc.c ============================================================================== --- head/sys/contrib/altq/altq/altq_hfsc.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/altq/altq/altq_hfsc.c Sat Sep 8 06:41:54 2012 (r240233) @@ -200,10 +200,9 @@ hfsc_add_altq(struct pf_altq *a) if (!ALTQ_IS_READY(&ifp->if_snd)) return (ENODEV); - hif = malloc(sizeof(struct hfsc_if), M_DEVBUF, M_WAITOK); + hif = malloc(sizeof(struct hfsc_if), M_DEVBUF, M_NOWAIT | M_ZERO); if (hif == NULL) return (ENOMEM); - bzero(hif, sizeof(struct hfsc_if)); hif->hif_eligible = ellist_alloc(); if (hif->hif_eligible == NULL) { Modified: head/sys/contrib/altq/altq/altq_priq.c ============================================================================== --- head/sys/contrib/altq/altq/altq_priq.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/altq/altq/altq_priq.c Sat Sep 8 06:41:54 2012 (r240233) @@ -132,11 +132,9 @@ priq_add_altq(struct pf_altq *a) if (!ALTQ_IS_READY(&ifp->if_snd)) return (ENODEV); - pif = malloc(sizeof(struct priq_if), - M_DEVBUF, M_WAITOK); + pif = malloc(sizeof(struct priq_if), M_DEVBUF, M_NOWAIT | M_ZERO); if (pif == NULL) return (ENOMEM); - bzero(pif, sizeof(struct priq_if)); pif->pif_bandwidth = a->ifbandwidth; pif->pif_maxpri = -1; pif->pif_ifq = &ifp->if_snd; Modified: head/sys/contrib/altq/altq/altq_subr.c ============================================================================== --- head/sys/contrib/altq/altq/altq_subr.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/altq/altq/altq_subr.c Sat Sep 8 06:41:54 2012 (r240233) @@ -401,14 +401,11 @@ tbr_set(ifq, profile) return (0); } - IFQ_UNLOCK(ifq); - tbr = malloc(sizeof(struct tb_regulator), - M_DEVBUF, M_WAITOK); - if (tbr == NULL) { /* can not happen */ + tbr = malloc(sizeof(struct tb_regulator), M_DEVBUF, M_NOWAIT | M_ZERO); + if (tbr == NULL) { IFQ_UNLOCK(ifq); return (ENOMEM); } - bzero(tbr, sizeof(struct tb_regulator)); tbr->tbr_rate = TBR_SCALE(profile->rate / 8) / machclk_freq; tbr->tbr_depth = TBR_SCALE(profile->depth); @@ -420,7 +417,6 @@ tbr_set(ifq, profile) tbr->tbr_last = read_machclk(); tbr->tbr_lastop = ALTDQ_REMOVE; - IFQ_LOCK(ifq); otbr = ifq->altq_tbr; ifq->altq_tbr = tbr; /* set the new tbr */ Modified: head/sys/contrib/pf/net/if_pflog.c ============================================================================== --- head/sys/contrib/pf/net/if_pflog.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/pf/net/if_pflog.c Sat Sep 8 06:41:54 2012 (r240233) @@ -1,10 +1,10 @@ /* $OpenBSD: if_pflog.c,v 1.26 2007/10/18 21:58:18 mpf Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), - * Angelos D. Keromytis (kermit@csd.uch.gr) and + * Angelos D. Keromytis (kermit@csd.uch.gr) and * Niels Provos (provos@physnet.uni-hamburg.de). * - * This code was written by John Ioannidis for BSD/OS in Athens, Greece, + * This code was written by John Ioannidis for BSD/OS in Athens, Greece, * in November 1995. * * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996, @@ -20,7 +20,7 @@ * Permission to use, copy, and modify this software with or without fee * is hereby granted, provided that this entire notice is included in * all copies of any software which is or includes a copy or - * modification of this software. + * modification of this software. * You may use this code under the GNU public license if you so wish. Please * contribute changes back to the authors under this freer than GPL license * so that we may further the use of strong encryption without limitations to @@ -33,61 +33,34 @@ * PURPOSE. */ -#ifdef __FreeBSD__ +#include +__FBSDID("$FreeBSD$"); + #include "opt_inet.h" #include "opt_inet6.h" #include "opt_bpf.h" #include "opt_pf.h" -#include -__FBSDID("$FreeBSD$"); - -#ifdef DEV_BPF -#define NBPFILTER DEV_BPF -#else -#define NBPFILTER 0 -#endif - -#ifdef DEV_PFLOG -#define NPFLOG DEV_PFLOG -#else -#define NPFLOG 0 -#endif - -#else /* ! __FreeBSD__ */ -#include "bpfilter.h" -#include "pflog.h" -#endif /* __FreeBSD__ */ - #include -#include +#include #include +#include #include #include -#ifdef __FreeBSD__ -#include -#include -#include -#include #include -#else -#include -#endif +#include #include -#ifdef __FreeBSD__ #include -#endif +#include #include -#include -#include +#include #if defined(INET) || defined(INET6) #include #endif #ifdef INET #include -#include #include #endif @@ -96,14 +69,9 @@ __FBSDID("$FreeBSD$"); #include #endif /* INET6 */ -#include -#include - -#ifdef __FreeBSD__ #ifdef INET #include #endif /* INET */ -#endif /* __FreeBSD__ */ #define PFLOGMTU (32768 + MHLEN + MLEN) @@ -113,170 +81,82 @@ __FBSDID("$FreeBSD$"); #define DPRINTF(x) #endif -void pflogattach(int); -int pflogoutput(struct ifnet *, struct mbuf *, struct sockaddr *, -#ifdef __FreeBSD__ - struct route *); -#else - struct rtentry *); -#endif -int pflogioctl(struct ifnet *, u_long, caddr_t); -void pflogstart(struct ifnet *); -#ifdef __FreeBSD__ -static int pflog_clone_create(struct if_clone *, int, caddr_t); -static void pflog_clone_destroy(struct ifnet *); -#else -int pflog_clone_create(struct if_clone *, int); -int pflog_clone_destroy(struct ifnet *); -#endif +static int pflogoutput(struct ifnet *, struct mbuf *, struct sockaddr *, + struct route *); +static void pflogattach(int); +static int pflogioctl(struct ifnet *, u_long, caddr_t); +static void pflogstart(struct ifnet *); +static int pflog_clone_create(struct if_clone *, int, caddr_t); +static void pflog_clone_destroy(struct ifnet *); -LIST_HEAD(, pflog_softc) pflogif_list; -#ifdef __FreeBSD__ IFC_SIMPLE_DECLARE(pflog, 1); -#else -struct if_clone pflog_cloner = - IF_CLONE_INITIALIZER("pflog", pflog_clone_create, pflog_clone_destroy); -#endif struct ifnet *pflogifs[PFLOGIFS_MAX]; /* for fast access */ -void +static void pflogattach(int npflog) { int i; - LIST_INIT(&pflogif_list); for (i = 0; i < PFLOGIFS_MAX; i++) pflogifs[i] = NULL; if_clone_attach(&pflog_cloner); } -#ifdef __FreeBSD__ static int pflog_clone_create(struct if_clone *ifc, int unit, caddr_t param) -#else -int -pflog_clone_create(struct if_clone *ifc, int unit) -#endif { struct ifnet *ifp; - struct pflog_softc *pflogif; - int s; if (unit >= PFLOGIFS_MAX) return (EINVAL); - if ((pflogif = malloc(sizeof(*pflogif), - M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) - return (ENOMEM); - - pflogif->sc_unit = unit; -#ifdef __FreeBSD__ - ifp = pflogif->sc_ifp = if_alloc(IFT_PFLOG); + ifp = if_alloc(IFT_PFLOG); if (ifp == NULL) { - free(pflogif, M_DEVBUF); return (ENOSPC); } if_initname(ifp, ifc->ifc_name, unit); -#else - ifp = &pflogif->sc_if; - snprintf(ifp->if_xname, sizeof ifp->if_xname, "pflog%d", unit); -#endif - ifp->if_softc = pflogif; ifp->if_mtu = PFLOGMTU; ifp->if_ioctl = pflogioctl; ifp->if_output = pflogoutput; ifp->if_start = pflogstart; -#ifndef __FreeBSD__ - ifp->if_type = IFT_PFLOG; -#endif ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_hdrlen = PFLOG_HDRLEN; if_attach(ifp); -#ifndef __FreeBSD__ - if_alloc_sadl(ifp); -#endif -#if NBPFILTER > 0 -#ifdef __FreeBSD__ bpfattach(ifp, DLT_PFLOG, PFLOG_HDRLEN); -#else - bpfattach(&pflogif->sc_if.if_bpf, ifp, DLT_PFLOG, PFLOG_HDRLEN); -#endif -#endif - s = splnet(); -#ifdef __FreeBSD__ - /* XXX: Why pf(4) lock?! Better add a pflog lock?! */ - PF_LOCK(); -#endif - LIST_INSERT_HEAD(&pflogif_list, pflogif, sc_list); pflogifs[unit] = ifp; -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif - splx(s); return (0); } -#ifdef __FreeBSD__ static void pflog_clone_destroy(struct ifnet *ifp) -#else -int -pflog_clone_destroy(struct ifnet *ifp) -#endif { - struct pflog_softc *pflogif = ifp->if_softc; - int s; + int i; - s = splnet(); -#ifdef __FreeBSD__ - PF_LOCK(); -#endif - pflogifs[pflogif->sc_unit] = NULL; - LIST_REMOVE(pflogif, sc_list); -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif - splx(s); + for (i = 0; i < PFLOGIFS_MAX; i++) + if (pflogifs[i] == ifp) + pflogifs[i] = NULL; -#if NBPFILTER > 0 bpfdetach(ifp); -#endif if_detach(ifp); -#ifdef __FreeBSD__ if_free(ifp); -#endif - free(pflogif, M_DEVBUF); -#ifndef __FreeBSD__ - return (0); -#endif } /* * Start output on the pflog interface. */ -void +static void pflogstart(struct ifnet *ifp) { struct mbuf *m; -#ifndef __FreeBSD__ - int s; -#endif for (;;) { -#ifdef __FreeBSD__ IF_LOCK(&ifp->if_snd); _IF_DROP(&ifp->if_snd); _IF_DEQUEUE(&ifp->if_snd, m); IF_UNLOCK(&ifp->if_snd); -#else - s = splnet(); - IF_DROP(&ifp->if_snd); - IF_DEQUEUE(&ifp->if_snd, m); - splx(s); -#endif if (m == NULL) return; @@ -285,35 +165,24 @@ pflogstart(struct ifnet *ifp) } } -int +static int pflogoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, -#ifdef __FreeBSD__ struct route *rt) -#else - struct rtentry *rt) -#endif { m_freem(m); return (0); } /* ARGSUSED */ -int +static int pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { switch (cmd) { case SIOCSIFFLAGS: -#ifdef __FreeBSD__ if (ifp->if_flags & IFF_UP) ifp->if_drv_flags |= IFF_DRV_RUNNING; else ifp->if_drv_flags &= ~IFF_DRV_RUNNING; -#else - if (ifp->if_flags & IFF_UP) - ifp->if_flags |= IFF_RUNNING; - else - ifp->if_flags &= ~IFF_RUNNING; -#endif break; default: return (ENOTTY); @@ -322,12 +191,11 @@ pflogioctl(struct ifnet *ifp, u_long cmd return (0); } -int +static int pflog_packet(struct pfi_kif *kif, struct mbuf *m, sa_family_t af, u_int8_t dir, u_int8_t reason, struct pf_rule *rm, struct pf_rule *am, - struct pf_ruleset *ruleset, struct pf_pdesc *pd) + struct pf_ruleset *ruleset, struct pf_pdesc *pd, int lookupsafe) { -#if NBPFILTER > 0 struct ifnet *ifn; struct pfloghdr hdr; @@ -354,23 +222,18 @@ pflog_packet(struct pfi_kif *kif, struct strlcpy(hdr.ruleset, ruleset->anchor->name, sizeof(hdr.ruleset)); } - if (rm->log & PF_LOG_SOCKET_LOOKUP && !pd->lookup.done) -#ifdef __FreeBSD__ - /* - * XXX: This should not happen as we force an early lookup - * via debug.pfugidhack - */ - ; /* empty */ -#else - pd->lookup.done = pf_socket_lookup(dir, pd); -#endif - if (pd->lookup.done > 0) { + /* + * XXXGL: we avoid pf_socket_lookup() when we are holding + * state lock, since this leads to unsafe LOR. + * These conditions are very very rare, however. + */ + if (rm->log & PF_LOG_SOCKET_LOOKUP && !pd->lookup.done && lookupsafe) + pd->lookup.done = pf_socket_lookup(dir, pd, m); + if (pd->lookup.done > 0) hdr.uid = pd->lookup.uid; - hdr.pid = pd->lookup.pid; - } else { + else hdr.uid = UID_MAX; - hdr.pid = NO_PID; - } + hdr.pid = NO_PID; hdr.rule_uid = rm->cuid; hdr.rule_pid = rm->cpid; hdr.dir = dir; @@ -387,18 +250,11 @@ pflog_packet(struct pfi_kif *kif, struct ifn->if_opackets++; ifn->if_obytes += m->m_pkthdr.len; -#ifdef __FreeBSD__ BPF_MTAP2(ifn, &hdr, PFLOG_HDRLEN, m); -#else - bpf_mtap_hdr(ifn->if_bpf, (char *)&hdr, PFLOG_HDRLEN, m, - BPF_DIRECTION_OUT); -#endif -#endif return (0); } -#ifdef __FreeBSD__ static int pflog_modevent(module_t mod, int type, void *data) { @@ -407,14 +263,14 @@ pflog_modevent(module_t mod, int type, v switch (type) { case MOD_LOAD: pflogattach(1); - PF_LOCK(); + PF_RULES_WLOCK(); pflog_packet_ptr = pflog_packet; - PF_UNLOCK(); + PF_RULES_WUNLOCK(); break; case MOD_UNLOAD: - PF_LOCK(); + PF_RULES_WLOCK(); pflog_packet_ptr = NULL; - PF_UNLOCK(); + PF_RULES_WUNLOCK(); if_clone_detach(&pflog_cloner); break; default: @@ -432,4 +288,3 @@ static moduledata_t pflog_mod = { "pflog DECLARE_MODULE(pflog, pflog_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(pflog, PFLOG_MODVER); MODULE_DEPEND(pflog, pf, PF_MODVER, PF_MODVER, PF_MODVER); -#endif /* __FreeBSD__ */ Modified: head/sys/contrib/pf/net/if_pflog.h ============================================================================== --- head/sys/contrib/pf/net/if_pflog.h Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/pf/net/if_pflog.h Sat Sep 8 06:41:54 2012 (r240233) @@ -29,16 +29,6 @@ #define PFLOGIFS_MAX 16 -struct pflog_softc { -#ifdef __FreeBSD__ - struct ifnet *sc_ifp; /* the interface pointer */ -#else - struct ifnet sc_if; /* the interface */ -#endif - int sc_unit; - LIST_ENTRY(pflog_softc) sc_list; -}; - #define PFLOG_RULESET_NAME_SIZE 16 struct pfloghdr { @@ -62,40 +52,15 @@ struct pfloghdr { /* minus pad, also used as a signature */ #define PFLOG_REAL_HDRLEN offsetof(struct pfloghdr, pad) -/* XXX remove later when old format logs are no longer needed */ -struct old_pfloghdr { - u_int32_t af; - char ifname[IFNAMSIZ]; - short rnr; - u_short reason; - u_short action; - u_short dir; -}; -#define OLD_PFLOG_HDRLEN sizeof(struct old_pfloghdr) - #ifdef _KERNEL -#ifdef __FreeBSD__ struct pf_rule; struct pf_ruleset; struct pfi_kif; struct pf_pdesc; -#if 0 -typedef int pflog_packet_t(struct pfi_kif *, struct mbuf *, sa_family_t, - u_int8_t, u_int8_t, struct pf_rule *, struct pf_rule *, - struct pf_ruleset *, struct pf_pdesc *); -extern pflog_packet_t *pflog_packet_ptr; -#endif -#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g,h) do { \ +#define PFLOG_PACKET(i,a,b,c,d,e,f,g,h,di) do { \ if (pflog_packet_ptr != NULL) \ - pflog_packet_ptr(i,a,b,c,d,e,f,g,h); \ + pflog_packet_ptr(i,a,b,c,d,e,f,g,h,di); \ } while (0) -#else /* ! __FreeBSD__ */ -#if NPFLOG > 0 -#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g,h) pflog_packet(i,a,b,c,d,e,f,g,h) -#else -#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g,h) ((void)0) -#endif /* NPFLOG > 0 */ -#endif #endif /* _KERNEL */ #endif /* _NET_IF_PFLOG_H_ */ Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sat Sep 8 04:42:33 2012 (r240232) +++ head/sys/contrib/pf/net/if_pfsync.c Sat Sep 8 06:41:54 2012 (r240233) @@ -54,91 +54,44 @@ * 1.173 - correct expire time processing */ -#ifdef __FreeBSD__ -#include "opt_inet.h" -#include "opt_inet6.h" -#include "opt_pf.h" - #include __FBSDID("$FreeBSD$"); -#define NBPFILTER 1 -#endif /* __FreeBSD__ */ +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_pf.h" #include -#include -#ifdef __FreeBSD__ #include +#include #include -#include -#endif -#include -#include -#include +#include +#include #include -#include -#ifdef __FreeBSD__ -#include -#include #include -#include -#include -#include #include +#include #include -#else -#include -#include -#endif +#include +#include #include -#ifndef __FreeBSD__ -#include -#endif +#include #include -#ifdef __FreeBSD__ #include -#endif #include -#include -#include -#include -#ifdef __FreeBSD__ -#include -#endif +#include +#include -#include #include -#include -#include - -#ifdef INET -#include +#include #include #include -#include -#endif - -#ifdef INET6 -#include -#endif /* INET6 */ - -#ifdef __FreeBSD__ -#include -#else -#include "carp.h" -#if NCARP > 0 #include -#endif -#endif - -#include -#include - -#ifndef __FreeBSD__ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 07:12:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 201BE106566C; Sat, 8 Sep 2012 07:12:01 +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 000CF8FC08; Sat, 8 Sep 2012 07:12:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q887C0p8041584; Sat, 8 Sep 2012 07:12:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q887C02N041580; Sat, 8 Sep 2012 07:12:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201209080712.q887C02N041580@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 8 Sep 2012 07:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240234 - head/contrib/bsnmp/snmpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 07:12:01 -0000 Author: glebius Date: Sat Sep 8 07:12:00 2012 New Revision: 240234 URL: http://svn.freebsd.org/changeset/base/240234 Log: The first part of check_priv() function, that attempts to obtain creds from the control message, actually never worked. This means check_priv() didn't work for local dgram sockets. The SCM_CREDS control messages is received only in two cases: 1) If we did setsockopt(LOCAL_CREDS) on our socket, and in this case the message is struct sockcred. 2) If sender did supplied SCM_CREDS control message in his sendmsg() syscall. In this case the message is struct cmsgcred. We can't rely on 2), so we will use 1) for dgram sockets. For stream sockets it is more reliable to obtain accept-time credentials, since SCM_CREDS control message is attached only on first read. Thus: o Do setsockopt(LOCAL_CREDS) on local dgram sockets. o Split check_priv() into check_priv_stream() and check_priv_dgram(), and call them from recv_stream() and recv_dgram() respectively. o Don't provide space for SCM_CREDS control message in recv_stream(). o Provide space for SCM_CREDS control message in recv_dgram(), but there is no need to initialize anything in it. o In recv_dgram() do not blindly expect that first message is SCM_CREDS, instead use correct search cycle through control messages. Modified: head/contrib/bsnmp/snmpd/main.c head/contrib/bsnmp/snmpd/trans_lsock.c Modified: head/contrib/bsnmp/snmpd/main.c ============================================================================== --- head/contrib/bsnmp/snmpd/main.c Sat Sep 8 06:41:54 2012 (r240233) +++ head/contrib/bsnmp/snmpd/main.c Sat Sep 8 07:12:00 2012 (r240234) @@ -1026,34 +1026,31 @@ snmp_input_consume(struct port_input *pi pi->length -= pi->consumed; } -struct credmsg { - struct cmsghdr hdr; - struct cmsgcred cred; -}; +static void +check_priv_dgram(struct port_input *pi, struct sockcred *cred) +{ + + /* process explicitly sends credentials */ + if (cred) + pi->priv = (cred->sc_euid == 0); + else + pi->priv = 0; +} static void -check_priv(struct port_input *pi, struct msghdr *msg) +check_priv_stream(struct port_input *pi) { - struct credmsg *cmsg; struct xucred ucred; socklen_t ucredlen; - pi->priv = 0; - - if (msg->msg_controllen == sizeof(*cmsg)) { - /* process explicitly sends credentials */ - - cmsg = (struct credmsg *)msg->msg_control; - pi->priv = (cmsg->cred.cmcred_euid == 0); - return; - } - - /* ok, obtain the accept time credentials */ + /* obtain the accept time credentials */ ucredlen = sizeof(ucred); if (getsockopt(pi->fd, 0, LOCAL_PEERCRED, &ucred, &ucredlen) == 0 && ucredlen >= sizeof(ucred) && ucred.cr_version == XUCRED_VERSION) pi->priv = (ucred.cr_uid == 0); + else + pi->priv = 0; } /* @@ -1065,7 +1062,6 @@ recv_stream(struct port_input *pi) struct msghdr msg; struct iovec iov[1]; ssize_t len; - struct credmsg cmsg; if (pi->buf == NULL) { /* no buffer yet - allocate one */ @@ -1084,17 +1080,8 @@ recv_stream(struct port_input *pi) msg.msg_namelen = pi->peerlen; msg.msg_iov = iov; msg.msg_iovlen = 1; - if (pi->cred) { - msg.msg_control = &cmsg; - msg.msg_controllen = sizeof(cmsg); - - cmsg.hdr.cmsg_len = sizeof(cmsg); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - } else { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } + msg.msg_control = NULL; + msg.msg_controllen = 0; msg.msg_flags = 0; iov[0].iov_base = pi->buf + pi->length; @@ -1109,7 +1096,7 @@ recv_stream(struct port_input *pi) pi->length += len; if (pi->cred) - check_priv(pi, &msg); + check_priv_stream(pi); return (0); } @@ -1122,10 +1109,12 @@ static int recv_dgram(struct port_input *pi) { u_char embuf[1000]; + char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX))]; struct msghdr msg; struct iovec iov[1]; ssize_t len; - struct credmsg cmsg; + struct cmsghdr *cmsg; + struct sockcred *cred = NULL; if (pi->buf == NULL) { /* no buffer yet - allocate one */ @@ -1145,17 +1134,9 @@ recv_dgram(struct port_input *pi) msg.msg_namelen = pi->peerlen; msg.msg_iov = iov; msg.msg_iovlen = 1; - if (pi->cred) { - msg.msg_control = &cmsg; - msg.msg_controllen = sizeof(cmsg); - - cmsg.hdr.cmsg_len = sizeof(cmsg); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - } else { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } + memset(cbuf, 0, sizeof(cbuf)); + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); msg.msg_flags = 0; iov[0].iov_base = pi->buf; @@ -1176,8 +1157,15 @@ recv_dgram(struct port_input *pi) pi->length = (size_t)len; + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; + cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_CREDS) + cred = (struct sockcred *)CMSG_DATA(cmsg); + } + if (pi->cred) - check_priv(pi, &msg); + check_priv_dgram(pi, cred); return (0); } Modified: head/contrib/bsnmp/snmpd/trans_lsock.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_lsock.c Sat Sep 8 06:41:54 2012 (r240233) +++ head/contrib/bsnmp/snmpd/trans_lsock.c Sat Sep 8 07:12:00 2012 (r240234) @@ -343,6 +343,7 @@ lsock_init_port(struct tport *tp) } } else { struct lsock_peer *peer; + const int on = 1; peer = LIST_FIRST(&p->peers); @@ -351,6 +352,14 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_RES_UNAVAIL); } + if (setsockopt(peer->input.fd, 0, LOCAL_CREDS, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(LOCAL_CREDS): %m"); + close(peer->input.fd); + peer->input.fd = -1; + return (SNMP_ERR_GENERR); + } + strcpy(sa.sun_path, p->name); sa.sun_family = AF_LOCAL; sa.sun_len = strlen(p->name) + From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 08:46:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB7CE106564A; Sat, 8 Sep 2012 08:46:44 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95FFB8FC0C; Sat, 8 Sep 2012 08:46:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q888kibK054003; Sat, 8 Sep 2012 08:46:44 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q888kioM054001; Sat, 8 Sep 2012 08:46:44 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209080846.q888kioM054001@svn.freebsd.org> From: Joel Dahl Date: Sat, 8 Sep 2012 08:46: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: r240235 - head/usr.sbin/ppp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 08:46:44 -0000 Author: joel (doc committer) Date: Sat Sep 8 08:46:43 2012 New Revision: 240235 URL: http://svn.freebsd.org/changeset/base/240235 Log: mdoc fixes. Modified: head/usr.sbin/ppp/ppp.8.m4 Modified: head/usr.sbin/ppp/ppp.8.m4 ============================================================================== --- head/usr.sbin/ppp/ppp.8.m4 Sat Sep 8 07:12:00 2012 (r240234) +++ head/usr.sbin/ppp/ppp.8.m4 Sat Sep 8 08:46:43 2012 (r240235) @@ -292,7 +292,7 @@ In direct mode, acts as server which accepts incoming .Em PPP connections on stdin/stdout. -.It "Supports PAP and CHAP (rfc 1994, 2433 and 2759) authentication. +.It Supports PAP and CHAP (rfc 1994, 2433 and 2759) authentication. With PAP or CHAP, it is possible to skip the Unix style .Xr login 1 procedure, and use the @@ -1019,12 +1019,11 @@ This behaviour can be changed using the .Dq set redial command: .Pp -.No set redial Ar secs Ns Xo +.No set redial Ar secs Ns .Oo + Ns Ar inc Ns -.Op - Ns Ar max Ns -.Oc Ns Op . Ns Ar next +.Oo - Ns Ar max Ns Oc Oc Ns +.Op . Ns Ar next .Op Ar attempts -.Xc .Pp .Bl -tag -width attempts -compact .It Ar secs @@ -1083,7 +1082,6 @@ are specified, the total number of attem attempt each number 4 times). .Pp Alternatively, -.Pp .Bd -literal -offset indent set redial 10+10-5.3 20 .Ed @@ -2029,11 +2027,8 @@ dialing and redialing separated by eithe or a colon .Pq Dq \&: : .Bd -ragged -offset indent -.No set phone Ar telno Ns Xo -.Oo \&| Ns Ar backupnumber -.Oc Ns ... Ns Oo : Ns Ar nextnumber -.Oc Ns ... -.Xc +.No set phone Ar telno Ns +.Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... .Ed .Pp Numbers after the first in a pipe-separated list are only used if the @@ -2530,7 +2525,6 @@ will show the same information at the link level. .Pp Armed with this information, the following configuration might be used: -.Pp .Bd -literal -offset indent mp: set timeout 0 @@ -2554,13 +2548,11 @@ Usually, the link will be configured fir If you wish all links to be up all the time, you can add the following line to the end of your configuration. -.Pp .Bd -literal -offset indent link 1,2,3 set mode ddial .Ed .Pp If you want the links to dial on demand, this command could be used: -.Pp .Bd -literal -offset indent link * set mode auto .Ed @@ -2570,7 +2562,6 @@ Links may be tied to specific names by r line above, and specifying the following after the .Dq clone command: -.Pp .Bd -literal -offset indent link 1 set device /dev/cuad0 link 2 set device /dev/cuad1 @@ -3218,9 +3209,7 @@ Disabling this option will prevent the r although the .Sq stick route list will still be maintained. -.It Op tcp Ns Xo -.No mssfixup -.Xc +.It Oo tcp Oc Ns No mssfixup Default: Enabled. This option tells .Nm @@ -3474,7 +3463,7 @@ be logged to the file .Ar remotePort Ns .Oo .No - Ns Ar remotePort -.Oc Ns +.Oc .Oc .Xc This command causes incoming @@ -3606,7 +3595,7 @@ These commands are also discussed in the .Pa README.nat which comes with the source distribution. .Pp -.It Op !\& Ns Xo +.It Oo !\& Oc Ns Xo .No bg Ar command .Xc The given @@ -3808,7 +3797,7 @@ command is used .Dq !\& ) , .Nm will not complain if the route does not already exist. -.It dial|call Op Ar label Ns Xo +.It dial|call Oo Ar label Oc Ns Xo .No ... .Xc This command is the equivalent of @@ -3945,10 +3934,9 @@ When invoked with .Ar sub-command , only the synopsis for the given sub-command is shown. .El -.It Op data Ns Xo +.It Oo data Oc Ns Xo .No link -.Ar name Ns Op , Ns Ar name Ns -.No ... Ar command Op Ar args +.Ar name Ns Oo , Ns Ar name Oc Ns ... Ar command Op Ar args .Xc This command may prefix any other command if the user wishes to specify which link the command should affect. @@ -3970,7 +3958,7 @@ is .Dq * , .Ar command is executed on all links. -.It load Op Ar label Ns Xo +.It load Oo Ar label Oc Ns Xo .No ... .Xc Load the given @@ -4196,7 +4184,7 @@ certain characters from end to end (such .Pp For the XON/XOFF scenario, use .Dq set accmap 000a0000 . -.It set Op auth Ns Xo +.It set Oo auth Oc Ns Xo .No key Ar value .Xc This sets the authentication key (or password) used in client mode @@ -4360,7 +4348,6 @@ as an option. The .Ar option Ns No s are as follows (in this order of preference): -.Pp .Bl -tag -width Ds .It auth The callee is expected to decide the callback number based on @@ -4993,11 +4980,8 @@ If you wish to assign a dynamic IP numbe .Ar hisaddr may also be specified as a range of IP numbers in the format .Bd -ragged -offset indent -.Ar \&IP Ns Oo \&- Ns Ar \&IP Ns Xo -.Oc Ns Oo , Ns Ar \&IP Ns -.Op \&- Ns Ar \&IP Ns -.Oc Ns ... -.Xc +.Ar \&IP Ns Oo \&- Ns Ar \&IP Ns Oc Ns Oo , Ns Ar \&IP Ns +.Oo \&- Ns Ar \&IP Ns Oc Oc Ns ... .Ed .Pp for example: @@ -5319,10 +5303,7 @@ This allows the line parity to be set. The default value is .Ar none . .It set phone Ar telno Ns Xo -.Oo \&| Ns Ar backupnumber -.Oc Ns ... Ns Oo : Ns Ar nextnumber -.Oc Ns ... -.Xc +.Oo \&| Ns Ar backupnumber Oc Ns ... Ns Oo : Ns Ar nextnumber Oc Ns ... Xc This allows the specification of the phone number to be used in place of the \\\\T string in the dial and login chat scripts. Multiple phone numbers may be given separated either by a pipe @@ -5350,7 +5331,7 @@ This option configures the underlying .Xr ng_pppoe 4 node to either standard RFC2516 PPPoE or proprietary 3Com mode. If not set the system default will be used. -.It set Op proc Ns Xo +.It set Oo proc Oc Ns Xo .No title Op Ar value .Xc The current process title as displayed by @@ -5599,7 +5580,6 @@ NAS-Port-Id. The .Ar option Ns No s are as follows: -.Pp .Bl -tag -width Ds .It pid PID of the corresponding tunnel. @@ -5634,8 +5614,8 @@ If is unspecified or zero, the default kernel controlled value is used. .It set redial Ar secs Ns Xo .Oo + Ns Ar inc Ns -.Op - Ns Ar max Ns -.Oc Ns Op . Ns Ar next +.Oo - Ns Ar max Ns Oc Oc Ns +.Op . Ns Ar next .Op Ar attempts .Xc .Nm @@ -5935,7 +5915,7 @@ Show the current IPCP statistics. Show the protocol layers currently in use. .It show lcp Show the current LCP statistics. -.It show Op data Ns Xo +.It show Oo data Oc Ns Xo .No link .Xc Show high level link information. From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 11:34:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7611065672; Sat, 8 Sep 2012 11:34:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8E448FC12; Sat, 8 Sep 2012 11:34:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88BYMY8078292; Sat, 8 Sep 2012 11:34:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88BYMLe078287; Sat, 8 Sep 2012 11:34:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201209081134.q88BYMLe078287@svn.freebsd.org> From: Dimitry Andric Date: Sat, 8 Sep 2012 11:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240236 - in stable/9: gnu/lib/libstdc++ gnu/lib/libsupc++ lib/libc++ share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 11:34:23 -0000 Author: dim Date: Sat Sep 8 11:34:22 2012 New Revision: 240236 URL: http://svn.freebsd.org/changeset/base/240236 Log: MFC r239680: Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions) to libc++.a and libc++_p.a, to make static linking of C++ executables with libc++ easier. This is similar to the approach used in libstdc++. MFC r239686: When using -stdlib=libc++, add the correct dependency to .depend in bsd.prog.mk. Submitted by: Yamaya Takashi MFC r239695: For building libstdc++ and libsupc++, filter out any -stdlib=libc++ option from CXXFLAGS, otherwise these libraries will not build. Similarly, filter out any -std=xxx options that aren't supported. Submitted by: Yamaya Takashi Modified: stable/9/gnu/lib/libstdc++/Makefile stable/9/gnu/lib/libsupc++/Makefile stable/9/lib/libc++/Makefile stable/9/share/mk/bsd.prog.mk Directory Properties: stable/9/gnu/lib/libstdc++/ (props changed) stable/9/gnu/lib/libsupc++/ (props changed) stable/9/lib/libc++/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/gnu/lib/libstdc++/Makefile ============================================================================== --- stable/9/gnu/lib/libstdc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/gnu/lib/libstdc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -22,6 +22,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} Modified: stable/9/gnu/lib/libsupc++/Makefile ============================================================================== --- stable/9/gnu/lib/libsupc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/gnu/lib/libsupc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -24,6 +24,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h Modified: stable/9/lib/libc++/Makefile ============================================================================== --- stable/9/lib/libc++/Makefile Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/lib/libc++/Makefile Sat Sep 8 11:34:22 2012 (r240236) @@ -35,8 +35,25 @@ SRCS+= algorithm.cpp\ utility.cpp\ valarray.cpp +CXXRT_SRCS+= libelftc_dem_gnu3.c\ + terminate.cc\ + dynamic_cast.cc\ + memory.cc\ + auxhelper.cc\ + exception.cc\ + stdexcept.cc\ + typeinfo.cc\ + guard.cc + +.for _S in ${CXXRT_SRCS} +STATICOBJS+= cxxrt_${_S:R}.o +cxxrt_${_S}: + ln -sf ${LIBCXXRTDIR}/${_S} ${.TARGET} +.endfor + WARNS= 0 -CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT +CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT +CXXFLAGS+= -std=c++0x DPADD= ${LIBCXXRT} LDADD= -lcxxrt Modified: stable/9/share/mk/bsd.prog.mk ============================================================================== --- stable/9/share/mk/bsd.prog.mk Sat Sep 8 08:46:43 2012 (r240235) +++ stable/9/share/mk/bsd.prog.mk Sat Sep 8 11:34:22 2012 (r240236) @@ -131,10 +131,14 @@ _EXTRADEPEND: .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) +.if !empty(CXXFLAGS:M-stdlib=libc++) + echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} +.else echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif .endif +.endif .if !target(install) From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 12:45:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42B08106564A; Sat, 8 Sep 2012 12:45:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A94B58FC08; Sat, 8 Sep 2012 12:45:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88Cjm3t086885; Sat, 8 Sep 2012 12:45:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88Cjmon086882; Sat, 8 Sep 2012 12:45:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209081245.q88Cjmon086882@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 12:45: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: r240237 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 12:45:49 -0000 Author: eadler Date: Sat Sep 8 12:45:47 2012 New Revision: 240237 URL: http://svn.freebsd.org/changeset/base/240237 Log: Revert r239049: This is the way to assign a range, but not a single IPv4 address. PR: conf/167648 Approved by: cperciva (implicit) Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Sep 8 11:34:22 2012 (r240236) +++ head/share/man/man5/rc.conf.5 Sat Sep 8 12:45:47 2012 (r240237) @@ -1201,7 +1201,7 @@ on with the vlan tag 101 and the optional the IPv4 address 192.0.2.1/24: .Bd -literal vlans_em0="101" -ipv4_addrs_em0_101="192.0.2.1/24" +ifconfig_em0_101="inet 192.0.2.1/24" .Ed .Pp To create a vlan device named From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 16:40:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E9E3106568F; Sat, 8 Sep 2012 16:40:19 +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 85D4F8FC14; Sat, 8 Sep 2012 16:40:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88GeJ82021914; Sat, 8 Sep 2012 16:40:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88GeJm1021891; Sat, 8 Sep 2012 16:40:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209081640.q88GeJm1021891@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 Sep 2012 16:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240238 - in stable/9/sys: arm/arm dev/agp dev/md fs/nfsclient fs/nwfs fs/smbfs fs/tmpfs ia64/ia64 kern net nfsclient ofed/include/linux ufs/ffs 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: Sat, 08 Sep 2012 16:40:19 -0000 Author: kib Date: Sat Sep 8 16:40:18 2012 New Revision: 240238 URL: http://svn.freebsd.org/changeset/base/240238 Log: MFC r239065: Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it. Modified: stable/9/sys/arm/arm/pmap.c stable/9/sys/dev/agp/agp.c stable/9/sys/dev/agp/agp_i810.c stable/9/sys/dev/md/md.c stable/9/sys/fs/nfsclient/nfs_clbio.c stable/9/sys/fs/nwfs/nwfs_io.c stable/9/sys/fs/smbfs/smbfs_io.c stable/9/sys/fs/tmpfs/tmpfs_subr.c stable/9/sys/fs/tmpfs/tmpfs_vnops.c stable/9/sys/ia64/ia64/pmap.c stable/9/sys/kern/kern_proc.c stable/9/sys/kern/subr_uio.c stable/9/sys/kern/uipc_syscalls.c stable/9/sys/net/bpf_zerocopy.c stable/9/sys/nfsclient/nfs_bio.c stable/9/sys/ofed/include/linux/gfp.h stable/9/sys/ufs/ffs/ffs_vnops.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/vm_page.h stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/arm/arm/pmap.c ============================================================================== --- stable/9/sys/arm/arm/pmap.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/arm/arm/pmap.c Sat Sep 8 16:40:18 2012 (r240238) @@ -154,6 +154,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -165,7 +166,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: stable/9/sys/dev/agp/agp.c ============================================================================== --- stable/9/sys/dev/agp/agp.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/dev/agp/agp.c Sat Sep 8 16:40:18 2012 (r240238) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/dev/agp/agp_i810.c ============================================================================== --- stable/9/sys/dev/agp/agp_i810.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/dev/agp/agp_i810.c Sat Sep 8 16:40:18 2012 (r240238) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/dev/md/md.c ============================================================================== --- stable/9/sys/dev/md/md.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/dev/md/md.c Sat Sep 8 16:40:18 2012 (r240238) @@ -84,14 +84,13 @@ #include #include +#include #include #include #include #include #include -#include - #define MD_MODVER 1 #define MD_SHUTDOWN 0x10000 /* Tell worker thread to terminate. */ Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clbio.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/fs/nfsclient/nfs_clbio.c Sat Sep 8 16:40:18 2012 (r240238) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/fs/nwfs/nwfs_io.c ============================================================================== --- stable/9/sys/fs/nwfs/nwfs_io.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/fs/nwfs/nwfs_io.c Sat Sep 8 16:40:18 2012 (r240238) @@ -38,6 +38,7 @@ #include #include +#include #include #include #include Modified: stable/9/sys/fs/smbfs/smbfs_io.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_io.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/fs/smbfs/smbfs_io.c Sat Sep 8 16:40:18 2012 (r240238) @@ -41,6 +41,7 @@ #include #include +#include #include #include #include Modified: stable/9/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_subr.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/fs/tmpfs/tmpfs_subr.c Sat Sep 8 16:40:18 2012 (r240238) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Sep 8 16:40:18 2012 (r240238) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/ia64/ia64/pmap.c ============================================================================== --- stable/9/sys/ia64/ia64/pmap.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/ia64/ia64/pmap.c Sat Sep 8 16:40:18 2012 (r240238) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/kern/kern_proc.c Sat Sep 8 16:40:18 2012 (r240238) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #endif #include +#include #include #include #include Modified: stable/9/sys/kern/subr_uio.c ============================================================================== --- stable/9/sys/kern/subr_uio.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/kern/subr_uio.c Sat Sep 8 16:40:18 2012 (r240238) @@ -53,11 +53,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #ifdef ZERO_COPY_SOCKETS -#include #include #endif Modified: stable/9/sys/kern/uipc_syscalls.c ============================================================================== --- stable/9/sys/kern/uipc_syscalls.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/kern/uipc_syscalls.c Sat Sep 8 16:40:18 2012 (r240238) @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/net/bpf_zerocopy.c ============================================================================== --- stable/9/sys/net/bpf_zerocopy.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/net/bpf_zerocopy.c Sat Sep 8 16:40:18 2012 (r240238) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/nfsclient/nfs_bio.c ============================================================================== --- stable/9/sys/nfsclient/nfs_bio.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/nfsclient/nfs_bio.c Sat Sep 8 16:40:18 2012 (r240238) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/ofed/include/linux/gfp.h ============================================================================== --- stable/9/sys/ofed/include/linux/gfp.h Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/ofed/include/linux/gfp.h Sat Sep 8 16:40:18 2012 (r240238) @@ -34,6 +34,7 @@ #include +#include #include #include #include Modified: stable/9/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_vnops.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/ufs/ffs/ffs_vnops.c Sat Sep 8 16:40:18 2012 (r240238) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/vm/device_pager.c ============================================================================== --- stable/9/sys/vm/device_pager.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/vm/device_pager.c Sat Sep 8 16:40:18 2012 (r240238) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: stable/9/sys/vm/sg_pager.c ============================================================================== --- stable/9/sys/vm/sg_pager.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/vm/sg_pager.c Sat Sep 8 16:40:18 2012 (r240238) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/9/sys/vm/vm_page.h ============================================================================== --- stable/9/sys/vm/vm_page.h Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/vm/vm_page.h Sat Sep 8 16:40:18 2012 (r240238) @@ -279,8 +279,6 @@ extern struct vpglocks pa_lock[]; #ifdef _KERNEL -#include - /* * Each pageable resident page falls into one of five lists: * Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Sat Sep 8 12:45:47 2012 (r240237) +++ stable/9/sys/vm/vnode_pager.c Sat Sep 8 16:40:18 2012 (r240238) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 16:45:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07067106566B; Sat, 8 Sep 2012 16:45:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6AED8FC0A; Sat, 8 Sep 2012 16:45:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88Gjmfm022600; Sat, 8 Sep 2012 16:45:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88GjmDk022598; Sat, 8 Sep 2012 16:45:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209081645.q88GjmDk022598@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 Sep 2012 16:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240239 - releng/9.1/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, 08 Sep 2012 16:45:49 -0000 Author: kib Date: Sat Sep 8 16:45:48 2012 New Revision: 240239 URL: http://svn.freebsd.org/changeset/base/240239 Log: MFC r232197 (by phk): Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes. Approved by: re (kensmith) Modified: releng/9.1/sys/kern/tty.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/kern/tty.c ============================================================================== --- releng/9.1/sys/kern/tty.c Sat Sep 8 16:40:18 2012 (r240238) +++ releng/9.1/sys/kern/tty.c Sat Sep 8 16:45:48 2012 (r240239) @@ -1498,6 +1498,8 @@ tty_generic_ioctl(struct tty *tp, u_long */ if ((t->c_cflag & CIGNORE) == 0 && (tp->t_termios.c_cflag != t->c_cflag || + ((tp->t_termios.c_iflag ^ t->c_iflag) & + (IXON|IXOFF|IXANY)) || tp->t_termios.c_ispeed != t->c_ispeed || tp->t_termios.c_ospeed != t->c_ospeed)) { error = ttydevsw_param(tp, t); From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 16:47:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E442E106564A; Sat, 8 Sep 2012 16:47: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 D001D8FC1F; Sat, 8 Sep 2012 16:47:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88GlrBJ022905; Sat, 8 Sep 2012 16:47:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88GlrgH022903; Sat, 8 Sep 2012 16:47:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209081647.q88GlrgH022903@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 Sep 2012 16:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240240 - releng/9.1/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 16:47:54 -0000 Author: kib Date: Sat Sep 8 16:47:52 2012 New Revision: 240240 URL: http://svn.freebsd.org/changeset/base/240240 Log: MFC r239125: Do not apply errata 721 workaround when under hypervisor, since typical hypervisor does not implement access to the required MSR, causing #GP on boot. PR: amd64/170388 Approved by: re (kensmith) Modified: releng/9.1/sys/amd64/amd64/initcpu.c Directory Properties: releng/9.1/sys/ (props changed) Modified: releng/9.1/sys/amd64/amd64/initcpu.c ============================================================================== --- releng/9.1/sys/amd64/amd64/initcpu.c Sat Sep 8 16:45:48 2012 (r240239) +++ releng/9.1/sys/amd64/amd64/initcpu.c Sat Sep 8 16:47:52 2012 (r240240) @@ -91,11 +91,17 @@ init_amd(void) * * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + * + * Hypervisors do not provide access to the errata MSR, + * causing #GP exception on attempt to apply the errata. The + * MSR write shall be done on host and persist globally + * anyway, so do not try to do it when under virtualization. */ switch (CPUID_TO_FAMILY(cpu_id)) { case 0x10: case 0x12: - wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + if ((cpu_feature2 & CPUID2_HV) == 0) + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); break; } } From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 17:43:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E72501065670; Sat, 8 Sep 2012 17:43:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C73F88FC14; Sat, 8 Sep 2012 17:43:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88HhKAJ029746; Sat, 8 Sep 2012 17:43:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88HhKBw029744; Sat, 8 Sep 2012 17:43:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209081743.q88HhKBw029744@svn.freebsd.org> From: Alan Cox Date: Sat, 8 Sep 2012 17:43: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: r240241 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 17:43:21 -0000 Author: alc Date: Sat Sep 8 17:43:20 2012 New Revision: 240241 URL: http://svn.freebsd.org/changeset/base/240241 Log: pmap_remove: Avoid re-walking the page table from the root for every PTE examined. Tidy up some of pmap_remove()'s helper functions. pmap_enter: Set PV_TABLE_REF whenever the physical page being mapped is managed, not just when it is writeable. Only call pmap_update_page() when the old mapping was valid. If there was no prior valid mapping, then pmap_update_page() serves no useful purpose. However, it will interrupt every processor that has the pmap active. pmap_enter_quick_locked: Always set PTE_RO. pmap_emulate_modified: Don't set PV_TABLE_REF. Eliminate a nonsensical comment. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Sep 8 16:47:52 2012 (r240240) +++ head/sys/mips/mips/pmap.c Sat Sep 8 17:43:20 2012 (r240241) @@ -1677,6 +1677,11 @@ pmap_remove_pte(struct pmap *pmap, pt_en rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* + * Write back all cache lines from the page being unmapped. + */ + mips_dcache_wbinv_range_index(va, PAGE_SIZE); + oldpte = *ptq; if (is_kernel_pmap(pmap)) *ptq = PTE_G; @@ -1723,24 +1728,13 @@ pmap_remove_page(struct pmap *pmap, vm_o ptq = pmap_pde_to_pte(pde, va); /* - * if there is no pte for this address, just skip it!!! + * If there is no pte for this address, just skip it! */ - if (!pte_test(ptq, PTE_V)) { + if (!pte_test(ptq, PTE_V)) return; - } - /* - * Write back all caches from the page being destroyed - */ - mips_dcache_wbinv_range_index(va, PAGE_SIZE); - - /* - * get a local va for mappings for this pmap. - */ (void)pmap_remove_pte(pmap, ptq, va, *pde); pmap_invalidate_page(pmap, va); - - return; } /* @@ -1789,9 +1783,12 @@ pmap_remove(struct pmap *pmap, vm_offset continue; if (va_next > eva) va_next = eva; - for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; - pte++, sva += PAGE_SIZE) { - pmap_remove_page(pmap, sva); + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if (!pte_test(pte, PTE_V)) + continue; + pmap_remove_pte(pmap, pte, sva, *pde); + pmap_invalidate_page(pmap, sva); } } out: @@ -2035,6 +2032,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte->wire_count--; if (pte_test(&origpte, PTE_MANAGED)) { + m->md.pv_flags |= PV_TABLE_REF; om = m; newpte |= PTE_MANAGED; if (!pte_test(&newpte, PTE_RO)) @@ -2070,6 +2068,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * Enter on the PV list if part of our managed memory. */ if ((m->oflags & VPO_UNMANAGED) == 0) { + m->md.pv_flags |= PV_TABLE_REF; if (pv == NULL) pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; @@ -2087,8 +2086,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap->pm_stats.wired_count++; validate: - if ((access & VM_PROT_WRITE) != 0) - m->md.pv_flags |= PV_TABLE_REF; #ifdef PMAP_DEBUG printf("pmap_enter: va: %p -> pa: %p\n", (void *)va, (void *)pa); @@ -2099,8 +2096,8 @@ validate: * update the pte. */ if (origpte != newpte) { + *pte = newpte; if (pte_test(&origpte, PTE_V)) { - *pte = newpte; if (pte_test(&origpte, PTE_MANAGED) && opa != pa) { if (om->md.pv_flags & PV_TABLE_REF) vm_page_aflag_set(om, PGA_REFERENCED); @@ -2116,11 +2113,9 @@ validate: if (pte_test(&origpte, PTE_MANAGED) && TAILQ_EMPTY(&om->md.pv_list)) vm_page_aflag_clear(om, PGA_WRITEABLE); - } else { - *pte = newpte; + pmap_update_page(pmap, va, newpte); } } - pmap_update_page(pmap, va, newpte); /* * Sync I & D caches for executable pages. Do this only if the @@ -2239,7 +2234,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ /* * Now validate mapping with RO protection */ - *pte = TLBLO_PA_TO_PFN(pa) | PTE_V; + *pte = PTE_RO | TLBLO_PA_TO_PFN(pa) | PTE_V; if ((m->oflags & VPO_UNMANAGED) == 0) *pte |= PTE_MANAGED; @@ -2251,7 +2246,6 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ if (is_kernel_pmap(pmap)) *pte |= PTE_G; else { - *pte |= PTE_RO; /* * Sync I & D caches. Do this only if the target pmap * belongs to the current process. Otherwise, an @@ -3255,9 +3249,7 @@ init_pte_prot(vm_page_t m, vm_prot_t acc int pmap_emulate_modified(pmap_t pmap, vm_offset_t va) { - vm_page_t m; pt_entry_t *pte; - vm_paddr_t pa; PMAP_LOCK(pmap); pte = pmap_pte(pmap, va); @@ -3275,7 +3267,6 @@ pmap_emulate_modified(pmap_t pmap, vm_of panic("pmap_emulate_modified: invalid pte"); #endif if (pte_test(pte, PTE_RO)) { - /* write to read only page in the kernel */ PMAP_UNLOCK(pmap); return (1); } @@ -3283,9 +3274,6 @@ pmap_emulate_modified(pmap_t pmap, vm_of tlb_update(pmap, va, *pte); if (!pte_test(pte, PTE_MANAGED)) panic("pmap_emulate_modified: unmanaged page"); - pa = TLBLO_PTE_TO_PA(*pte); - m = PHYS_TO_VM_PAGE(pa); - m->md.pv_flags |= PV_TABLE_REF; PMAP_UNLOCK(pmap); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:06:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2A4F106566C; Sat, 8 Sep 2012 18:06:18 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD35C8FC15; Sat, 8 Sep 2012 18:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88I6Iwb032338; Sat, 8 Sep 2012 18:06:18 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88I6I0M032336; Sat, 8 Sep 2012 18:06:18 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209081806.q88I6I0M032336@svn.freebsd.org> From: Andrey Zonov Date: Sat, 8 Sep 2012 18:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240242 - stable/9/usr.sbin/watchdogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 18:06:19 -0000 Author: zont Date: Sat Sep 8 18:06:18 2012 New Revision: 240242 URL: http://svn.freebsd.org/changeset/base/240242 Log: MFC r239769: - Don't allow watchdogd(8) to be swapped out. On machines with huge amount of swap and high IO activity, watchdogd(8) may wait for a swap memory longer than timeout and sometimes fires. MFC r239896: - It's also need to lock current memory. Modified: stable/9/usr.sbin/watchdogd/watchdogd.c Directory Properties: stable/9/usr.sbin/watchdogd/ (props changed) Modified: stable/9/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- stable/9/usr.sbin/watchdogd/watchdogd.c Sat Sep 8 17:43:20 2012 (r240241) +++ stable/9/usr.sbin/watchdogd/watchdogd.c Sat Sep 8 18:06:18 2012 (r240242) @@ -118,6 +118,8 @@ main(int argc, char *argv[]) pidfile_write(pfh); if (madvise(0, 0, MADV_PROTECT) != 0) warn("madvise failed"); + if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) + warn("mlockall failed"); watchdog_loop(); From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:07:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AEFBA1065677; Sat, 8 Sep 2012 18:07:35 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A99E8FC15; Sat, 8 Sep 2012 18:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88I7Zx0032510; Sat, 8 Sep 2012 18:07:35 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88I7ZIF032508; Sat, 8 Sep 2012 18:07:35 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209081807.q88I7ZIF032508@svn.freebsd.org> From: Andrey Zonov Date: Sat, 8 Sep 2012 18:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240243 - stable/8/usr.sbin/watchdogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 18:07:35 -0000 Author: zont Date: Sat Sep 8 18:07:35 2012 New Revision: 240243 URL: http://svn.freebsd.org/changeset/base/240243 Log: MFC r239769: - Don't allow watchdogd(8) to be swapped out. On machines with huge amount of swap and high IO activity, watchdogd(8) may wait for a swap memory longer than timeout and sometimes fires. MFC r239896: - It's also need to lock current memory. Modified: stable/8/usr.sbin/watchdogd/watchdogd.c Directory Properties: stable/8/usr.sbin/watchdogd/ (props changed) Modified: stable/8/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- stable/8/usr.sbin/watchdogd/watchdogd.c Sat Sep 8 18:06:18 2012 (r240242) +++ stable/8/usr.sbin/watchdogd/watchdogd.c Sat Sep 8 18:07:35 2012 (r240243) @@ -120,6 +120,8 @@ main(int argc, char *argv[]) pidfile_write(pfh); if (madvise(0, 0, MADV_PROTECT) != 0) warn("madvise failed"); + if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) + warn("mlockall failed"); watchdog_loop(); From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:27:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8490F106564A; Sat, 8 Sep 2012 18:27:12 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64AC18FC08; Sat, 8 Sep 2012 18:27:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88IRCd2035188; Sat, 8 Sep 2012 18:27:12 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88IRCnN035177; Sat, 8 Sep 2012 18:27:12 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209081827.q88IRCnN035177@svn.freebsd.org> From: Attilio Rao Date: Sat, 8 Sep 2012 18:27: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: r240244 - in head/sys: amd64/amd64 i386/i386 ia64/ia32 ia64/ia64 kern mips/mips powerpc/aim powerpc/booke sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 18:27:12 -0000 Author: attilio Date: Sat Sep 8 18:27:11 2012 New Revision: 240244 URL: http://svn.freebsd.org/changeset/base/240244 Log: userret() already checks for td_locks when INVARIANTS is enabled, so there is no need to check if Giant is acquired after it. Reviewed by: kib MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/ia64/ia32/ia32_trap.c head/sys/ia64/ia64/trap.c head/sys/kern/kern_fork.c head/sys/kern/subr_trap.c head/sys/mips/mips/trap.c head/sys/powerpc/aim/trap.c head/sys/powerpc/booke/trap.c head/sys/sparc64/sparc64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/amd64/amd64/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -632,7 +632,6 @@ trap(struct trapframe *frame) user: userret(td, frame); - mtx_assert(&Giant, MA_NOTOWNED); KASSERT(PCB_USER_FPU(td->td_pcb), ("Return from trap with kernel FPU ctx leaked")); userout: Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/i386/i386/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -775,7 +775,6 @@ trap(struct trapframe *frame) user: userret(td, frame); - mtx_assert(&Giant, MA_NOTOWNED); KASSERT(PCB_USER_FPU(td->td_pcb), ("Return from trap with kernel FPU ctx leaked")); userout: Modified: head/sys/ia64/ia32/ia32_trap.c ============================================================================== --- head/sys/ia64/ia32/ia32_trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/ia64/ia32/ia32_trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -278,6 +278,5 @@ ia32_trap(int vector, struct trapframe * out: userret(td, tf); - mtx_assert(&Giant, MA_NOTOWNED); do_ast(tf); } Modified: head/sys/ia64/ia64/trap.c ============================================================================== --- head/sys/ia64/ia64/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/ia64/ia64/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -841,7 +841,6 @@ trap(int vector, struct trapframe *tf) out: if (user) { userret(td, tf); - mtx_assert(&Giant, MA_NOTOWNED); do_ast(tf); } return; Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/kern/kern_fork.c Sat Sep 8 18:27:11 2012 (r240244) @@ -1055,5 +1055,4 @@ fork_return(struct thread *td, struct tr if (KTRPOINT(td, KTR_SYSRET)) ktrsysret(SYS_fork, 0, 0); #endif - mtx_assert(&Giant, MA_NOTOWNED); } Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/kern/subr_trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -260,7 +260,6 @@ ast(struct trapframe *framep) } userret(td, framep); - mtx_assert(&Giant, MA_NOTOWNED); } const char * Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/mips/mips/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -1095,7 +1095,6 @@ out: * Note: we should only get here if returning to user mode. */ userret(td, trapframe); - mtx_assert(&Giant, MA_NOTOWNED); return (trapframe->pc); } Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/powerpc/aim/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -297,7 +297,6 @@ trap(struct trapframe *frame) } userret(td, frame); - mtx_assert(&Giant, MA_NOTOWNED); } static void Modified: head/sys/powerpc/booke/trap.c ============================================================================== --- head/sys/powerpc/booke/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/powerpc/booke/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -249,7 +249,6 @@ trap(struct trapframe *frame) } userret(td, frame); - mtx_assert(&Giant, MA_NOTOWNED); } static void Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Sat Sep 8 18:07:35 2012 (r240243) +++ head/sys/sparc64/sparc64/trap.c Sat Sep 8 18:27:11 2012 (r240244) @@ -329,7 +329,6 @@ trap(struct trapframe *tf) } userret(td, tf); - mtx_assert(&Giant, MA_NOTOWNED); } else { KASSERT((tf->tf_type & T_KERNEL) != 0, ("trap: kernel trap isn't")); From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:29:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB24106566B; Sat, 8 Sep 2012 18:29:53 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B78CC8FC08; Sat, 8 Sep 2012 18:29:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88ITrtU035500; Sat, 8 Sep 2012 18:29:53 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88ITrk8035498; Sat, 8 Sep 2012 18:29:53 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209081829.q88ITrk8035498@svn.freebsd.org> From: Attilio Rao Date: Sat, 8 Sep 2012 18:29: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: r240245 - 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, 08 Sep 2012 18:29:53 -0000 Author: attilio Date: Sat Sep 8 18:29:53 2012 New Revision: 240245 URL: http://svn.freebsd.org/changeset/base/240245 Log: Move PT_UPDATED_FLUSH() before td_locks check in order to have more coverage also in the XEN case. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sat Sep 8 18:27:11 2012 (r240244) +++ head/sys/kern/subr_trap.c Sat Sep 8 18:29:53 2012 (r240245) @@ -136,6 +136,9 @@ userret(struct thread *td, struct trapfr * Let the scheduler adjust our priority etc. */ sched_userret(td); +#ifdef XEN + PT_UPDATES_FLUSH(); +#endif KASSERT(td->td_locks == 0, ("userret: Returning with %d locks held.", td->td_locks)); #ifdef VIMAGE @@ -145,9 +148,6 @@ userret(struct thread *td, struct trapfr __func__, td, p->p_pid, td->td_name, curvnet, (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); #endif -#ifdef XEN - PT_UPDATES_FLUSH(); -#endif } /* From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:34:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D5B41065676 for ; Sat, 8 Sep 2012 18:34:19 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id E9AED8FC16 for ; Sat, 8 Sep 2012 18:34:18 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=lupBVY xNIu3bk/bEFZb1+nQW3mwLjtSqe4rLpc/js4haRQci7VQAXxPklTmRGu59vV8jD6 Z+lZNWgrl+rSubV+aLz7PArbUXbT9255cPbh9doO93TqXsgswhveV/CUnhIzYda9 wq4BwFffxIyyUVPpUOBvSfFH4EagsYVcr1Jb0= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=06SRc30sHMZe AuqNbXBi16vekEOE41OmXavqYnMgLxI=; b=g2g1YgCoX8Vt4U+XMpHyWH3GMP0E ujxXaPXXRVdpD8LRAoPzjL0KYgCHnD98TAi+TzNFEzuV7Ai3V1nFBIyutT7GODnZ bRreZXX8QYWp4DVbGdt23OPCt+Dn+XGj9XvmfxTiTrUlam0ZwkFzU+dUApTcrtIm pCUoNg/rx5jx/Qs= Received: (qmail 29130 invoked from network); 8 Sep 2012 13:34:15 -0500 Received: from unknown (HELO ?10.10.0.115?) (bryan@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 8 Sep 2012 13:34:15 -0500 Message-ID: <504B8F9A.80809@shatow.net> Date: Sat, 08 Sep 2012 13:34:02 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Eitan Adler References: <201209080241.q882foC1005948@svn.freebsd.org> In-Reply-To: <201209080241.q882foC1005948@svn.freebsd.org> X-Enigmail-Version: 1.4.4 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 18:34:19 -0000 On 9/7/2012 9:41 PM, Eitan Adler wrote: > Author: eadler > Date: Sat Sep 8 02:41:50 2012 > New Revision: 240225 > URL: http://svn.freebsd.org/changeset/base/240225 > > Log: > MFC r230454: > Use provided name when allocating ksid domain. It isn't really used on FreeBSD, > but should fix a panic when pool is imported from another OS that is using this. > > No objections from; pjd > Approved by: cperciva (implicit) > Thanks! > Modified: > stable/9/sys/cddl/compat/opensolaris/sys/sid.h > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/cddl/compat/opensolaris/sys/sid.h > ============================================================================== > --- stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 01:26:52 2012 (r240224) > +++ stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 02:41:50 2012 (r240225) > @@ -30,7 +30,7 @@ > #define _OPENSOLARIS_SYS_SID_H_ > > typedef struct ksiddomain { > - char kd_name[16]; /* Domain part of SID */ > + char kd_name[1]; /* Domain part of SID */ > } ksiddomain_t; > typedef void ksid_t; > > @@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain) > { > ksiddomain_t *kd; > > - kd = kmem_alloc(sizeof(*kd), KM_SLEEP); > - strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name)); > + kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP); > + strcpy(kd->kd_name, domain); > return (kd); > } > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- Regards, Bryan Drewery bdrewery@freenode/EFNet From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 18:35:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21C8F106564A; Sat, 8 Sep 2012 18:35:16 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8B038FC15; Sat, 8 Sep 2012 18:35:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88IZFNS036112; Sat, 8 Sep 2012 18:35:15 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88IZFhV036109; Sat, 8 Sep 2012 18:35:15 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201209081835.q88IZFhV036109@svn.freebsd.org> From: Attilio Rao Date: Sat, 8 Sep 2012 18:35: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: r240246 - 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, 08 Sep 2012 18:35:16 -0000 Author: attilio Date: Sat Sep 8 18:35:15 2012 New Revision: 240246 URL: http://svn.freebsd.org/changeset/base/240246 Log: Move the checks for td_pinned, td_critnest, TDP_NOFAULTING and TDP_NOSLEEPING leaking from syscallret() to userret() so that also trap handling is covered. Also, the check on td_locks is not duplicated between the two functions. Reported by: avg Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Sat Sep 8 18:29:53 2012 (r240245) +++ head/sys/kern/subr_syscall.c Sat Sep 8 18:35:15 2012 (r240246) @@ -172,27 +172,6 @@ syscallret(struct thread *td, int error, p = td->td_proc; /* - * Check for misbehavior. - */ - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - syscallname(p, sa->code)); - KASSERT(td->td_critnest == 0, - ("System call %s returning in a critical section", - syscallname(p, sa->code))); - KASSERT(td->td_locks == 0, - ("System call %s returning with %d locks held", - syscallname(p, sa->code), td->td_locks)); - KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, - ("System call %s returning with pagefaults disabled", - syscallname(p, sa->code))); - KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, - ("System call %s returning with sleep disabled", - syscallname(p, sa->code))); - KASSERT(td->td_pinned == 0, - ("System call %s returning with pinned thread", - syscallname(p, sa->code))); - - /* * Handle reschedule and other end-of-syscall issues */ userret(td, td->td_frame); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sat Sep 8 18:29:53 2012 (r240245) +++ head/sys/kern/subr_trap.c Sat Sep 8 18:35:15 2012 (r240246) @@ -139,8 +139,21 @@ userret(struct thread *td, struct trapfr #ifdef XEN PT_UPDATES_FLUSH(); #endif + + /* + * Check for misbehavior. + */ + WITNESS_WARN(WARN_PANIC, NULL, "userret: returning"); + KASSERT(td->td_critnest == 0, + ("userret: Returning in a critical section")); KASSERT(td->td_locks == 0, - ("userret: Returning with %d locks held.", td->td_locks)); + ("userret: Returning with %d locks held", td->td_locks)); + KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, + ("userret: Returning with pagefaults disabled")); + KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, + ("userret: Returning with sleep disabled")); + KASSERT(td->td_pinned == 0, + ("userret: Returning with with pinned thread")); #ifdef VIMAGE /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ VNET_ASSERT(curvnet == NULL, From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:21:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A39106566C; Sat, 8 Sep 2012 19:21:41 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:150:6101::4]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0C68FC08; Sat, 8 Sep 2012 19:21:41 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id EBE2B3A8F3; Sat, 8 Sep 2012 21:21:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core.vx.sk (amavisd-new, unix socket) with LMTP id CjEanHvDLAd3; Sat, 8 Sep 2012 21:21:39 +0200 (CEST) Received: from [10.9.8.1] (188-167-78-15.dynamic.chello.sk [188.167.78.15]) by mail.vx.sk (Postfix) with ESMTPSA id CD4CD3A8E2; Sat, 8 Sep 2012 21:21:38 +0200 (CEST) Message-ID: <504B9AC3.2070705@FreeBSD.org> Date: Sat, 08 Sep 2012 21:21:39 +0200 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Eitan Adler References: <201209080241.q882foC1005948@svn.freebsd.org> In-Reply-To: <201209080241.q882foC1005948@svn.freebsd.org> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 19:21:42 -0000 This commit is missing the PR number (kern/171380) and should be MFCed together with r230454. I was planning to MFC these two tomorrow. On 8.9.2012 4:41, Eitan Adler wrote: > Author: eadler > Date: Sat Sep 8 02:41:50 2012 > New Revision: 240225 > URL: http://svn.freebsd.org/changeset/base/240225 > > Log: > MFC r230454: > Use provided name when allocating ksid domain. It isn't really used on FreeBSD, > but should fix a panic when pool is imported from another OS that is using this. > > No objections from; pjd > Approved by: cperciva (implicit) > > Modified: > stable/9/sys/cddl/compat/opensolaris/sys/sid.h > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/cddl/compat/opensolaris/sys/sid.h > ============================================================================== > --- stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 01:26:52 2012 (r240224) > +++ stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 02:41:50 2012 (r240225) > @@ -30,7 +30,7 @@ > #define _OPENSOLARIS_SYS_SID_H_ > > typedef struct ksiddomain { > - char kd_name[16]; /* Domain part of SID */ > + char kd_name[1]; /* Domain part of SID */ > } ksiddomain_t; > typedef void ksid_t; > > @@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain) > { > ksiddomain_t *kd; > > - kd = kmem_alloc(sizeof(*kd), KM_SLEEP); > - strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name)); > + kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP); > + strcpy(kd->kd_name, domain); > return (kd); > } > -- Martin Matuska FreeBSD committer http://blog.vx.sk From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:24:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CBDE1065672; Sat, 8 Sep 2012 19:24:04 +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 08FC48FC0A; Sat, 8 Sep 2012 19:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88JO3Y1042161; Sat, 8 Sep 2012 19:24:03 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88JO3Vg042159; Sat, 8 Sep 2012 19:24:03 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209081924.q88JO3Vg042159@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 8 Sep 2012 19:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240247 - 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: Sat, 08 Sep 2012 19:24:04 -0000 Author: jilles Date: Sat Sep 8 19:24:03 2012 New Revision: 240247 URL: http://svn.freebsd.org/changeset/base/240247 Log: sh: Remove XXX comment about removing nextopt(). Using nextopt() avoids depending on the BSD-specific optreset feature in getopt() and reduces code size (both source and binary). Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Sat Sep 8 18:35:15 2012 (r240246) +++ head/bin/sh/options.c Sat Sep 8 19:24:03 2012 (r240247) @@ -531,10 +531,6 @@ out: } /* - * XXX - should get rid of. have all builtins use getopt(3). the - * library getopt must have the BSD extension static variable "optreset" - * otherwise it can't be used within the shell safely. - * * Standard option processing (a la getopt) for builtin routines. The * only argument that is passed to nextopt is the option string; the * other arguments are unnecessary. It return the character, or '\0' on From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:35:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F70106566C; Sat, 8 Sep 2012 19:35:24 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63BE08FC17; Sat, 8 Sep 2012 19:35:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88JZOQk043544; Sat, 8 Sep 2012 19:35:24 GMT (envelope-from pgj@svn.freebsd.org) Received: (from pgj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88JZOr5043542; Sat, 8 Sep 2012 19:35:24 GMT (envelope-from pgj@svn.freebsd.org) Message-Id: <201209081935.q88JZOr5043542@svn.freebsd.org> From: Gabor Pali Date: Sat, 8 Sep 2012 19:35:24 +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: r240248 - 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: Sat, 08 Sep 2012 19:35:24 -0000 Author: pgj (ports committer) Date: Sat Sep 8 19:35:23 2012 New Revision: 240248 URL: http://svn.freebsd.org/changeset/base/240248 Log: Implement zack's request for turning his commit bit in. Zack, thank you for your work on FreeBSD in the past! Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sat Sep 8 19:24:03 2012 (r240247) +++ svnadmin/conf/access Sat Sep 8 19:35:23 2012 (r240248) @@ -262,7 +262,6 @@ wollman wpaul wsalamon yongari -zack zec zml zont From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:36:58 2012 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 95A19106566C; Sat, 8 Sep 2012 19:36:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 6BF28150D26; Sat, 8 Sep 2012 19:36:44 +0000 (UTC) Message-ID: <504B9E4C.6030301@FreeBSD.org> Date: Sat, 08 Sep 2012 12:36:44 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120907 Thunderbird/15.0 MIME-Version: 1.0 To: Martin Matuska References: <201209080241.q882foC1005948@svn.freebsd.org> <504B9AC3.2070705@FreeBSD.org> In-Reply-To: <504B9AC3.2070705@FreeBSD.org> X-Enigmail-Version: 1.4.4 OpenPGP: id=1A1ABC84 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, Eitan Adler , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 19:36:58 -0000 On 09/08/2012 12:21, Martin Matuska wrote: > This commit is missing the PR number It's actually pretty common to summarize the commit message in an MFC, rather than reproducing it verbatim. -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:39:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0EEE1065676 for ; Sat, 8 Sep 2012 19:39:29 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 249C48FC16 for ; Sat, 8 Sep 2012 19:39:28 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so1174768pbb.13 for ; Sat, 08 Sep 2012 12:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ZPG5tLqJA+tLmd+29HNeVjheqm0lXnrpxzzPbEvKDDA=; b=npx84QNBJU6KTI1dGAd4thxK8S1w2xJ29dZi6FZdYd/gNiPjlA/4FWvyKPUqoLkU+I OOFd8qtigycoFT1zP0d/oNWJSFZ4ucIRBHXza8M0TjFNCSIOOvVlXlX6njAjoMTMscy7 x7TIcf8Pt4w9n45zzGQRrFUdvM60IhGKjgdTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=ZPG5tLqJA+tLmd+29HNeVjheqm0lXnrpxzzPbEvKDDA=; b=mqPvI/sJCYFyYB6tBTBfcgTAGKA96U4svyfVBQ6Sh/Lc6jtyHk4WLgaTZ+5GW2l5pD gQsTmNLN63chrSmp/E+hbMUmD938UKTxq6gD2oOMcSPgQzX1w+ragesN+6yc9rrSbxcC /fbbxu04QpRFD1w1rVEL1Kegp58AgBVcneOQtwz+sK+P232zIUafX9L8EcInW5Zn0VJy 8MVsoujmwUy2Kh1XS6QK5X4YwevmStgj/zgJ91gcfsNajP+sNv4MrBoWFqRQvAikAcip P5+13O8cUfAdf4lLnNRYY/azW17EUF+oAMxdFoFrvfxvFPt3q8t/qRXJCgRRSOxxuEHT phuA== Received: by 10.66.83.129 with SMTP id q1mr15128193pay.4.1347133167713; Sat, 08 Sep 2012 12:39:27 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.193.101 with HTTP; Sat, 8 Sep 2012 12:38:56 -0700 (PDT) In-Reply-To: <504B9AC3.2070705@FreeBSD.org> References: <201209080241.q882foC1005948@svn.freebsd.org> <504B9AC3.2070705@FreeBSD.org> From: Eitan Adler Date: Sat, 8 Sep 2012 15:38:56 -0400 X-Google-Sender-Auth: C4di3U_jd6yHw8B9RgTzHGoOhFg Message-ID: To: Martin Matuska Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQngMLXpIMHaOdC3ZY2z7OKmo1aUQOK6We6yk2yTnFzvBSeTV4SdDCgazrWz81rozwJSe65e Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 19:39:29 -0000 On 8 September 2012 15:21, Martin Matuska wrote: > This commit is missing the PR number (kern/171380) and should be MFCed > together with r230454. > I was planning to MFC these two tomorrow. I had already MFCed r230454 to 8 and 7 so I was just finishing that off. I was not aware of r240162. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 19:40:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA6851065672 for ; Sat, 8 Sep 2012 19:40:03 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 822E88FC0A for ; Sat, 8 Sep 2012 19:40:03 +0000 (UTC) Received: by mail-pz0-f54.google.com with SMTP id r6so521617dad.13 for ; Sat, 08 Sep 2012 12:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=uUUAjS4WMq++oUYQ+j0R7ee5GQ+Z4iB78Yny+plv4Zg=; b=JHXjvLLLyIoth4juhAoEb/X2gA/NNhBiz0/m870IfJYY5epU1pS+qdfRUb6ubSE7hj mT/enRK3pULMyhfhzvHYVTefbb2EI10uNEhljp/Il3pnEcLq0oUM2f4VoZv/UMFCqy2M nusY9GU3K3TsLKQpw5aSXXaNQrxqMCqTxHzxM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=uUUAjS4WMq++oUYQ+j0R7ee5GQ+Z4iB78Yny+plv4Zg=; b=IA5moRQbKZh1QyeEWpkkfJ3d9ZDi3g+1hy0+HfxHtjbRfH4RbEkKIcNYP/7gDxB/gd S74z+3ndrS29p367E39QjaKPzhgPX1AXbpuDpSaVo3znJDQi38ADv/0NIKVFCtae2hxO f4yGfDzJclKaxDgxGdlu8RwsUmHifyBw5GXTDma4gfLFeHEiDs0iCMXDdPaSYompacGO oAazp+LTt/8OJLQ06/Xd5NPmpK8X6YQPftfWpLEYm9BwcCnAEwaxsvLcZouUq+4RZIJG VmMkAcASxFHWlXTyiSfc0gZx/+neRQ5f0FGKpRLzD0YGs3tiICfoOwn5oJ1vKWHFBFYr 7guA== Received: by 10.68.242.231 with SMTP id wt7mr16930688pbc.99.1347133203327; Sat, 08 Sep 2012 12:40:03 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.193.101 with HTTP; Sat, 8 Sep 2012 12:39:32 -0700 (PDT) In-Reply-To: <504B9E4C.6030301@FreeBSD.org> References: <201209080241.q882foC1005948@svn.freebsd.org> <504B9AC3.2070705@FreeBSD.org> <504B9E4C.6030301@FreeBSD.org> From: Eitan Adler Date: Sat, 8 Sep 2012 15:39:32 -0400 X-Google-Sender-Auth: JrfVb4_jHUv9fjCOm2l4TuP-lFM Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkPKdDO4jOvEZ8FlamJf+OchMHKrvr5SAO0X65lrrxr8R3NZ6QCEHWcX9sosJOHMQ5QuLkC Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Martin Matuska , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 19:40:04 -0000 On 8 September 2012 15:36, Doug Barton wrote: > On 09/08/2012 12:21, Martin Matuska wrote: >> This commit is missing the PR number > > It's actually pretty common to summarize the commit message in an MFC, > rather than reproducing it verbatim. The PR number is still important in order for dfilter to act correctly. I forgot to include it -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 20:00:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AE6A106564A; Sat, 8 Sep 2012 20:00:32 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 267218FC08; Sat, 8 Sep 2012 20:00:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88K0VRN046337; Sat, 8 Sep 2012 20:00:31 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88K0VF9046335; Sat, 8 Sep 2012 20:00:31 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201209082000.q88K0VF9046335@svn.freebsd.org> From: Andreas Tobler Date: Sat, 8 Sep 2012 20:00: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: r240249 - head/sys/boot/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: Sat, 08 Sep 2012 20:00:32 -0000 Author: andreast Date: Sat Sep 8 20:00:31 2012 New Revision: 240249 URL: http://svn.freebsd.org/changeset/base/240249 Log: Fix loading of kernel modules at boot time for powerpc64. Reported by: Mathias Breuninger MFC after: 1 week Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Sep 8 19:35:23 2012 (r240248) +++ head/sys/boot/common/load_elf.c Sat Sep 8 20:00:31 2012 (r240249) @@ -588,7 +588,7 @@ fake_modname(const char *name) return fp; } -#if defined(__i386__) && __ELF_WORD_SIZE == 64 +#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 struct mod_metadata64 { int md_version; /* structure version MDTV_* */ int md_type; /* type of entry MDT_* */ @@ -601,7 +601,7 @@ int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef) { struct mod_metadata md; -#if defined(__i386__) && __ELF_WORD_SIZE == 64 +#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 struct mod_metadata64 md64; #endif struct mod_depend *mdepend; @@ -626,7 +626,7 @@ __elfN(parse_modmetadata)(struct preload v += ef->off; else if (error != 0) return (error); -#if defined(__i386__) && __ELF_WORD_SIZE == 64 +#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 COPYOUT(v, &md64, sizeof(md64)); error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64)); if (error == EOPNOTSUPP) { From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 20:54:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 153DD106564A; Sat, 8 Sep 2012 20:54:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F41D58FC08; Sat, 8 Sep 2012 20:54:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88KssQ8052730; Sat, 8 Sep 2012 20:54:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88KssEG052728; Sat, 8 Sep 2012 20:54:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201209082054.q88KssEG052728@svn.freebsd.org> From: Michael Tuexen Date: Sat, 8 Sep 2012 20:54: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: r240250 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2012 20:54:55 -0000 Author: tuexen Date: Sat Sep 8 20:54:54 2012 New Revision: 240250 URL: http://svn.freebsd.org/changeset/base/240250 Log: Whitespace cleanup. MFC after: 10 days Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sat Sep 8 20:00:31 2012 (r240249) +++ head/sys/netinet/sctp_asconf.c Sat Sep 8 20:54:54 2012 (r240250) @@ -1862,7 +1862,6 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb * { int status; - if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) == 0 || sctp_is_feature_off(inp, SCTP_PCB_FLAGS_DO_ASCONF)) { /* subset bound, no ASCONF allowed case, so ignore */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 21:38:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 992EF106566B; Sat, 8 Sep 2012 21:38:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2D38FC12; Sat, 8 Sep 2012 21:38:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q88Lc67s057809; Sat, 8 Sep 2012 21:38:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q88Lc5Rp057807; Sat, 8 Sep 2012 21:38:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209082138.q88Lc5Rp057807@svn.freebsd.org> From: Eitan Adler Date: Sat, 8 Sep 2012 21:38: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: r240251 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Sep 2012 21:38:06 -0000 Author: eadler Date: Sat Sep 8 21:38:05 2012 New Revision: 240251 URL: http://svn.freebsd.org/changeset/base/240251 Log: Regenerate src.conf.5 after the projects/armv6 merge Approved by: des Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Sep 8 20:54:54 2012 (r240250) +++ head/share/man/man5/src.conf.5 Sat Sep 8 21:38:05 2012 (r240251) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd July 14, 2012 +.Dd September 8, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -221,7 +221,7 @@ Set to not build Bluetooth related kerne .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITH_BSDCONFIG -.\" from FreeBSD: head/tools/build/options/WITH_BSDCONFIG 238438 2012-07-14 03:16:57Z dteske +.\" from FreeBSD: head/tools/build/options/WITH_BSDCONFIG 238448 2012-07-14 10:17:47Z zeising Set to install bsdconfig(8), a BSD-licensed configuration/management utility. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb @@ -273,7 +273,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. +arm/arm, arm/armeb, arm/armv6, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -390,7 +390,7 @@ Set to build Flattened Device Tree suppo This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on -arm/arm, arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. +arm/arm, arm/armeb, arm/armv6, arm/armv6eb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_FLOPPY .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs From owner-svn-src-all@FreeBSD.ORG Sat Sep 8 23:04:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F82106566B for ; Sat, 8 Sep 2012 23:04:15 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 395D58FC17 for ; Sat, 8 Sep 2012 23:04:14 +0000 (UTC) Received: by weyx56 with SMTP id x56so561938wey.13 for ; Sat, 08 Sep 2012 16:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=N8QUA3lpJ+mWfN3eeTGB3hnCMCok71/95SIJALv8i1g=; b=d6PxW62g+t0ljycwU5aQTJWM3uVt3Kn/bkmOCUU3DW2fEVpBZLT/q7dWfah+JvxNoV jatrPPCL2KgDvQzA8hPL82d26BeOl9sNqjeTvyng/xcwWctczgeu6W0lPsOjPDvdtfUD J/1jGgZP6XCpAFM8zzkvx0aIStLNgqeFYKd7ybENLBz/9CNlYkJkuzDbUEs7jvDpFMRp e8T5zB7mlDi+U4XC9p1wgZI5qBW4OOuWDXIb6H0ZYd81XYslndjrYkmb4sE0QEENf0zR Oof3FvhTwec62IhpWE0rv9847fJ+xG8qvbybb0nRRgHDQ5Gl5iADblo7ow0zkni7Ayo3 +bjw== Received: by 10.216.132.25 with SMTP id n25mr5055529wei.25.1347145453887; Sat, 08 Sep 2012 16:04:13 -0700 (PDT) Received: from rnote.ddteam.net (27-246-133-95.pool.ukrtel.net. [95.133.246.27]) by mx.google.com with ESMTPS id t7sm11299561wix.6.2012.09.08.16.04.11 (version=SSLv3 cipher=OTHER); Sat, 08 Sep 2012 16:04:12 -0700 (PDT) Date: Sun, 9 Sep 2012 02:04:04 +0300 From: Aleksandr Rybalko To: Aleksandr Rybalko Message-Id: <20120909020404.403b0b6e.ray@ddteam.net> In-Reply-To: <20120908020205.fd7f0c7f.ray@freebsd.org> References: <201209042316.q84NGtuA035023@svn.freebsd.org> <20120905135841.D1053@besplex.bde.org> <20120908020205.fd7f0c7f.ray@freebsd.org> X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlGw7BjxRH6CRLQOZKTNJSXiHfFrWMRZZ20/9teHZAHpzNwZcRaeOGFoUjc6TDz+GShCVe+ Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: [PATCH]Re: svn commit: r240119 - 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, 08 Sep 2012 23:04:15 -0000 On Sat, 8 Sep 2012 02:02:05 +0300 Aleksandr Rybalko wrote: > Hi Bruce! > > Did not absorb all details of style(9) yet. But I'm working on that :) > > On Wed, 5 Sep 2012 14:18:40 +1000 (EST) > Bruce Evans wrote: > > > On Tue, 4 Sep 2012, Aleksandr Rybalko wrote: > > > > > Log: > > > Style fixes. > > > > > > Suggested by: mdf > > > Approved by: adrian (menthor) > > > > The following style bugs remain. (The density of style bugs is low > > enough for them to be easy to fix.) > > > > > Modified: head/sys/kern/subr_hints.c > > > ============================================================================== > > > --- head/sys/kern/subr_hints.c Tue Sep 4 23:13:24 > > > 2012 (r240118) +++ head/sys/kern/subr_hints.c Tue > > > Sep 4 23:16:55 2012 (r240119) @@ -31,8 +31,8 @@ __FBSDID > > > ("$FreeBSD$"); > > > #include > > > #include > > > #include > > > -#include > > > #include > > > +#include > > > > Sorting this correctly would be an unrelated fix (it is a > > prerequisite for most headers, since almost any header may use > > KASSERT()). > > Yeah, now I found right place for it. > > > > > > #include > > > > Sorting this correctly woruld be an unrelated fix. > > > > Yeah, kind of second for kernel. > > > > > > > /* > > > @@ -52,9 +52,9 @@ static char *hintp; > > > > Sorting and indenting the static variables would be an unrelated > > fix. > > I swear, I was not touch hintp. Same with checkmethod and > use_kenv. :) > > > > > > static int > > > sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > > > A bug in svn diff is visible. The variable declaration is worse > > than useless as a header for this block of code. > > > > Did not get it. About which variable you saying? > > > > > > { > > > - int error, i, from_kenv, value, eqidx; > > > const char *cp; > > > char *line, *eq; > > > + int eqidx, error, from_kenv, i, value; > > > > > > from_kenv = 0; > > > cp = kern_envp; > > > @@ -62,7 +62,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > > > > > /* Fetch candidate for new hintmode value */ > > > > Comments (except possibly ones at the right of code) should be real > > sentences. This one is missing a ".", unlike all older comments > > (not at the right of code) in this file. > > Fixed. > > > > > > error = sysctl_handle_int(oidp, &value, 0, req); > > > - if (error || !req->newptr) > > > + if (error || req->newptr == NULL) > > > return (error); > > > > > > if (value != 2) > > > > This still has a boolean test for the non-boolean `error'. Now the > > older code sets a bad example in all cases where `error' is tested. > > Fixed. > > > > > > @@ -73,8 +73,11 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > > switch (hintmode) { > > > case 0: > > > if (dynamic_kenv) { > > > - /* Already here */ > > > - hintmode = value; /* XXX: Need we switch > > > or not ? */ > > > + /* > > > + * Already here. But assign hintmode to > > > 2, to not > > > + * check it in the future. > > > + */ > > > > Sentence breaks should be 2 spaces, as in all older comments in this > > file, starting as usual with the copyright. But outside of the > > copyright, the style bug of single-space sentence breaks was avoided > > in this file mostly by using the larger style bug of using a new > > line for most new sentences. > > Already start delimiting sentences with double space. When folks last > time arguing about it, I found power to read only about 10 first > mails. :) > > > > > > + hintmode = 2; > > > return (0); > > > } > > > from_kenv = 1; > > > @@ -98,7 +101,7 @@ sysctl_hintmode(SYSCTL_HANDLER_ARGS) > > > continue; > > > } > > > eq = strchr(cp, '='); > > > - if (!eq) > > > + if (eq == NULL) > > > /* Bad hint value */ > > > continue; > > > eqidx = eq - cp; > > > > Bruce > > Thank you very much Bruce! I am understand how much important is > code style, but still on the way to that point. > [skip old patch] http://people.freebsd.org/~ray/subr_hints_style.patch +1 update by mdf@ hint Many Thanks! P.S. Tested - WORKS :) WBW -- Aleksandr Rybalko