From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 11:17:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CB89106566B; Sun, 18 Jan 2009 11:17:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 398228FC1A; Sun, 18 Jan 2009 11:17:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IBHklQ071632; Sun, 18 Jan 2009 11:17:46 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IBHkRc071630; Sun, 18 Jan 2009 11:17:46 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181117.n0IBHkRc071630@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 11:17:46 +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: r187383 - stable/7/sys/dev/ae X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 11:17:48 -0000 Author: stas Date: Sun Jan 18 11:17:46 2009 New Revision: 187383 URL: http://svn.freebsd.org/changeset/base/187383 Log: - MFC r185707: - Eliminate unused variable. [1] - Check for runt frames entering the stack. [2] Suggested by: ganbold[1], yongari[2] Modified: stable/7/sys/dev/ae/if_ae.c Modified: stable/7/sys/dev/ae/if_ae.c ============================================================================== --- stable/7/sys/dev/ae/if_ae.c Sun Jan 18 09:44:33 2009 (r187382) +++ stable/7/sys/dev/ae/if_ae.c Sun Jan 18 11:17:46 2009 (r187383) @@ -1103,12 +1103,9 @@ ae_dmamap_cb(void *arg, bus_dma_segment_ static int ae_alloc_rings(ae_softc_t *sc) { - bus_dma_tag_t bustag; bus_addr_t busaddr; int error; - bustag = bus_get_dma_tag(sc->dev); - /* * Create parent DMA tag. */ @@ -1865,8 +1862,8 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd) if_printf(ifp, "Rx interrupt occuried.\n"); #endif size = le16toh(rxd->len) - ETHER_CRC_LEN; - if (size < 0) { - if_printf(ifp, "Negative length packet received."); + if (size < (ETHER_MIN_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN)) { + if_printf(ifp, "Runt frame received."); return (EIO); } From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 11:43:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36828106567B; Sun, 18 Jan 2009 11:43:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 239838FC1A; Sun, 18 Jan 2009 11:43:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IBhO8a072186; Sun, 18 Jan 2009 11:43:24 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IBhOOH072185; Sun, 18 Jan 2009 11:43:24 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181143.n0IBhOOH072185@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 11:43:24 +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: r187385 - in stable/7/sys: . arm/arm contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 11:43:25 -0000 Author: stas Date: Sun Jan 18 11:43:23 2009 New Revision: 187385 URL: http://svn.freebsd.org/changeset/base/187385 Log: - Merge r185494: Get rid of unused variable in KTR checks. This allows ktr(4) enabled ARM kernel to compile. PR: rm/128897 Submitted by: Pankov Pavel Modified: stable/7/sys/ (props changed) stable/7/sys/arm/arm/busdma_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/arm/busdma_machdep.c ============================================================================== --- stable/7/sys/arm/arm/busdma_machdep.c Sun Jan 18 11:38:35 2009 (r187384) +++ stable/7/sys/arm/arm/busdma_machdep.c Sun Jan 18 11:43:23 2009 (r187385) @@ -671,9 +671,8 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm bus_addr_t paddr; if ((map->pagesneeded == 0)) { - CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " - "alignment= %d", dmat->lowaddr, ptoa((vm_paddr_t)Maxmem), - dmat->boundary, dmat->alignment); + CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d", + dmat->lowaddr, dmat->boundary, dmat->alignment); CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d", map, map->pagesneeded); /* From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 11:47:40 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F94C1065703; Sun, 18 Jan 2009 11:47:40 +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 1C6098FC1C; Sun, 18 Jan 2009 11:47:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IBle8J072347; Sun, 18 Jan 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IBleOi072346; Sun, 18 Jan 2009 11:47:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901181147.n0IBleOi072346@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 18 Jan 2009 11:47:39 +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: r187386 - in stable/7/sys: . contrib/pf dev/cxgb gnu/fs/ext2fs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 11:47:40 -0000 Author: kib Date: Sun Jan 18 11:47:39 2009 New Revision: 187386 URL: http://svn.freebsd.org/changeset/base/187386 Log: MFC r186740: Do not incorrectly add the low 5 bits of the offset to the resulting position of the found zero bit. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h Modified: stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h ============================================================================== --- stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 18 11:43:23 2009 (r187385) +++ stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 18 11:47:39 2009 (r187386) @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz mask = ~0U << (ofs & 31); bit = *p | ~mask; if (bit != ~0U) - return (ffs(~bit) + ofs - 1); + return (ffs(~bit) + (ofs & ~31U) - 1); p++; ofs = (ofs + 31U) & ~31U; } From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:09:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 962301065672; Sun, 18 Jan 2009 12:09:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 831718FC1B; Sun, 18 Jan 2009 12:09:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IC9O3h072872; Sun, 18 Jan 2009 12:09:24 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IC9OTL072871; Sun, 18 Jan 2009 12:09:24 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181209.n0IC9OTL072871@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:09:24 +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: r187388 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:09:25 -0000 Author: stas Date: Sun Jan 18 12:09:24 2009 New Revision: 187388 URL: http://svn.freebsd.org/changeset/base/187388 Log: - Merge r184310: Add stream bus_space operations. Modified: stable/7/sys/ (props changed) stable/7/sys/arm/at91/at91.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/at91/at91.c ============================================================================== --- stable/7/sys/arm/at91/at91.c Sun Jan 18 12:03:43 2009 (r187387) +++ stable/7/sys/arm/at91/at91.c Sun Jan 18 12:09:24 2009 (r187388) @@ -166,6 +166,42 @@ struct bus_space at91_bs_tag = { generic_armv4_bs_c_2, NULL, NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, }; static int From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:12:38 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A72681065670; Sun, 18 Jan 2009 12:12:38 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 946508FC14; Sun, 18 Jan 2009 12:12:38 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ICCcwO073048; Sun, 18 Jan 2009 12:12:38 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ICCcRa073047; Sun, 18 Jan 2009 12:12:38 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181212.n0ICCcRa073047@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187389 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:12:39 -0000 Author: stas Date: Sun Jan 18 12:12:38 2009 New Revision: 187389 URL: http://svn.freebsd.org/changeset/base/187389 Log: - Merge r184309: Add a missing NULL-pointer check. Modified: stable/7/sys/ (props changed) stable/7/sys/arm/at91/at91.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/at91/at91.c ============================================================================== --- stable/7/sys/arm/at91/at91.c Sun Jan 18 12:09:24 2009 (r187388) +++ stable/7/sys/arm/at91/at91.c Sun Jan 18 12:12:38 2009 (r187389) @@ -577,8 +577,10 @@ at91_alloc_resource(device_t dev, device #endif rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); - rman_set_bustag(rle->res, &at91_bs_tag); - rman_set_bushandle(rle->res, start); + if (rle->res != NULL) { + rman_set_bustag(rle->res, &at91_bs_tag); + rman_set_bushandle(rle->res, start); + } break; } if (rle->res) { From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:16:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D791106566B; Sun, 18 Jan 2009 12:16:45 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5B18FC16; Sun, 18 Jan 2009 12:16:45 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ICGjFN073166; Sun, 18 Jan 2009 12:16:45 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ICGjwc073164; Sun, 18 Jan 2009 12:16:45 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181216.n0ICGjwc073164@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187390 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:16:46 -0000 Author: stas Date: Sun Jan 18 12:16:45 2009 New Revision: 187390 URL: http://svn.freebsd.org/changeset/base/187390 Log: - Merge r183151: Recognize SAVE and OSXSAVE extended processor features. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/identcpu.c Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Sun Jan 18 12:12:38 2009 (r187389) +++ stable/7/sys/amd64/amd64/identcpu.c Sun Jan 18 12:16:45 2009 (r187390) @@ -247,8 +247,8 @@ printcpuinfo(void) "\030" "\031" "\032" - "\033" - "\034" + "\033XSAVE" + "\034OSXSAVE" "\035" "\036" "\037" Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Sun Jan 18 12:12:38 2009 (r187389) +++ stable/7/sys/i386/i386/identcpu.c Sun Jan 18 12:16:45 2009 (r187390) @@ -744,8 +744,8 @@ printcpuinfo(void) "\030POPCNT" "\031" "\032" - "\033" - "\034" + "\033XSAVE" + "\034OSXSAVE" "\035" "\036" "\037" From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:28:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EC29106566B; Sun, 18 Jan 2009 12:28:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11EB38FC18; Sun, 18 Jan 2009 12:28:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ICSjnX073458; Sun, 18 Jan 2009 12:28:45 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ICSjnT073457; Sun, 18 Jan 2009 12:28:45 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181228.n0ICSjnT073457@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187391 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:28:46 -0000 Author: stas Date: Sun Jan 18 12:28:45 2009 New Revision: 187391 URL: http://svn.freebsd.org/changeset/base/187391 Log: - Merge r182477: Try to look for MAC address in all SA registers, not only in the first one. U-boot, for example, uses the second register to store MAC.[1] Use random MAC address if none configured instead of failing. Submitted by: Bjorn Konig [1] Modified: stable/7/sys/ (props changed) stable/7/sys/arm/at91/if_ate.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/at91/if_ate.c ============================================================================== --- stable/7/sys/arm/at91/if_ate.c Sun Jan 18 12:16:45 2009 (r187390) +++ stable/7/sys/arm/at91/if_ate.c Sun Jan 18 12:28:45 2009 (r187391) @@ -170,7 +170,8 @@ ate_attach(device_t dev) struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; int err; - u_char eaddr[6]; + u_char eaddr[ETHER_ADDR_LEN]; + uint32_t rnd; sc->dev = dev; err = ate_activate(dev); @@ -191,8 +192,23 @@ ate_attach(device_t dev) callout_init_mtx(&sc->tick_ch, &sc->sc_mtx, 0); if ((err = ate_get_mac(sc, eaddr)) != 0) { - device_printf(dev, "No MAC address set\n"); - goto out; + /* + * No MAC address configured. Generate the fake one. + */ + if (bootverbose) + device_printf(dev, + "Generating fake ethernet address.\n"); + rnd = arc4random(); + + /* + * Set OUI to Atmel. + */ + eaddr[0] = 0x00; + eaddr[1] = 0x04; + eaddr[2] = 0x25; + eaddr[3] = (rnd >> 16) & 0xff; + eaddr[4] = (rnd >> 8) & 0xff; + eaddr[5] = rnd & 0xff; } ate_set_mac(sc, eaddr); @@ -586,24 +602,29 @@ ate_set_mac(struct ate_softc *sc, u_char static int ate_get_mac(struct ate_softc *sc, u_char *eaddr) { + bus_size_t sa_low_reg[] = { ETH_SA1L, ETH_SA2L, ETH_SA3L, ETH_SA4L }; + bus_size_t sa_high_reg[] = { ETH_SA1H, ETH_SA2H, ETH_SA3H, ETH_SA4H }; uint32_t low, high; + int i; /* * The boot loader setup the MAC with an address, if one is set in - * the loader. The TSC loader will also set the MAC address in a - * similar way. Grab the MAC address from the SA1[HL] registers. + * the loader. Grab one MAC address from the SA[1-4][HL] registers. */ - low = RD4(sc, ETH_SA1L); - high = RD4(sc, ETH_SA1H); - if ((low | (high & 0xffff)) == 0) - return (ENXIO); - eaddr[0] = low & 0xff; - eaddr[1] = (low >> 8) & 0xff; - eaddr[2] = (low >> 16) & 0xff; - eaddr[3] = (low >> 24) & 0xff; - eaddr[4] = high & 0xff; - eaddr[5] = (high >> 8) & 0xff; - return (0); + for (i = 0; i < 4; i++) { + low = RD4(sc, sa_low_reg[i]); + high = RD4(sc, sa_high_reg[i]); + if ((low | (high & 0xffff)) != 0) { + eaddr[0] = low & 0xff; + eaddr[1] = (low >> 8) & 0xff; + eaddr[2] = (low >> 16) & 0xff; + eaddr[3] = (low >> 24) & 0xff; + eaddr[4] = high & 0xff; + eaddr[5] = (high >> 8) & 0xff; + return (0); + } + } + return (ENXIO); } static void From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:35:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D88C5106566B; Sun, 18 Jan 2009 12:35:11 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5E3D8FC12; Sun, 18 Jan 2009 12:35:11 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ICZBIF073651; Sun, 18 Jan 2009 12:35:11 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ICZB8D073650; Sun, 18 Jan 2009 12:35:11 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181235.n0ICZB8D073650@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:35: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: r187392 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:35:13 -0000 Author: stas Date: Sun Jan 18 12:35:11 2009 New Revision: 187392 URL: http://svn.freebsd.org/changeset/base/187392 Log: - MFC r182476: style fix. Modified: stable/7/sys/ (props changed) stable/7/sys/arm/at91/if_ate.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/at91/if_ate.c ============================================================================== --- stable/7/sys/arm/at91/if_ate.c Sun Jan 18 12:28:45 2009 (r187391) +++ stable/7/sys/arm/at91/if_ate.c Sun Jan 18 12:35:11 2009 (r187392) @@ -180,7 +180,7 @@ ate_attach(device_t dev) sc->use_rmii = (RD4(sc, ETH_CFG) & ETH_CFG_RMII) == ETH_CFG_RMII; - /*Sysctls*/ + /* Sysctls */ sctx = device_get_sysctl_ctx(dev); soid = device_get_sysctl_tree(dev); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "rmii", From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 12:59:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C82D1065676; Sun, 18 Jan 2009 12:59:37 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69E4F8FC14; Sun, 18 Jan 2009 12:59:37 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ICxbfZ074198; Sun, 18 Jan 2009 12:59:37 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ICxbqe074197; Sun, 18 Jan 2009 12:59:37 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181259.n0ICxbqe074197@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 12:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187393 - in stable/6/sys: . dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:59:38 -0000 Author: stas Date: Sun Jan 18 12:59:37 2009 New Revision: 187393 URL: http://svn.freebsd.org/changeset/base/187393 Log: - MFC r174660: Add quirk for the TrendNet TU-S9 adapter, which uses new version of PL2303 chip (revision 0x400). This allows it to be correctly identified as PL2303X. PR: usb/128115 Submitted by: Borodin Oleg Modified: stable/6/sys/ (props changed) stable/6/sys/dev/usb/uplcom.c Modified: stable/6/sys/dev/usb/uplcom.c ============================================================================== --- stable/6/sys/dev/usb/uplcom.c Sun Jan 18 12:35:11 2009 (r187392) +++ stable/6/sys/dev/usb/uplcom.c Sun Jan 18 12:59:37 2009 (r187393) @@ -240,6 +240,9 @@ static const struct uplcom_product { { USB_VENDOR_PROLIFIC2, USB_PRODUCT_PROLIFIC2_WSIM, -1, TYPE_PL2303X}, /* PLANEX USB-RS232 URS-03 */ { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC232A, -1, TYPE_PL2303 }, + /* TrendNet TU-S9 */ + { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, + 0x400, TYPE_PL2303X }, /* ST Lab USB-SERIAL-4 */ { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2303, 0x300, TYPE_PL2303X }, From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 17:07:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B19ED106568B; Sun, 18 Jan 2009 17:07:48 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3ED8FC14; Sun, 18 Jan 2009 17:07:48 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IH7mU2080978; Sun, 18 Jan 2009 17:07:48 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IH7mHB080977; Sun, 18 Jan 2009 17:07:48 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901181707.n0IH7mHB080977@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 18 Jan 2009 17:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187398 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 17:07:49 -0000 Author: stas Date: Sun Jan 18 17:07:48 2009 New Revision: 187398 URL: http://svn.freebsd.org/changeset/base/187398 Log: - MFC r182524 and r182555: - Set U/L bit in generate MAC address. - Use our specific OUI instead of Atmel one. Modified: stable/7/sys/ (props changed) stable/7/sys/arm/at91/if_ate.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/arm/at91/if_ate.c ============================================================================== --- stable/7/sys/arm/at91/if_ate.c Sun Jan 18 15:10:46 2009 (r187397) +++ stable/7/sys/arm/at91/if_ate.c Sun Jan 18 17:07:48 2009 (r187398) @@ -193,19 +193,21 @@ ate_attach(device_t dev) if ((err = ate_get_mac(sc, eaddr)) != 0) { /* - * No MAC address configured. Generate the fake one. + * No MAC address configured. Generate the random one. */ if (bootverbose) device_printf(dev, - "Generating fake ethernet address.\n"); + "Generating random ethernet address.\n"); rnd = arc4random(); /* - * Set OUI to Atmel. + * Set OUI to convenient locally assigned address. 'b' + * is 0x62, which has the locally assigned bit set, and + * the broadcast/multicast bit clear. */ - eaddr[0] = 0x00; - eaddr[1] = 0x04; - eaddr[2] = 0x25; + eaddr[0] = 'b'; + eaddr[1] = 's'; + eaddr[2] = 'd'; eaddr[3] = (rnd >> 16) & 0xff; eaddr[4] = (rnd >> 8) & 0xff; eaddr[5] = rnd & 0xff; From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 17:08:49 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C1A1065674 for ; Sun, 18 Jan 2009 17:08:49 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id D790A8FC1F for ; Sun, 18 Jan 2009 17:08:48 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 761828FC52 for ; Sun, 18 Jan 2009 20:08:47 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 3B2148FC18; Sun, 18 Jan 2009 20:08:44 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id E2AB3398F3; Sun, 18 Jan 2009 20:08:45 +0300 (MSK) Date: Sun, 18 Jan 2009 20:08:41 +0300 From: Stanislav Sedov To: Gavin Atkinson Message-Id: <20090118200841.3c9123bc.stas@FreeBSD.org> In-Reply-To: <20090118163938.G24894@ury.york.ac.uk> References: <200901181228.n0ICSjnT073457@svn.freebsd.org> <20090118163938.G24894@ury.york.ac.uk> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun Jan 18 20:08:47 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 4973621f967001658966741 Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r187391 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 17:08:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 18 Jan 2009 16:42:52 +0000 (GMT) Gavin Atkinson mentioned: > On Sun, 18 Jan 2009, Stanislav Sedov wrote: > > > Author: stas > > Date: Sun Jan 18 12:28:45 2009 > > New Revision: 187391 > > URL: http://svn.freebsd.org/changeset/base/187391 > > > > Log: > > - Merge r182477: > [snip] > > Use random MAC address if none configured instead of failing. > > Connected with this, I wonder if you could also merge r182524 and r182555? > These changes fix up the merged comments, and make the random MAC address > a locally assigned one, and not simply stolen from the range that Atmel > own. > Thanks for notice! I've forgot about them. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAklzYh0ACgkQK/VZk+smlYHLvwCfY3bRBFZYZbL4L/BHgVxpXsqb MOwAniE6wkKaK7sf5l5Di7fnzNfakZIB =+SVo -----END PGP SIGNATURE----- !DSPAM:4973621f967001658966741! From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 17:13:07 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C3E106566B; Sun, 18 Jan 2009 17:13:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247]) by mx1.freebsd.org (Postfix) with ESMTP id 840BD8FC1F; Sun, 18 Jan 2009 17:13:06 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id n0IGgqgN017236; Sun, 18 Jan 2009 16:42:52 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LOajc-0000UE-Jr; Sun, 18 Jan 2009 16:42:52 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id n0IGgqWZ009990; Sun, 18 Jan 2009 16:42:52 GMT (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id n0IGgq9P009987; Sun, 18 Jan 2009 16:42:52 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Sun, 18 Jan 2009 16:42:52 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Stanislav Sedov In-Reply-To: <200901181228.n0ICSjnT073457@svn.freebsd.org> Message-ID: <20090118163938.G24894@ury.york.ac.uk> References: <200901181228.n0ICSjnT073457@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r187391 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 17:13:07 -0000 On Sun, 18 Jan 2009, Stanislav Sedov wrote: > Author: stas > Date: Sun Jan 18 12:28:45 2009 > New Revision: 187391 > URL: http://svn.freebsd.org/changeset/base/187391 > > Log: > - Merge r182477: [snip] > Use random MAC address if none configured instead of failing. Connected with this, I wonder if you could also merge r182524 and r182555? These changes fix up the merged comments, and make the random MAC address a locally assigned one, and not simply stolen from the range that Atmel own. Thanks, Gavin From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 17:42:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 124B5106566B; Sun, 18 Jan 2009 17:42:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C59C18FC13; Sun, 18 Jan 2009 17:42:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0IHfLs7048688; Sun, 18 Jan 2009 10:41:21 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 18 Jan 2009 10:41:53 -0700 (MST) Message-Id: <20090118.104153.1631915192.imp@bsdimp.com> To: gavin@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090118163938.G24894@ury.york.ac.uk> References: <200901181228.n0ICSjnT073457@svn.freebsd.org> <20090118163938.G24894@ury.york.ac.uk> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: stas@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r187391 - in stable/7/sys: . arm/at91 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 17:42:55 -0000 In message: <20090118163938.G24894@ury.york.ac.uk> Gavin Atkinson writes: : On Sun, 18 Jan 2009, Stanislav Sedov wrote: : : > Author: stas : > Date: Sun Jan 18 12:28:45 2009 : > New Revision: 187391 : > URL: http://svn.freebsd.org/changeset/base/187391 : > : > Log: : > - Merge r182477: : [snip] : > Use random MAC address if none configured instead of failing. : : Connected with this, I wonder if you could also merge r182524 and r182555? : These changes fix up the merged comments, and make the random MAC address : a locally assigned one, and not simply stolen from the range that Atmel : own. In general, all the at91 changes from head should be safe to merge to releng_7. Warner From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 18:26:52 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA1A10656C2; Sun, 18 Jan 2009 18:26:52 +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 A941E8FC17; Sun, 18 Jan 2009 18:26:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IIQqXJ082848; Sun, 18 Jan 2009 18:26:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IIQqed082847; Sun, 18 Jan 2009 18:26:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181826.n0IIQqed082847@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 18:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187400 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 18:26:53 -0000 Author: alc Date: Sun Jan 18 18:26:52 2009 New Revision: 187400 URL: http://svn.freebsd.org/changeset/base/187400 Log: MFC rev 179887 Enforce the mapping of kernel loadable modules in the uppermost 2GB of the kernel virtual address space on amd64. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/link_elf_obj.c Modified: stable/7/sys/kern/link_elf_obj.c ============================================================================== --- stable/7/sys/kern/link_elf_obj.c Sun Jan 18 17:54:03 2009 (r187399) +++ stable/7/sys/kern/link_elf_obj.c Sun Jan 18 18:26:52 2009 (r187400) @@ -667,6 +667,13 @@ link_elf_load_file(linker_class_t cls, c goto out; } ef->address = (caddr_t) vm_map_min(kernel_map); + + /* + * In order to satisfy amd64's architectural requirements on the + * location of code and data in the kernel's address space, request a + * mapping that is above the kernel. + */ + mapbase = KERNBASE; error = vm_map_find(kernel_map, ef->object, 0, &mapbase, round_page(mapsize), TRUE, VM_PROT_ALL, VM_PROT_ALL, FALSE); if (error) { From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 18:50:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D48CB1065678; Sun, 18 Jan 2009 18:50:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C34DF8FC1B; Sun, 18 Jan 2009 18:50:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IIoIFu083425; Sun, 18 Jan 2009 18:50:18 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IIoIIV083424; Sun, 18 Jan 2009 18:50:18 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901181850.n0IIoIIV083424@svn.freebsd.org> From: Nick Hibma Date: Sun, 18 Jan 2009 18:50:18 +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: r187401 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 18:50:19 -0000 Author: n_hibma Date: Sun Jan 18 18:50:18 2009 New Revision: 187401 URL: http://svn.freebsd.org/changeset/base/187401 Log: Speling mistake. Modified: stable/7/sys/dev/ata/ata-all.c Modified: stable/7/sys/dev/ata/ata-all.c ============================================================================== --- stable/7/sys/dev/ata/ata-all.c Sun Jan 18 18:26:52 2009 (r187400) +++ stable/7/sys/dev/ata/ata-all.c Sun Jan 18 18:50:18 2009 (r187401) @@ -127,7 +127,7 @@ ata_attach(device_t dev) /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) - pause("ataatch", 1); + pause("attach", 1); ATA_RESET(dev); ATA_LOCKING(dev, ATA_LF_UNLOCK); From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 18:53:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7073A1065672; Sun, 18 Jan 2009 18:53:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E3988FC1B; Sun, 18 Jan 2009 18:53:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IIrRsc083516; Sun, 18 Jan 2009 18:53:27 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IIrRiQ083515; Sun, 18 Jan 2009 18:53:27 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901181853.n0IIrRiQ083515@svn.freebsd.org> From: Nick Hibma Date: Sun, 18 Jan 2009 18:53:27 +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: r187402 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 18:53:28 -0000 Author: n_hibma Date: Sun Jan 18 18:53:27 2009 New Revision: 187402 URL: http://svn.freebsd.org/changeset/base/187402 Log: Speling mistake. Modified: stable/7/share/man/man4/textdump.4 Modified: stable/7/share/man/man4/textdump.4 ============================================================================== --- stable/7/share/man/man4/textdump.4 Sun Jan 18 18:50:18 2009 (r187401) +++ stable/7/share/man/man4/textdump.4 Sun Jan 18 18:53:27 2009 (r187402) @@ -93,7 +93,7 @@ sysctl. .It Pa version.txt Kernel version string. My be disabled by clearing the -.Dv dbeug.ddb.textdump.do_panic +.Dv debug.ddb.textdump.do_panic sysctl. .El .Pp From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 18:54:41 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9BFB1065670; Sun, 18 Jan 2009 18:54:41 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984D48FC1F; Sun, 18 Jan 2009 18:54:41 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IIsf3D083580; Sun, 18 Jan 2009 18:54:41 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IIsfgD083579; Sun, 18 Jan 2009 18:54:41 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901181854.n0IIsfgD083579@svn.freebsd.org> From: Nick Hibma Date: Sun, 18 Jan 2009 18:54:41 +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: r187403 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 18:54:42 -0000 Author: n_hibma Date: Sun Jan 18 18:54:41 2009 New Revision: 187403 URL: http://svn.freebsd.org/changeset/base/187403 Log: Remark on the fact that a phone is supported by this driver. Just to give people a hint. Modified: stable/7/share/man/man4/umodem.4 Modified: stable/7/share/man/man4/umodem.4 ============================================================================== --- stable/7/share/man/man4/umodem.4 Sun Jan 18 18:53:27 2009 (r187402) +++ stable/7/share/man/man4/umodem.4 Sun Jan 18 18:54:41 2009 (r187403) @@ -96,6 +96,8 @@ Sierra MC5720 Wireless Modem Yamaha Broadband Wireless Router RTW65b .It ELSA MicroLink 56k USB modem +.It +Sony Ericsson W810i phone .El .Sh SEE ALSO .Xr tty 4 , From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 19:20:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6B0A1065676; Sun, 18 Jan 2009 19:20:10 +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 A4DA98FC1F; Sun, 18 Jan 2009 19:20:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IJKA2W084159; Sun, 18 Jan 2009 19:20:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IJKA6Z084158; Sun, 18 Jan 2009 19:20:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181920.n0IJKA6Z084158@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 19:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187404 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 19:20:11 -0000 Author: alc Date: Sun Jan 18 19:20:10 2009 New Revision: 187404 URL: http://svn.freebsd.org/changeset/base/187404 Log: MFC rev 179921 KERNBASE is not necessarily an address within the kernel map, e.g., PowerPC/AIM. Consequently, it should not be used to determine the maximum number of kernel map entries. Instead, use VM_MIN_KERNEL_ADDRESS, which marks the start of the kernel map on all architectures. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/vm/vm_map.c Modified: stable/7/sys/vm/vm_map.c ============================================================================== --- stable/7/sys/vm/vm_map.c Sun Jan 18 18:54:41 2009 (r187403) +++ stable/7/sys/vm/vm_map.c Sun Jan 18 19:20:10 2009 (r187404) @@ -294,7 +294,7 @@ void vm_init2(void) { uma_zone_set_obj(kmapentzone, &kmapentobj, lmin(cnt.v_page_count, - (VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE) / 8 + + (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / PAGE_SIZE) / 8 + maxproc * 2 + maxfiles); vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL, #ifdef INVARIANTS From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 19:33:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C182D1065674; Sun, 18 Jan 2009 19:33:55 +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 AFE328FC25; Sun, 18 Jan 2009 19:33:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IJXtS2084548; Sun, 18 Jan 2009 19:33:55 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IJXthp084547; Sun, 18 Jan 2009 19:33:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181933.n0IJXthp084547@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 19:33:55 +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: r187406 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 19:33:56 -0000 Author: alc Date: Sun Jan 18 19:33:55 2009 New Revision: 187406 URL: http://svn.freebsd.org/changeset/base/187406 Log: MFC rev 179923 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/vm/vm_kern.c Modified: stable/7/sys/vm/vm_kern.c ============================================================================== --- stable/7/sys/vm/vm_kern.c Sun Jan 18 19:25:36 2009 (r187405) +++ stable/7/sys/vm/vm_kern.c Sun Jan 18 19:33:55 2009 (r187406) @@ -502,8 +502,12 @@ kmem_init(start, end) /* N.B.: cannot use kgdb to debug, starting with this assignment ... */ kernel_map = m; (void) vm_map_insert(m, NULL, (vm_ooffset_t) 0, - VM_MIN_KERNEL_ADDRESS, start, VM_PROT_ALL, VM_PROT_ALL, - MAP_NOFAULT); +#ifdef __amd64__ + KERNBASE, +#else + VM_MIN_KERNEL_ADDRESS, +#endif + start, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); /* ... and ending with the completion of the above `insert' */ vm_map_unlock(m); } From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 19:37:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 548141065680; Sun, 18 Jan 2009 19:37:37 +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 3E2C78FC1C; Sun, 18 Jan 2009 19:37:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IJbbVD084666; Sun, 18 Jan 2009 19:37:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IJbbYL084665; Sun, 18 Jan 2009 19:37:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181937.n0IJbbYL084665@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 19:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187407 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 19:37:39 -0000 Author: alc Date: Sun Jan 18 19:37:36 2009 New Revision: 187407 URL: http://svn.freebsd.org/changeset/base/187407 Log: MFC rev 180598 Eliminate stale comments from kmem_malloc(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/vm/vm_kern.c Modified: stable/7/sys/vm/vm_kern.c ============================================================================== --- stable/7/sys/vm/vm_kern.c Sun Jan 18 19:33:55 2009 (r187406) +++ stable/7/sys/vm/vm_kern.c Sun Jan 18 19:37:36 2009 (r187407) @@ -267,9 +267,6 @@ kmem_suballoc(parent, min, max, size) * We don't worry about expanding the map (adding entries) since entries * for wired maps are statically allocated. * - * NOTE: This routine is not supposed to block if M_NOWAIT is set, but - * I have not verified that it actually does not block. - * * `map' is ONLY allowed to be kmem_map or one of the mbuf submaps to * which we never free. */ @@ -321,15 +318,6 @@ kmem_malloc(map, size, flags) vm_map_insert(map, kmem_object, offset, addr, addr + size, VM_PROT_ALL, VM_PROT_ALL, 0); - /* - * Note: if M_NOWAIT specified alone, allocate from - * interrupt-safe queues only (just the free list). If - * M_USE_RESERVE is also specified, we can also - * allocate from the cache. Neither of the latter two - * flags may be specified from an interrupt since interrupts - * are not allowed to mess with the cache queue. - */ - if ((flags & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; else From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 19:56:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A38341065672; Sun, 18 Jan 2009 19:56:13 +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 91B1A8FC16; Sun, 18 Jan 2009 19:56:13 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IJuDkO085143; Sun, 18 Jan 2009 19:56:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IJuDWF085142; Sun, 18 Jan 2009 19:56:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181956.n0IJuDWF085142@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 19:56:13 +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: r187408 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 19:56:14 -0000 Author: alc Date: Sun Jan 18 19:56:13 2009 New Revision: 187408 URL: http://svn.freebsd.org/changeset/base/187408 Log: MFC rev 179898 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/minidump_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 19:37:36 2009 (r187407) +++ stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 19:56:13 2009 (r187408) @@ -202,7 +202,7 @@ minidumpsys(struct dumperinfo *di) /* Walk page table pages, set bits in vm_page_dump */ ptesize = 0; pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* * We always write a page, even if it is zero. Each @@ -274,7 +274,7 @@ minidumpsys(struct dumperinfo *di) mdhdr.msgbufsize = msgbufp->msg_size; mdhdr.bitmapsize = vm_page_dump_size; mdhdr.ptesize = ptesize; - mdhdr.kernbase = KERNBASE; + mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS; mdhdr.dmapbase = DMAP_MIN_ADDRESS; mdhdr.dmapend = DMAP_MAX_ADDRESS; @@ -308,7 +308,7 @@ minidumpsys(struct dumperinfo *di) /* Dump kernel page table pages */ pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* We always write a page, even if it is zero */ if ((pdp[i] & PG_V) == 0) { From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 21:40:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D580410656F5; Sun, 18 Jan 2009 21:40:15 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42AB8FC17; Sun, 18 Jan 2009 21:40:15 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ILeF1w088006; Sun, 18 Jan 2009 21:40:15 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ILeFr4088005; Sun, 18 Jan 2009 21:40:15 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901182140.n0ILeFr4088005@svn.freebsd.org> From: Daniel Gerzo Date: Sun, 18 Jan 2009 21:40:15 +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: r187411 - in stable/7/lib/libc: . string sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 21:40:16 -0000 Author: danger (doc committer) Date: Sun Jan 18 21:40:15 2009 New Revision: 187411 URL: http://svn.freebsd.org/changeset/base/187411 Log: MFC r187098: - add missing include [2] - fix struct memeber's name [1] PR: docs/130413 [1] Submitted by: Thomas Mueller [1], rink@ [2] Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) stable/7/lib/libc/sys/timer_create.2 Modified: stable/7/lib/libc/sys/timer_create.2 ============================================================================== --- stable/7/lib/libc/sys/timer_create.2 Sun Jan 18 21:09:34 2009 (r187410) +++ stable/7/lib/libc/sys/timer_create.2 Sun Jan 18 21:40:15 2009 (r187411) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2000 +.Dd January 12, 2009 .Dt TIMER_CREATE 2 .Os .Sh NAME @@ -37,6 +37,7 @@ .Lb librt .Sh SYNOPSIS .In time.h +.In signal.h .Ft int .Fo timer_create .Fa "clockid_t clockid" "struct sigevent *restrict evp" @@ -100,7 +101,7 @@ or .Dv CLOCK_MONOTONIC . .Pp If -.Fa evp->sigev_sigev_notify +.Fa evp->sigev_notify is .Dv SIGEV_THREAD and From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 21:52:02 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1F81065675; Sun, 18 Jan 2009 21:52:02 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A811F8FC1D; Sun, 18 Jan 2009 21:52:02 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ILq27H088299; Sun, 18 Jan 2009 21:52:02 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ILq2B8088298; Sun, 18 Jan 2009 21:52:02 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200901182152.n0ILq2B8088298@svn.freebsd.org> From: Ulf Lilleengen Date: Sun, 18 Jan 2009 21:52:02 +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: r187412 - in stable/7/sys: . contrib/pf dev/cxgb geom/vinum X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 21:52:03 -0000 Author: lulf Date: Sun Jan 18 21:52:01 2009 New Revision: 187412 URL: http://svn.freebsd.org/changeset/base/187412 Log: MFC r186517: - Fix an issue with access permissions to underlying disks used by a gvinum plex. If the plex is a raid5 plex, and is being written to, parity data might have to be read from the underlying disks, requiring them to be opened for reading as well as writing. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/geom/vinum/geom_vinum_plex.c Modified: stable/7/sys/geom/vinum/geom_vinum_plex.c ============================================================================== --- stable/7/sys/geom/vinum/geom_vinum_plex.c Sun Jan 18 21:40:15 2009 (r187411) +++ stable/7/sys/geom/vinum/geom_vinum_plex.c Sun Jan 18 21:52:01 2009 (r187412) @@ -667,11 +667,21 @@ gv_plex_normal_request(struct gv_plex *p static int gv_plex_access(struct g_provider *pp, int dr, int dw, int de) { + struct gv_plex *p; struct g_geom *gp; struct g_consumer *cp, *cp2; int error; gp = pp->geom; + p = gp->softc; + KASSERT(p != NULL, ("NULL p")); + + if (p->org == GV_PLEX_RAID5) { + if (dw > 0 && dr == 0) + dr = 1; + else if (dw < 0 && dr == 0) + dr = -1; + } LIST_FOREACH(cp, &gp->consumer, consumer) { error = g_access(cp, dr, dw, de); From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 23:34:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A2211065672; Sun, 18 Jan 2009 23:34:18 +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 3EF178FC1A; Sun, 18 Jan 2009 23:34:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0INYInP091316; Sun, 18 Jan 2009 23:34:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0INYIFD091315; Sun, 18 Jan 2009 23:34:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901182334.n0INYIFD091315@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 23:34:18 +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: r187414 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 23:34:19 -0000 Author: alc Date: Sun Jan 18 23:34:17 2009 New Revision: 187414 URL: http://svn.freebsd.org/changeset/base/187414 Log: MFC rev 180362 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture: Rev 180333, ``Change create_pagetables() and pmap_init() so that many fewer page table pages have to be preallocated ...'', violates an assumption made by minidumpsys(): kernel_vm_end is the highest virtual address that has ever been used by the kernel. Now, however, the kernel code, data, and bss may reside at addresses beyond kernel_vm_end. This revision modifies the upper bound on minidumpsys()'s two page table traversals to account for this possibility. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/minidump_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 23:21:04 2009 (r187413) +++ stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 23:34:17 2009 (r187414) @@ -202,7 +202,8 @@ minidumpsys(struct dumperinfo *di) /* Walk page table pages, set bits in vm_page_dump */ ptesize = 0; pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR, + kernel_vm_end); va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* * We always write a page, even if it is zero. Each @@ -308,7 +309,8 @@ minidumpsys(struct dumperinfo *di) /* Dump kernel page table pages */ pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR, + kernel_vm_end); va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* We always write a page, even if it is zero */ if ((pdp[i] & PG_V) == 0) { From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 01:03:43 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 387AC106564A; Mon, 19 Jan 2009 01:03:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27A5E8FC19; Mon, 19 Jan 2009 01:03:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J13hPo093465; Mon, 19 Jan 2009 01:03:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J13gKp093463; Mon, 19 Jan 2009 01:03:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190103.n0J13gKp093463@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 01:03:42 +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: r187416 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 01:03:43 -0000 Author: alc Date: Mon Jan 19 01:03:42 2009 New Revision: 187416 URL: http://svn.freebsd.org/changeset/base/187416 Log: MFC rev 180262 Correct an error in the comments for init_param3(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_malloc.c stable/7/sys/kern/subr_param.c Modified: stable/7/sys/kern/kern_malloc.c ============================================================================== --- stable/7/sys/kern/kern_malloc.c Sun Jan 18 23:49:02 2009 (r187415) +++ stable/7/sys/kern/kern_malloc.c Mon Jan 19 01:03:42 2009 (r187416) @@ -618,7 +618,7 @@ kmeminit(void *dummy) vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE; /* - * Tune settings based on the kernel map's size at this time. + * Tune settings based on the kmem map's size at this time. */ init_param3(vm_kmem_size / PAGE_SIZE); Modified: stable/7/sys/kern/subr_param.c ============================================================================== --- stable/7/sys/kern/subr_param.c Sun Jan 18 23:49:02 2009 (r187415) +++ stable/7/sys/kern/subr_param.c Mon Jan 19 01:03:42 2009 (r187416) @@ -172,14 +172,14 @@ init_param2(long physpages) } /* - * Boot time overrides that are scaled against the kernel map + * Boot time overrides that are scaled against the kmem map */ void init_param3(long kmempages) { /* - * The default for maxpipekva is max(5% of the kernel map, 512KB). + * The default for maxpipekva is max(5% of the kmem map, 512KB). * See sys_pipe.c for more details. */ maxpipekva = (kmempages / 20) * PAGE_SIZE; From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 04:31:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF55A1065672; Mon, 19 Jan 2009 04:31:18 +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 BCBBF8FC1B; Mon, 19 Jan 2009 04:31:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J4VIxr097814; Mon, 19 Jan 2009 04:31:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J4VIoP097812; Mon, 19 Jan 2009 04:31:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190431.n0J4VIoP097812@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 04:31:18 +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: r187419 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 04:31:19 -0000 Author: alc Date: Mon Jan 19 04:31:18 2009 New Revision: 187419 URL: http://svn.freebsd.org/changeset/base/187419 Log: MFC rev 180255 Eliminate an unused declaration. (In fact, the declaration is bogus because the variable is defined static to pmap.c.) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/mp_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/mp_machdep.c Modified: stable/7/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/mp_machdep.c Mon Jan 19 02:37:10 2009 (r187418) +++ stable/7/sys/amd64/amd64/mp_machdep.c Mon Jan 19 04:31:18 2009 (r187419) @@ -79,7 +79,6 @@ int mcount_lock; int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ -extern int nkpt; extern struct pcpu __pcpu[]; Modified: stable/7/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/7/sys/i386/i386/mp_machdep.c Mon Jan 19 02:37:10 2009 (r187418) +++ stable/7/sys/i386/i386/mp_machdep.c Mon Jan 19 04:31:18 2009 (r187419) @@ -131,7 +131,6 @@ int mcount_lock; int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ -extern int nkpt; extern struct pcpu __pcpu[]; From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 05:20:52 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7AF6106566B; Mon, 19 Jan 2009 05:20:52 +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 D5BAA8FC17; Mon, 19 Jan 2009 05:20:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J5Kq4x098767; Mon, 19 Jan 2009 05:20:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J5KqTp098763; Mon, 19 Jan 2009 05:20:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190520.n0J5KqTp098763@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 05:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187420 - in stable/7/sys/amd64: amd64 include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 05:20:53 -0000 Author: alc Date: Mon Jan 19 05:20:52 2009 New Revision: 187420 URL: http://svn.freebsd.org/changeset/base/187420 Log: MFC partial merge of rev 179886 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture. Modified: stable/7/sys/amd64/amd64/mem.c stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/amd64/trap.c stable/7/sys/amd64/include/stack.h Modified: stable/7/sys/amd64/amd64/mem.c ============================================================================== --- stable/7/sys/amd64/amd64/mem.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/mem.c Mon Jan 19 05:20:52 2009 (r187420) @@ -119,7 +119,7 @@ kmemphys: addr = trunc_page(v); eaddr = round_page(v + c); - if (addr < (vm_offset_t)KERNBASE) + if (addr < VM_MIN_KERNEL_ADDRESS) return (EFAULT); for (; addr < eaddr; addr += PAGE_SIZE) if (pmap_extract(kernel_pmap, addr) == 0) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/pmap.c Mon Jan 19 05:20:52 2009 (r187420) @@ -1493,7 +1493,7 @@ pmap_release(pmap_t pmap) static int kvm_size(SYSCTL_HANDLER_ARGS) { - unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; + unsigned long ksize = VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS; return sysctl_handle_long(oidp, &ksize, 0, req); } @@ -1523,7 +1523,7 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { - kernel_vm_end = KERNBASE; + kernel_vm_end = VM_MIN_KERNEL_ADDRESS; nkpt = 0; while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) { kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); Modified: stable/7/sys/amd64/amd64/trap.c ============================================================================== --- stable/7/sys/amd64/amd64/trap.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/trap.c Mon Jan 19 05:20:52 2009 (r187420) @@ -610,7 +610,7 @@ trap_pfault(frame, usermode) vm_offset_t eva = frame->tf_addr; va = trunc_page(eva); - if (va >= KERNBASE) { + if (va >= VM_MIN_KERNEL_ADDRESS) { /* * Don't allow user-mode faults in kernel address space. */ Modified: stable/7/sys/amd64/include/stack.h ============================================================================== --- stable/7/sys/amd64/include/stack.h Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/include/stack.h Mon Jan 19 05:20:52 2009 (r187420) @@ -33,7 +33,7 @@ * Stack trace. */ #define INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \ - || ((va) >= KERNBASE && (va) < VM_MAX_KERNEL_ADDRESS)) + || ((va) >= VM_MIN_KERNEL_ADDRESS && (va) < VM_MAX_KERNEL_ADDRESS)) struct amd64_frame { struct amd64_frame *f_frame; From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 06:55:29 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D65106564A; Mon, 19 Jan 2009 06:55: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 B2B0F8FC17; Mon, 19 Jan 2009 06:55:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J6tTja000990; Mon, 19 Jan 2009 06:55:29 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J6tTEr000988; Mon, 19 Jan 2009 06:55:29 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190655.n0J6tTEr000988@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 06:55:29 +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: r187425 - in stable/7/sys: . amd64/include contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 06:55:30 -0000 Author: alc Date: Mon Jan 19 06:55:29 2009 New Revision: 187425 URL: http://svn.freebsd.org/changeset/base/187425 Log: MFC rev 180101 Strictly speaking, the definition of VM_MAX_KERNEL_ADDRESS is wrong. However, in practice, the error (currently) makes no difference because the computation performed by KVADDR() hides the error. This revision fixes the error. Also, eliminate a (now) unused definition. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/pmap.h stable/7/sys/amd64/include/vmparam.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/include/pmap.h ============================================================================== --- stable/7/sys/amd64/include/pmap.h Mon Jan 19 06:42:44 2009 (r187424) +++ stable/7/sys/amd64/include/pmap.h Mon Jan 19 06:55:29 2009 (r187425) @@ -110,7 +110,6 @@ #define NKPML4E 1 /* number of kernel PML4 slots */ #define NKPDPE 1 /* number of kernel PDP slots */ -#define NKPDE (NKPDPE*NPDEPG) /* number of kernel PD slots */ #define NUPML4E (NPML4EPG/2) /* number of userland PML4 pages */ #define NUPDPE (NUPML4E*NPDPEPG)/* number of userland PDP pages */ Modified: stable/7/sys/amd64/include/vmparam.h ============================================================================== --- stable/7/sys/amd64/include/vmparam.h Mon Jan 19 06:42:44 2009 (r187424) +++ stable/7/sys/amd64/include/vmparam.h Mon Jan 19 06:55:29 2009 (r187425) @@ -147,7 +147,7 @@ * 0xffffffff80000000 KERNBASE */ -#define VM_MAX_KERNEL_ADDRESS KVADDR(KPML4I, NPDPEPG-1, NKPDE-1, NPTEPG-1) +#define VM_MAX_KERNEL_ADDRESS KVADDR(KPML4I, NPDPEPG-1, NPDEPG-1, NPTEPG-1) #define VM_MIN_KERNEL_ADDRESS KVADDR(KPML4I, KPDPI, 0, 0) #define DMAP_MIN_ADDRESS KVADDR(DMPML4I, 0, 0, 0) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 07:44:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62F1E106564A; Mon, 19 Jan 2009 07:44:18 +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 50C738FC08; Mon, 19 Jan 2009 07:44:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0J7iIBt002175; Mon, 19 Jan 2009 07:44:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J7iIwp002174; Mon, 19 Jan 2009 07:44:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190744.n0J7iIwp002174@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 07:44:18 +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: r187428 - in stable/7/sys: . amd64/include contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 07:44:19 -0000 Author: alc Date: Mon Jan 19 07:44:18 2009 New Revision: 187428 URL: http://svn.freebsd.org/changeset/base/187428 Log: MFC rev 180108 Compute NKPDPE from NKPT. This reduces the number of knobs that must be turned in order to change the size of the kernel virtual address space. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/pmap.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/include/pmap.h ============================================================================== --- stable/7/sys/amd64/include/pmap.h Mon Jan 19 07:18:32 2009 (r187427) +++ stable/7/sys/amd64/include/pmap.h Mon Jan 19 07:44:18 2009 (r187428) @@ -109,7 +109,7 @@ #endif #define NKPML4E 1 /* number of kernel PML4 slots */ -#define NKPDPE 1 /* number of kernel PDP slots */ +#define NKPDPE howmany(NKPT, NPDEPG)/* number of kernel PDP slots */ #define NUPML4E (NPML4EPG/2) /* number of userland PML4 pages */ #define NUPDPE (NUPML4E*NPDPEPG)/* number of userland PDP pages */ From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 10:44:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 103B01065672; Mon, 19 Jan 2009 10:44:17 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25708FC18; Mon, 19 Jan 2009 10:44:16 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JAiGwr008053; Mon, 19 Jan 2009 10:44:16 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JAiGVF008052; Mon, 19 Jan 2009 10:44:16 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901191044.n0JAiGVF008052@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Jan 2009 10:44: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: r187431 - stable/7/usr.bin/netstat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 10:44:17 -0000 Author: ru Date: Mon Jan 19 10:44:16 2009 New Revision: 187431 URL: http://svn.freebsd.org/changeset/base/187431 Log: MFC: - Fix crash with "netstat -m -N foo". PR: bin/124724 - Sync usage() with SYNOPSIS. Modified: stable/7/usr.bin/netstat/ (props changed) stable/7/usr.bin/netstat/main.c Modified: stable/7/usr.bin/netstat/main.c ============================================================================== --- stable/7/usr.bin/netstat/main.c Mon Jan 19 08:51:20 2009 (r187430) +++ stable/7/usr.bin/netstat/main.c Mon Jan 19 10:44:16 2009 (r187431) @@ -503,7 +503,7 @@ main(int argc, char *argv[]) exit(0); } if (mflag) { - if (memf != NULL) { + if (!live) { if (kread(0, NULL, 0) == 0) mbpr(kvmd, nl[N_MBSTAT].n_value); } else @@ -768,15 +768,16 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: netstat [-AaLnSW] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnt] [-f address_family]\n" +" netstat -i | -I interface [-abdhntW] [-f address_family]\n" " [-M core] [-N system]", " netstat -w wait [-I interface] [-d] [-M core] [-N system]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]", +" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" [-M core] [-N system]", " netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", -" netstat -B [ -I interface]", -" netstat -r [-AenW] [-f address_family] [-M core] [-N system]", +" netstat -B [-I interface]", +" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", " netstat -g [-W] [-f address_family] [-M core] [-N system]", " netstat -gs [-s] [-f address_family] [-M core] [-N system]"); From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 15:36:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601571065678; Mon, 19 Jan 2009 15:36:25 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C80C8FC1F; Mon, 19 Jan 2009 15:36:25 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JFaPQt014130; Mon, 19 Jan 2009 15:36:25 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JFaPTN014129; Mon, 19 Jan 2009 15:36:25 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200901191536.n0JFaPTN014129@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 19 Jan 2009 15:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 15:36:28 -0000 Author: sobomax Date: Mon Jan 19 15:36:25 2009 New Revision: 187434 URL: http://svn.freebsd.org/changeset/base/187434 Log: MFC: take NTFS option out to match i386 GENERIC. Modified: stable/7/sys/amd64/conf/GENERIC Modified: stable/7/sys/amd64/conf/GENERIC ============================================================================== --- stable/7/sys/amd64/conf/GENERIC Mon Jan 19 15:33:06 2009 (r187433) +++ stable/7/sys/amd64/conf/GENERIC Mon Jan 19 15:36:25 2009 (r187434) @@ -41,7 +41,6 @@ options NFSCLIENT # Network Filesystem options NFSSERVER # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options NTFS # NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 15:38:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9731E106564A; Mon, 19 Jan 2009 15:38:26 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84EAA8FC1A; Mon, 19 Jan 2009 15:38:26 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JFcQIf014203; Mon, 19 Jan 2009 15:38:26 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JFcQla014202; Mon, 19 Jan 2009 15:38:26 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200901191538.n0JFcQla014202@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 19 Jan 2009 15:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187435 - stable/6/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 15:38:27 -0000 Author: sobomax Date: Mon Jan 19 15:38:26 2009 New Revision: 187435 URL: http://svn.freebsd.org/changeset/base/187435 Log: MFC: take NTFS out to match i386 GENERIC. Modified: stable/6/sys/amd64/conf/GENERIC Modified: stable/6/sys/amd64/conf/GENERIC ============================================================================== --- stable/6/sys/amd64/conf/GENERIC Mon Jan 19 15:36:25 2009 (r187434) +++ stable/6/sys/amd64/conf/GENERIC Mon Jan 19 15:38:26 2009 (r187435) @@ -40,7 +40,6 @@ options NFSCLIENT # Network Filesystem options NFSSERVER # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options NTFS # NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 15:55:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9008D106566B; Mon, 19 Jan 2009 15:55:13 +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 65B608FC0A; Mon, 19 Jan 2009 15:55:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id F3A5D46B03; Mon, 19 Jan 2009 10:55:12 -0500 (EST) Date: Mon, 19 Jan 2009 15:55:12 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Maxim Sobolev In-Reply-To: <200901191536.n0JFaPTN014129@svn.freebsd.org> Message-ID: References: <200901191536.n0JFaPTN014129@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: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 15:55:15 -0000 On Mon, 19 Jan 2009, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Jan 19 15:36:25 2009 > New Revision: 187434 > URL: http://svn.freebsd.org/changeset/base/187434 > > Log: > MFC: take NTFS option out to match i386 GENERIC. Are you going to modify UPDATING to say that "options NTFS" will now be required where it wasn't previously on amd64? Also, insta-MFC's are generally a bad idea, even for changes believed harmless, as they often have unexpected side effects. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > stable/7/sys/amd64/conf/GENERIC > > Modified: stable/7/sys/amd64/conf/GENERIC > ============================================================================== > --- stable/7/sys/amd64/conf/GENERIC Mon Jan 19 15:33:06 2009 (r187433) > +++ stable/7/sys/amd64/conf/GENERIC Mon Jan 19 15:36:25 2009 (r187434) > @@ -41,7 +41,6 @@ options NFSCLIENT # Network Filesystem > options NFSSERVER # Network Filesystem Server > options NFSLOCKD # Network Lock Manager > options NFS_ROOT # NFS usable as /, requires NFSCLIENT > -options NTFS # NT File System > options MSDOSFS # MSDOS Filesystem > options CD9660 # ISO 9660 Filesystem > options PROCFS # Process filesystem (requires PSEUDOFS) > From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 16:23:08 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29F410656F3; Mon, 19 Jan 2009 16:23:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 83D058FC17; Mon, 19 Jan 2009 16:23:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id AF453FEF4; Tue, 20 Jan 2009 04:52:48 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id haiPCldKrIhD; Tue, 20 Jan 2009 04:52:45 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Tue, 20 Jan 2009 04:52:45 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id AFE841142C; Tue, 20 Jan 2009 04:52:44 +1300 (NZDT) Date: Mon, 19 Jan 2009 07:52:44 -0800 From: Andrew Thompson To: Maxim Sobolev Message-ID: <20090119155244.GB44812@citylink.fud.org.nz> References: <200901191538.n0JFcQla014202@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901191538.n0JFcQla014202@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 16:23:10 -0000 On Mon, Jan 19, 2009 at 03:38:26PM +0000, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Jan 19 15:38:26 2009 > New Revision: 187435 > URL: http://svn.freebsd.org/changeset/base/187435 > > Log: > MFC: take NTFS out to match i386 GENERIC. > > Modified: > stable/6/sys/amd64/conf/GENERIC > > Modified: stable/6/sys/amd64/conf/GENERIC > ============================================================================== > --- stable/6/sys/amd64/conf/GENERIC Mon Jan 19 15:36:25 2009 (r187434) > +++ stable/6/sys/amd64/conf/GENERIC Mon Jan 19 15:38:26 2009 (r187435) > @@ -40,7 +40,6 @@ options NFSCLIENT # Network Filesystem > options NFSSERVER # Network Filesystem Server > options NFSLOCKD # Network Lock Manager > options NFS_ROOT # NFS usable as /, requires NFSCLIENT > -options NTFS # NT File System > options MSDOSFS # MSDOS Filesystem > options CD9660 # ISO 9660 Filesystem > options PROCFS # Process filesystem (requires PSEUDOFS) Easy on, this is a stable branch. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 16:54:32 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE5C61065689; Mon, 19 Jan 2009 16:54:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9869F8FC30; Mon, 19 Jan 2009 16:54:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n0JGsVbR018810; Mon, 19 Jan 2009 08:54:31 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n0JGsUAn018809; Mon, 19 Jan 2009 08:54:30 -0800 (PST) (envelope-from obrien) Date: Mon, 19 Jan 2009 08:54:30 -0800 From: "David O'Brien" To: Maxim Sobolev Message-ID: <20090119165430.GA18775@dragon.NUXI.org> References: <200901191538.n0JFcQla014202@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901191538.n0JFcQla014202@svn.freebsd.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org Subject: Re: svn commit: r187435 - stable/6/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 16:54:33 -0000 On Mon, Jan 19, 2009 at 03:38:26PM +0000, Maxim Sobolev wrote: > Author: sobomax > Date: Mon Jan 19 15:38:26 2009 > New Revision: 187435 > URL: http://svn.freebsd.org/changeset/base/187435 > > Log: > MFC: take NTFS out to match i386 GENERIC. > > Modified: > stable/6/sys/amd64/conf/GENERIC .. > Modified: stable/6/sys/amd64/conf/GENERIC > -options NTFS # NT File System Seriously - this is the type of change that could easily piss off our users. Please back it out. At this point for 6.x this is really a POLA issue. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 17:14:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E76E7106564A; Mon, 19 Jan 2009 17:14:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5B7B8FC16; Mon, 19 Jan 2009 17:14:03 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JHE3Sb016365; Mon, 19 Jan 2009 17:14:03 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JHE3fA016364; Mon, 19 Jan 2009 17:14:03 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200901191714.n0JHE3fA016364@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 19 Jan 2009 17:14:03 +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: r187440 - stable/7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 17:14:04 -0000 Author: sobomax Date: Mon Jan 19 17:14:03 2009 New Revision: 187440 URL: http://svn.freebsd.org/changeset/base/187440 Log: MFC: mention removal of NTFS from GENERIC/amd64. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Mon Jan 19 17:03:46 2009 (r187439) +++ stable/7/UPDATING Mon Jan 19 17:14:03 2009 (r187440) @@ -8,6 +8,14 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090119: + NTFS has been removed from GENERIC kernel on amd64 to match + GENERIC on i386. Should not cause any issues since mount_ntfs(8) + will load ntfs.ko module automatically when NTFS support is + actually needed, unless ntfs.ko is not installed or security + level prohibits loading kernel modules. If either is the case, + "options NTFS" has to be added into kernel config. + 20090110: powerd(8) was updated to get better SMP support. Meanings of the -i and -r command line options were changed. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 17:17:32 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C50E2106566B; Mon, 19 Jan 2009 17:17:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B31CF8FC0C; Mon, 19 Jan 2009 17:17:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JHHWuT016466; Mon, 19 Jan 2009 17:17:32 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JHHWHL016465; Mon, 19 Jan 2009 17:17:32 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200901191717.n0JHHWHL016465@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 19 Jan 2009 17:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187441 - stable/6/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 17:17:33 -0000 Author: sobomax Date: Mon Jan 19 17:17:32 2009 New Revision: 187441 URL: http://svn.freebsd.org/changeset/base/187441 Log: Put NTFS back, it's probably not worth to touch 6-STABLE now when it's in the maintenance mode and AFAIK no more releases are planned from this branch. Modified: stable/6/sys/amd64/conf/GENERIC Modified: stable/6/sys/amd64/conf/GENERIC ============================================================================== --- stable/6/sys/amd64/conf/GENERIC Mon Jan 19 17:14:03 2009 (r187440) +++ stable/6/sys/amd64/conf/GENERIC Mon Jan 19 17:17:32 2009 (r187441) @@ -40,6 +40,7 @@ options NFSCLIENT # Network Filesystem options NFSSERVER # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options NTFS # NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 17:20:22 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EC410657C3; Mon, 19 Jan 2009 17:20:22 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 0C0098FC0A; Mon, 19 Jan 2009 17:20:21 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0JGvhxP013803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jan 2009 08:57:43 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4974B0FD.2060104@FreeBSD.org> Date: Mon, 19 Jan 2009 08:57:33 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Robert Watson References: <200901191536.n0JFaPTN014129@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 17:20:23 -0000 Robert Watson wrote: > > On Mon, 19 Jan 2009, Maxim Sobolev wrote: > >> Author: sobomax >> Date: Mon Jan 19 15:36:25 2009 >> New Revision: 187434 >> URL: http://svn.freebsd.org/changeset/base/187434 >> >> Log: >> MFC: take NTFS option out to match i386 GENERIC. > > Are you going to modify UPDATING to say that "options NTFS" will now be > required where it wasn't previously on amd64? It should not cause any issues, as the mount_ntfs(8) auto-loads ntfs.ko module as needed. However, I am adding UPDATING entry just in case. -Maxim From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:10:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0405F106568A; Mon, 19 Jan 2009 21:10:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3B4E8FC1B; Mon, 19 Jan 2009 21:10:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLA4Tb021326; Mon, 19 Jan 2009 21:10:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLA4PX021325; Mon, 19 Jan 2009 21:10:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192110.n0JLA4PX021325@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:10:04 +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: r187446 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:10:06 -0000 Author: marius Date: Mon Jan 19 21:10:04 2009 New Revision: 187446 URL: http://svn.freebsd.org/changeset/base/187446 Log: - MFC: 174903 Mention support for the 5722 driver in bge.4 as well. - MFC: 187315 Sync the description of jumbo frame support with reality as of r187309; it's also supported with BCM5702 (matched by BGE_ASICREV_BCM5703) but bge(4) currently doesn't with neither BCM5714 nor BCM5780. Modified: stable/7/share/man/man4/bge.4 Modified: stable/7/share/man/man4/bge.4 ============================================================================== --- stable/7/share/man/man4/bge.4 Mon Jan 19 19:16:50 2009 (r187445) +++ stable/7/share/man/man4/bge.4 Mon Jan 19 21:10:04 2009 (r187446) @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2007 +.Dd January 15, 2009 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd "Broadcom BCM570x/5714/5721/5750/5751/5752/5789 PCI Gigabit Ethernet adapter driver" +.Nd "Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5789 PCI Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,7 +56,7 @@ if_bge_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5750, 5751, 5752 and 5789 families of Gigabit Ethernet +5714, 5721, 5722, 5750, 5751, 5752 and 5789 families of Gigabit Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5703, BCM5704, BCM5714 and BCM5780 also support +The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:42:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C85AF106564A; Mon, 19 Jan 2009 21:42:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A97D8FC14; Mon, 19 Jan 2009 21:42:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLgs20022251; Mon, 19 Jan 2009 21:42:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLgsGs022250; Mon, 19 Jan 2009 21:42:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192142.n0JLgsGs022250@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187448 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:42:55 -0000 Author: marius Date: Mon Jan 19 21:42:54 2009 New Revision: 187448 URL: http://svn.freebsd.org/changeset/base/187448 Log: - MFC: 174903 Mention support for the 5722 driver in bge.4 as well. - MFC: 187315 Sync the description of jumbo frame support with reality as of r187309; it's also supported with BCM5702 (matched by BGE_ASICREV_BCM5703) but bge(4) currently doesn't with neither BCM5714 nor BCM5780. Modified: stable/7/share/man/man4/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:43:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B3A5106568D; Mon, 19 Jan 2009 21:43:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA6F8FC1B; Mon, 19 Jan 2009 21:43:49 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLhmTV022308; Mon, 19 Jan 2009 21:43:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLhmIq022307; Mon, 19 Jan 2009 21:43:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192143.n0JLhmIq022307@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187449 - stable/6/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:43:50 -0000 Author: marius Date: Mon Jan 19 21:43:48 2009 New Revision: 187449 URL: http://svn.freebsd.org/changeset/base/187449 Log: - MFC: 154328 Add the HP NC7771 adapter to the list of known products. - MFC: 162584 Add documentation on the new bge tunable. Also put the tunable docs into a separate section. - MFC: 162825 Spelling - MFC: 169881 (bge.4 part) Remove BCM5704S specific tunable (hw.bge.fake_autoneg) and auto-detect the condition. - MFC: 174903 Mention support for the 5722 driver in bge.4 as well. - MFC: 187315 Sync the description of jumbo frame support with reality as of r187310; it's also supported with BCM5702 (matched by BGE_ASICREV_BCM5703) but bge(4) currently doesn't with neither BCM5714 nor BCM5780. Modified: stable/6/share/man/man4/ (props changed) stable/6/share/man/man4/bge.4 Modified: stable/6/share/man/man4/bge.4 ============================================================================== --- stable/6/share/man/man4/bge.4 Mon Jan 19 21:42:54 2009 (r187448) +++ stable/6/share/man/man4/bge.4 Mon Jan 19 21:43:48 2009 (r187449) @@ -31,12 +31,12 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2007 +.Dd January 15, 2009 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd "Broadcom BCM570x/5714/5721/5750/5751/5752/5789 PCI Gigabit Ethernet adapter driver" +.Nd "Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5789 PCI Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,7 +56,7 @@ if_bge_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5750, 5751, 5752 and 5789 families of Gigabit Ethernet +5714, 5721, 5722, 5750, 5751, 5752 and 5789 families of Gigabit Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5703, BCM5704, BCM5714 and BCM5780 also support +The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the @@ -194,6 +194,8 @@ HP ProLiant NC7760 embedded Gigabit NIC .It HP ProLiant NC7770 PCI-X Gigabit NIC (10/100/1000baseTX) .It +HP ProLiant NC7771 PCI-X Gigabit NIC (10/100/1000baseTX) +.It HP ProLiant NC7781 embedded PCI-X Gigabit NIC (10/100/1000baseTX) .It Netgear GA302T (10/100/1000baseTX) @@ -202,6 +204,17 @@ SysKonnect SK-9D21 (10/100/1000baseTX) .It SysKonnect SK-9D41 (1000baseSX) .El +.Sh LOADER TUNABLES +The following tunable can be set at the +.Xr loader 8 +prompt before booting the kernel, or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.bge.allow_asf +Allow the ASF feature for cooperating with IPMI. +Can cause system lockup problems on a small number of systems. +Disabled by default. +.El .Sh DIAGNOSTICS .Bl -diag .It "bge%d: couldn't map memory" From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:47:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70829106568C; Mon, 19 Jan 2009 21:47:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CF688FC2A; Mon, 19 Jan 2009 21:47:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLl1Sa022455; Mon, 19 Jan 2009 21:47:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLl1YA022453; Mon, 19 Jan 2009 21:47:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192147.n0JLl1YA022453@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:47:01 +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: r187450 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:47:02 -0000 Author: marius Date: Mon Jan 19 21:47:01 2009 New Revision: 187450 URL: http://svn.freebsd.org/changeset/base/187450 Log: MFC: r187316 Don't cross-reference gem(4) and hme(4); maybe this made some sense back when these two were the only two NIC drivers working on sparc64 but it no longer does nowadays. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/gem.4 stable/7/share/man/man4/hme.4 Modified: stable/7/share/man/man4/gem.4 ============================================================================== --- stable/7/share/man/man4/gem.4 Mon Jan 19 21:43:48 2009 (r187449) +++ stable/7/share/man/man4/gem.4 Mon Jan 19 21:47:01 2009 (r187450) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2007 +.Dd January 15, 2009 .Dt GEM 4 .Os .Sh NAME @@ -115,7 +115,6 @@ driver fails to attach to Sun Gigabit Et as no SBus front-end has been written so far. .Sh SEE ALSO .Xr altq 4 , -.Xr hme 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr eeprom 8 , Modified: stable/7/share/man/man4/hme.4 ============================================================================== --- stable/7/share/man/man4/hme.4 Mon Jan 19 21:43:48 2009 (r187449) +++ stable/7/share/man/man4/hme.4 Mon Jan 19 21:47:01 2009 (r187450) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd January 15, 2009 .Dt HME 4 .Os .Sh NAME @@ -120,7 +120,6 @@ on boards equipped with more than one Et except the single-port SBus versions. .Sh SEE ALSO .Xr altq 4 , -.Xr gem 4 , .Xr intro 4 , .Xr miibus 4 , .Xr netintro 4 , From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:47:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E4D1065675; Mon, 19 Jan 2009 21:47:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50E6C8FC0C; Mon, 19 Jan 2009 21:47:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLl6m7022495; Mon, 19 Jan 2009 21:47:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLl6Fe022493; Mon, 19 Jan 2009 21:47:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192147.n0JLl6Fe022493@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187451 - stable/6/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:47:09 -0000 Author: marius Date: Mon Jan 19 21:47:06 2009 New Revision: 187451 URL: http://svn.freebsd.org/changeset/base/187451 Log: MFC: r187316 Don't cross-reference gem(4) and hme(4); maybe this made some sense back when these two were the only two NIC drivers working on sparc64 but it no longer does nowadays. Modified: stable/6/share/man/man4/ (props changed) stable/6/share/man/man4/gem.4 stable/6/share/man/man4/hme.4 Modified: stable/6/share/man/man4/gem.4 ============================================================================== --- stable/6/share/man/man4/gem.4 Mon Jan 19 21:47:01 2009 (r187450) +++ stable/6/share/man/man4/gem.4 Mon Jan 19 21:47:06 2009 (r187451) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2007 +.Dd January 15, 2009 .Dt GEM 4 .Os .Sh NAME @@ -115,7 +115,6 @@ driver fails to attach to Sun Gigabit Et as no SBus front-end has been written so far. .Sh SEE ALSO .Xr altq 4 , -.Xr hme 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr eeprom 8 , Modified: stable/6/share/man/man4/hme.4 ============================================================================== --- stable/6/share/man/man4/hme.4 Mon Jan 19 21:47:01 2009 (r187450) +++ stable/6/share/man/man4/hme.4 Mon Jan 19 21:47:06 2009 (r187451) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd January 15, 2009 .Dt HME 4 .Os .Sh NAME @@ -120,7 +120,6 @@ on boards equipped with more than one Et except the single-port SBus versions. .Sh SEE ALSO .Xr altq 4 , -.Xr gem 4 , .Xr intro 4 , .Xr miibus 4 , .Xr netintro 4 , From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:49:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB171065690; Mon, 19 Jan 2009 21:49:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 587898FC08; Mon, 19 Jan 2009 21:49:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLnMup022605; Mon, 19 Jan 2009 21:49:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLnM0g022604; Mon, 19 Jan 2009 21:49:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192149.n0JLnM0g022604@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:49:22 +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: r187452 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:49:24 -0000 Author: marius Date: Mon Jan 19 21:49:22 2009 New Revision: 187452 URL: http://svn.freebsd.org/changeset/base/187452 Log: MFC: r187341 Update URL. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/hme.4 Modified: stable/7/share/man/man4/hme.4 ============================================================================== --- stable/7/share/man/man4/hme.4 Mon Jan 19 21:47:06 2009 (r187451) +++ stable/7/share/man/man4/hme.4 Mon Jan 19 21:49:22 2009 (r187452) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2009 +.Dd January 16, 2009 .Dt HME 4 .Os .Sh NAME @@ -129,7 +129,7 @@ except the single-port SBus versions. .%T "STP2002QFP Fast Ethernet, Parallel Port, SCSI (FEPS) User's Guide" .%D April 1996 .%A Sun Microelectronics -.%O http://www.sun.com/oem/products/manuals/STP2002QFP-UG.pdf +.%O http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf .Re .Sh HISTORY The From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 21:49:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655B510656C4; Mon, 19 Jan 2009 21:49:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 525E28FC0C; Mon, 19 Jan 2009 21:49:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0JLnkBB022646; Mon, 19 Jan 2009 21:49:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0JLnkF1022645; Mon, 19 Jan 2009 21:49:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901192149.n0JLnkF1022645@svn.freebsd.org> From: Marius Strobl Date: Mon, 19 Jan 2009 21:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187453 - stable/6/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 21:49:47 -0000 Author: marius Date: Mon Jan 19 21:49:46 2009 New Revision: 187453 URL: http://svn.freebsd.org/changeset/base/187453 Log: MFC: r187341 Update URL. Modified: stable/6/share/man/man4/ (props changed) stable/6/share/man/man4/hme.4 Modified: stable/6/share/man/man4/hme.4 ============================================================================== --- stable/6/share/man/man4/hme.4 Mon Jan 19 21:49:22 2009 (r187452) +++ stable/6/share/man/man4/hme.4 Mon Jan 19 21:49:46 2009 (r187453) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2009 +.Dd January 16, 2009 .Dt HME 4 .Os .Sh NAME @@ -129,7 +129,7 @@ except the single-port SBus versions. .%T "STP2002QFP Fast Ethernet, Parallel Port, SCSI (FEPS) User's Guide" .%D April 1996 .%A Sun Microelectronics -.%O http://www.sun.com/oem/products/manuals/STP2002QFP-UG.pdf +.%O http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf .Re .Sh HISTORY The From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 01:12:11 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4987A106566B; Tue, 20 Jan 2009 01:12:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 081CF8FC08; Tue, 20 Jan 2009 01:12:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0K1AnY0082142; Mon, 19 Jan 2009 18:10:49 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 19 Jan 2009 18:11:24 -0700 (MST) Message-Id: <20090119.181124.-1270972755.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: <200901191536.n0JFaPTN014129@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sobomax@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org, svn-src-stable@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 01:12:12 -0000 In message: Robert Watson writes: : : On Mon, 19 Jan 2009, Maxim Sobolev wrote: : : > Author: sobomax : > Date: Mon Jan 19 15:36:25 2009 : > New Revision: 187434 : > URL: http://svn.freebsd.org/changeset/base/187434 : > : > Log: : > MFC: take NTFS option out to match i386 GENERIC. : : Are you going to modify UPDATING to say that "options NTFS" will now be : required where it wasn't previously on amd64? Also, insta-MFC's are generally : a bad idea, even for changes believed harmless, as they often have unexpected : side effects. Especially since NTFS works very well in 6.x and I think in 7.x. It is only in -current that there are issues exposed by other work... Warner From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 01:18:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 879201065678; Tue, 20 Jan 2009 01:18:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4592B8FC16; Tue, 20 Jan 2009 01:18:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0K1Ej5O082203; Mon, 19 Jan 2009 18:14:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 19 Jan 2009 18:15:19 -0700 (MST) Message-Id: <20090119.181519.1622466713.imp@bsdimp.com> To: sobomax@freebsd.org From: "M. Warner Losh" In-Reply-To: <4974B0FD.2060104@FreeBSD.org> References: <200901191536.n0JFaPTN014129@svn.freebsd.org> <4974B0FD.2060104@FreeBSD.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 01:18:19 -0000 In message: <4974B0FD.2060104@FreeBSD.org> Maxim Sobolev writes: : Robert Watson wrote: : > : > On Mon, 19 Jan 2009, Maxim Sobolev wrote: : > : >> Author: sobomax : >> Date: Mon Jan 19 15:36:25 2009 : >> New Revision: 187434 : >> URL: http://svn.freebsd.org/changeset/base/187434 : >> : >> Log: : >> MFC: take NTFS option out to match i386 GENERIC. : > : > Are you going to modify UPDATING to say that "options NTFS" will now be : > required where it wasn't previously on amd64? : : It should not cause any issues, as the mount_ntfs(8) auto-loads ntfs.ko : module as needed. However, I am adding UPDATING entry just in case. it won't do that if you are running at a high secure level... Warner From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 01:45:58 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 898C21065672; Tue, 20 Jan 2009 01:45:58 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3468FC13; Tue, 20 Jan 2009 01:45:58 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0K1jtgV040713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jan 2009 17:45:56 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <49752CC7.3040000@FreeBSD.org> Date: Mon, 19 Jan 2009 17:45:43 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: "M. Warner Losh" References: <200901191536.n0JFaPTN014129@svn.freebsd.org> <4974B0FD.2060104@FreeBSD.org> <20090119.181519.1622466713.imp@bsdimp.com> In-Reply-To: <20090119.181519.1622466713.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rwatson@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 01:45:59 -0000 M. Warner Losh wrote: > In message: <4974B0FD.2060104@FreeBSD.org> > Maxim Sobolev writes: > : Robert Watson wrote: > : > > : > On Mon, 19 Jan 2009, Maxim Sobolev wrote: > : > > : >> Author: sobomax > : >> Date: Mon Jan 19 15:36:25 2009 > : >> New Revision: 187434 > : >> URL: http://svn.freebsd.org/changeset/base/187434 > : >> > : >> Log: > : >> MFC: take NTFS option out to match i386 GENERIC. > : > > : > Are you going to modify UPDATING to say that "options NTFS" will now be > : > required where it wasn't previously on amd64? > : > : It should not cause any issues, as the mount_ntfs(8) auto-loads ntfs.ko > : module as needed. However, I am adding UPDATING entry just in case. > > it won't do that if you are running at a high secure level... I know. This has been mentioned in UPDATING. -Maxim From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 01:46:10 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D53C210656C4; Tue, 20 Jan 2009 01:46:10 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 999A58FC19; Tue, 20 Jan 2009 01:46:10 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0K1k7BX040756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jan 2009 17:46:08 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <49752CD3.6020506@FreeBSD.org> Date: Mon, 19 Jan 2009 17:45:55 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: "M. Warner Losh" References: <200901191536.n0JFaPTN014129@svn.freebsd.org> <20090119.181124.-1270972755.imp@bsdimp.com> In-Reply-To: <20090119.181124.-1270972755.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rwatson@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 01:46:11 -0000 M. Warner Losh wrote: > In message: > Robert Watson writes: > : > : On Mon, 19 Jan 2009, Maxim Sobolev wrote: > : > : > Author: sobomax > : > Date: Mon Jan 19 15:36:25 2009 > : > New Revision: 187434 > : > URL: http://svn.freebsd.org/changeset/base/187434 > : > > : > Log: > : > MFC: take NTFS option out to match i386 GENERIC. > : > : Are you going to modify UPDATING to say that "options NTFS" will now be > : required where it wasn't previously on amd64? Also, insta-MFC's are generally > : a bad idea, even for changes believed harmless, as they often have unexpected > : side effects. > > Especially since NTFS works very well in 6.x and I think in 7.x. It > is only in -current that there are issues exposed by other work... Warner, The point is not whether it works or not. The point is that i386 and amd64 kernels should provide the same feature set. See the thread on current@ -Maxim From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 01:54:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD8A8106564A; Tue, 20 Jan 2009 01:54: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 9B97C8FC23; Tue, 20 Jan 2009 01:54:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0K1s5eF029067; Tue, 20 Jan 2009 01:54:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0K1s5uE029065; Tue, 20 Jan 2009 01:54:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901200154.n0K1s5uE029065@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Jan 2009 01:54:05 +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: r187458 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 01:54:06 -0000 Author: alc Date: Tue Jan 20 01:54:05 2009 New Revision: 187458 URL: http://svn.freebsd.org/changeset/base/187458 Log: MFC rev 175056 Provide a legitimate pindex to vm_page_alloc() in pmap_growkernel() instead of writing apologetic comments. Correct a nearby style error: Pointers should be compared to NULL. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 00:05:43 2009 (r187457) +++ stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 01:54:05 2009 (r187458) @@ -1544,7 +1544,7 @@ pmap_growkernel(vm_offset_t addr) nkpg = vm_page_alloc(NULL, nkpt, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); - if (!nkpg) + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); if ((nkpg->flags & PG_ZERO) == 0) pmap_zero_page(nkpg); @@ -1563,13 +1563,10 @@ pmap_growkernel(vm_offset_t addr) continue; } - /* - * This index is bogus, but out of the way - */ - nkpg = vm_page_alloc(NULL, nkpt, + nkpg = vm_page_alloc(NULL, pmap_pde_pindex(kernel_vm_end), VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); - if (!nkpg) + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpt++; Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Jan 20 00:05:43 2009 (r187457) +++ stable/7/sys/i386/i386/pmap.c Tue Jan 20 01:54:05 2009 (r187458) @@ -1628,13 +1628,10 @@ pmap_growkernel(vm_offset_t addr) continue; } - /* - * This index is bogus, but out of the way - */ - nkpg = vm_page_alloc(NULL, nkpt, + nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDRSHIFT, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); - if (!nkpg) + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpt++; From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 05:51:16 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1761065674; Tue, 20 Jan 2009 05:51:16 +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 86DF38FC12; Tue, 20 Jan 2009 05:51:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0K5pG79034221; Tue, 20 Jan 2009 05:51:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0K5pGK0034220; Tue, 20 Jan 2009 05:51:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901200551.n0K5pGK0034220@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Jan 2009 05:51: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: r187464 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 05:51:17 -0000 Author: alc Date: Tue Jan 20 05:51:16 2009 New Revision: 187464 URL: http://svn.freebsd.org/changeset/base/187464 Log: MFC rev 180170 Eliminate an unnecessary static variable: nkpt. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 04:31:45 2009 (r187463) +++ stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 05:51:16 2009 (r187464) @@ -171,7 +171,6 @@ struct pmap kernel_pmap_store; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ -static int nkpt; static int ndmpdp; static vm_paddr_t dmaplimit; vm_offset_t kernel_vm_end; @@ -516,7 +515,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_pml4 = (pdp_entry_t *) (KERNBASE + KPML4phys); kernel_pmap->pm_active = -1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); - nkpt = NKPT; /* * Reserve some special page table entries/VA space for temporary @@ -1524,10 +1522,8 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { kernel_vm_end = VM_MIN_KERNEL_ADDRESS; - nkpt = 0; while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) { kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); - nkpt++; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; @@ -1541,7 +1537,7 @@ pmap_growkernel(vm_offset_t addr) pde = pmap_pde(kernel_pmap, kernel_vm_end); if (pde == NULL) { /* We need a new PDP entry */ - nkpg = vm_page_alloc(NULL, nkpt, + nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDPSHIFT, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (nkpg == NULL) @@ -1568,9 +1564,6 @@ pmap_growkernel(vm_offset_t addr) VM_ALLOC_ZERO); if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); - - nkpt++; - if ((nkpg->flags & PG_ZERO) == 0) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 07:24:29 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF351065676; Tue, 20 Jan 2009 07:24: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 4A5868FC1D; Tue, 20 Jan 2009 07:24:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0K7OTwf036373; Tue, 20 Jan 2009 07:24:29 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0K7OT1I036371; Tue, 20 Jan 2009 07:24:29 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901200724.n0K7OT1I036371@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Jan 2009 07:24:29 +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: r187465 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 07:24:30 -0000 Author: alc Date: Tue Jan 20 07:24:28 2009 New Revision: 187465 URL: http://svn.freebsd.org/changeset/base/187465 Log: MFC r179917,180333,180373,180378 Prepare for a larger kernel virtual address space. Specifically, once KERNBASE and VM_MIN_KERNEL_ADDRESS are no longer the same, the physical memory allocated during bootstrap will be offset from the low-end of the kernel's page table. Change create_pagetables() and pmap_init() so that many fewer page table pages have to be preallocated by create_pagetables(). Eliminate pmap_growkernel()'s dependence on create_pagetables() preallocating page directory pages from VM_MIN_KERNEL_ADDRESS through the end of the kernel's bss. Specifically, the dependence was in pmap_growkernel()'s one- time initialization of kernel_vm_end, not in its main body. (I could not, however, resist the urge to optimize the main body.) Reduce the number of preallocated page directory pages to just those needed to support NKPT page table pages. (In fact, this allows me to revert a couple of my earlier changes to create_pagetables().) Fix lines that are too long in pmap_growkernel() by substituting shorter but equivalent expressions. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/include/pmap.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 05:51:16 2009 (r187464) +++ stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 07:24:28 2009 (r187465) @@ -173,7 +173,7 @@ vm_offset_t virtual_end; /* VA of last a static int ndmpdp; static vm_paddr_t dmaplimit; -vm_offset_t kernel_vm_end; +vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; pt_entry_t pg_nx; static u_int64_t KPTphys; /* phys addr of kernel level 1 */ @@ -1517,25 +1517,34 @@ pmap_growkernel(vm_offset_t addr) vm_paddr_t paddr; vm_page_t nkpg; pd_entry_t *pde, newpdir; - pdp_entry_t newpdp; + pdp_entry_t *pdpe; mtx_assert(&kernel_map->system_mtx, MA_OWNED); - if (kernel_vm_end == 0) { - kernel_vm_end = VM_MIN_KERNEL_ADDRESS; - while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) { - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); - if (kernel_vm_end - 1 >= kernel_map->max_offset) { - kernel_vm_end = kernel_map->max_offset; - break; - } - } - } - addr = roundup2(addr, PAGE_SIZE * NPTEPG); + + /* + * Return if "addr" is within the range of kernel page table pages + * that were preallocated during pmap bootstrap. Moreover, leave + * "kernel_vm_end" and the kernel page table as they were. + * + * The correctness of this action is based on the following + * argument: vm_map_findspace() allocates contiguous ranges of the + * kernel virtual address space. It calls this function if a range + * ends after "kernel_vm_end". If the kernel is mapped between + * "kernel_vm_end" and "addr", then the range cannot begin at + * "kernel_vm_end". In fact, its beginning address cannot be less + * than the kernel. Thus, there is no immediate need to allocate + * any new kernel page table pages between "kernel_vm_end" and + * "KERNBASE". + */ + if (KERNBASE < addr && addr <= KERNBASE + NKPT * NBPDR) + return; + + addr = roundup2(addr, NBPDR); if (addr - 1 >= kernel_map->max_offset) addr = kernel_map->max_offset; while (kernel_vm_end < addr) { - pde = pmap_pde(kernel_pmap, kernel_vm_end); - if (pde == NULL) { + pdpe = pmap_pdpe(kernel_pmap, kernel_vm_end); + if ((*pdpe & PG_V) == 0) { /* We need a new PDP entry */ nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDPSHIFT, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | @@ -1545,13 +1554,13 @@ pmap_growkernel(vm_offset_t addr) if ((nkpg->flags & PG_ZERO) == 0) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); - newpdp = (pdp_entry_t) + *pdpe = (pdp_entry_t) (paddr | PG_V | PG_RW | PG_A | PG_M); - *pmap_pdpe(kernel_pmap, kernel_vm_end) = newpdp; continue; /* try again */ } + pde = pmap_pdpe_to_pde(pdpe, kernel_vm_end); if ((*pde & PG_V) != 0) { - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; @@ -1568,9 +1577,9 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (paddr | PG_V | PG_RW | PG_A | PG_M); - *pmap_pde(kernel_pmap, kernel_vm_end) = newpdir; + pde_store(pde, newpdir); - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; Modified: stable/7/sys/amd64/include/pmap.h ============================================================================== --- stable/7/sys/amd64/include/pmap.h Tue Jan 20 05:51:16 2009 (r187464) +++ stable/7/sys/amd64/include/pmap.h Tue Jan 20 07:24:28 2009 (r187465) @@ -104,8 +104,7 @@ /* Initial number of kernel page tables. */ #ifndef NKPT -/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */ -#define NKPT 240 +#define NKPT 32 #endif #define NKPML4E 1 /* number of kernel PML4 slots */ From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 08:13:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7F111065670; Tue, 20 Jan 2009 08:13:45 +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 8AC828FC2F; Tue, 20 Jan 2009 08:13:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0K8Dj2B037349; Tue, 20 Jan 2009 08:13:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0K8DjRg037348; Tue, 20 Jan 2009 08:13:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901200813.n0K8DjRg037348@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Jan 2009 08:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187466 - in stable/7/sys: . amd64/include contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 08:13:46 -0000 Author: alc Date: Tue Jan 20 08:13:45 2009 New Revision: 187466 URL: http://svn.freebsd.org/changeset/base/187466 Log: MFC Increase the size of the kernel virtual address space to 6GB. Increase the ceiling on the kmem map's size to 3.6GB. Also, define the ceiling as a fraction of the kernel map's size rather than an absolute quantity. Thus, scaling of the kmem map's size will be automatic with changes to the kernel map's size. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/vmparam.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/include/vmparam.h ============================================================================== --- stable/7/sys/amd64/include/vmparam.h Tue Jan 20 07:24:28 2009 (r187465) +++ stable/7/sys/amd64/include/vmparam.h Tue Jan 20 08:13:45 2009 (r187466) @@ -140,15 +140,16 @@ * 0xffff800000000000 - 0xffff804020100fff recursive page table (512GB slot) * 0xffff804020101000 - 0xfffffeffffffffff unused * 0xffffff0000000000 - 0xffffff7fffffffff 512GB direct map mappings - * 0xffffff8000000000 - 0xffffffff7fffffff unused (510GB) - * 0xffffffff80000000 - 0xffffffffffffffff 2GB kernel map + * 0xffffff8000000000 - 0xfffffffe7fffffff unused (506GB) + * 0xfffffffe80000000 - 0xffffffffffffffff 6GB kernel map * * Within the kernel map: + * * 0xffffffff80000000 KERNBASE */ #define VM_MAX_KERNEL_ADDRESS KVADDR(KPML4I, NPDPEPG-1, NPDEPG-1, NPTEPG-1) -#define VM_MIN_KERNEL_ADDRESS KVADDR(KPML4I, KPDPI, 0, 0) +#define VM_MIN_KERNEL_ADDRESS KVADDR(KPML4I, NPDPEPG-6, 0, 0) #define DMAP_MIN_ADDRESS KVADDR(DMPML4I, 0, 0, 0) #define DMAP_MAX_ADDRESS KVADDR(DMPML4I+1, 0, 0, 0) @@ -187,7 +188,8 @@ * Ceiling on amount of kmem_map kva space. */ #ifndef VM_KMEM_SIZE_MAX -#define VM_KMEM_SIZE_MAX (400 * 1024 * 1024) +#define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ + VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5) #endif /* initial pagein size of beginning of executable file */ From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 11:54:12 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5072106566B; Tue, 20 Jan 2009 11:54:12 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id 3009A8FC12; Tue, 20 Jan 2009 11:54:11 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id n0KBs6mb006651; Tue, 20 Jan 2009 11:54:06 GMT Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LPFBG-00036k-Id; Tue, 20 Jan 2009 11:54:06 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.2/8.14.2) with ESMTP id n0KBs626013206; Tue, 20 Jan 2009 11:54:06 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.2/8.14.2/Submit) id n0KBs6lG013200; Tue, 20 Jan 2009 11:54:06 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: "M. Warner Losh" In-Reply-To: <20090119.181124.-1270972755.imp@bsdimp.com> References: <200901191536.n0JFaPTN014129@svn.freebsd.org> <20090119.181124.-1270972755.imp@bsdimp.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 20 Jan 2009 11:54:05 +0000 Message-Id: <1232452445.22840.21.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: sobomax@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-7@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 11:54:13 -0000 On Mon, 2009-01-19 at 18:11 -0700, M. Warner Losh wrote: > In message: > Robert Watson writes: > : > : On Mon, 19 Jan 2009, Maxim Sobolev wrote: > : > : > Author: sobomax > : > Date: Mon Jan 19 15:36:25 2009 > : > New Revision: 187434 > : > URL: http://svn.freebsd.org/changeset/base/187434 > : > > : > Log: > : > MFC: take NTFS option out to match i386 GENERIC. > : > : Are you going to modify UPDATING to say that "options NTFS" will now be > : required where it wasn't previously on amd64? Also, insta-MFC's are generally > : a bad idea, even for changes believed harmless, as they often have unexpected > : side effects. > > Especially since NTFS works very well in 6.x and I think in 7.x. It > is only in -current that there are issues exposed by other work... Do you know which other work exposed these issues? Or is it broken but nobody knows why? If the cause is known, this might make a good "junior kernel hacker" task, or whatever that page is called now, especially given other file systems have been changed and may serve as example code. Gavin From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 12:52:03 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 360D81065673; Tue, 20 Jan 2009 12:52:03 +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 0DB568FC13; Tue, 20 Jan 2009 12:52:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 941B746B06; Tue, 20 Jan 2009 07:52:02 -0500 (EST) Date: Tue, 20 Jan 2009 12:52:02 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Gavin Atkinson In-Reply-To: <1232452445.22840.21.camel@buffy.york.ac.uk> Message-ID: References: <200901191536.n0JFaPTN014129@svn.freebsd.org> <20090119.181124.-1270972755.imp@bsdimp.com> <1232452445.22840.21.camel@buffy.york.ac.uk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: sobomax@FreeBSD.org, svn-src-stable-7@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "M. Warner Losh" Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 12:52:04 -0000 On Tue, 20 Jan 2009, Gavin Atkinson wrote: >> : Are you going to modify UPDATING to say that "options NTFS" will now be >> : required where it wasn't previously on amd64? Also, insta-MFC's are generally >> : a bad idea, even for changes believed harmless, as they often have unexpected >> : side effects. >> >> Especially since NTFS works very well in 6.x and I think in 7.x. It is >> only in -current that there are issues exposed by other work... > > Do you know which other work exposed these issues? Or is it broken but > nobody knows why? > > If the cause is known, this might make a good "junior kernel hacker" task, > or whatever that page is called now, especially given other file systems > have been changed and may serve as example code. I'm not sure if it's a stability issue per se, rather that as kernel interfaces for VFS are evolved to support more parallelism, etc, file systems without active maintenance are at risk of becoming less functional and eventually being dropped. I think the context of the previous thread was Attilio inquiring about expelling some of the less-recently maintained file systems from the kernel so as to make redoing VFS interfaces easier (since he'd have to touch fewer file systems). There may be other stability issues as well, needless to say. One of the biggest issues will be if we want to, at some point, remove all the scaffolding used to support non-MPSAFE file systems, as locking down file systems requires both quite a bit of expertise and quite a bit of time. On a similar note, in the network stack, we jettisoned netatm and neti4b support as they didn't have maintainers and there was no one to make them MPSAFE. We're going to do the same for network device drivers that aren't MPSAFE in the near future in order to remove the last bit of scaffolding there -- I originally planned to remove IFF_NEEDSGIANT last year, but deferred it since it seemd the usb2 project was working towards providing MPSAFE USB network device drivers, which is seems (on the whole) to have now done, so I should restart the removal of IFF_NEEDSGIANT for 8.0. Robert From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 18:18:11 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA08B106567D; Tue, 20 Jan 2009 18:18:11 +0000 (UTC) (envelope-from imp@BSDIMP.COM) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 690FA8FC2D; Tue, 20 Jan 2009 18:18:11 +0000 (UTC) (envelope-from imp@BSDIMP.COM) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0KIGMCq001274; Tue, 20 Jan 2009 11:16:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 20 Jan 2009 11:16:57 -0700 (MST) Message-Id: <20090120.111657.2035877114.imp@bsdimp.com> To: gavin@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <1232452445.22840.21.camel@buffy.york.ac.uk> References: <20090119.181124.-1270972755.imp@bsdimp.com> <1232452445.22840.21.camel@buffy.york.ac.uk> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sobomax@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable-7@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: svn commit: r187434 - stable/7/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 18:18:13 -0000 In message: <1232452445.22840.21.camel@buffy.york.ac.uk> Gavin Atkinson writes: : On Mon, 2009-01-19 at 18:11 -0700, M. Warner Losh wrote: : > In message: : > Robert Watson writes: : > : : > : On Mon, 19 Jan 2009, Maxim Sobolev wrote: : > : : > : > Author: sobomax : > : > Date: Mon Jan 19 15:36:25 2009 : > : > New Revision: 187434 : > : > URL: http://svn.freebsd.org/changeset/base/187434 : > : > : > : > Log: : > : > MFC: take NTFS option out to match i386 GENERIC. : > : : > : Are you going to modify UPDATING to say that "options NTFS" will now be : > : required where it wasn't previously on amd64? Also, insta-MFC's are generally : > : a bad idea, even for changes believed harmless, as they often have unexpected : > : side effects. : > : > Especially since NTFS works very well in 6.x and I think in 7.x. It : > is only in -current that there are issues exposed by other work... : : Do you know which other work exposed these issues? Or is it broken but : nobody knows why? : : If the cause is known, this might make a good "junior kernel hacker" : task, or whatever that page is called now, especially given other file : systems have been changed and may serve as example code. I just know it works for me, and has been the most reliable file system in the face of errors in the device that I've had to interact with in the tree. You'd likely have to go read the PR database to understand when/where it fails for people. Warner From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 19:02:00 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 183131065674; Tue, 20 Jan 2009 19:02: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 027068FC24; Tue, 20 Jan 2009 19:02:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KJ20hK053793; Tue, 20 Jan 2009 19:02:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KJ1xTL053784; Tue, 20 Jan 2009 19:01:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901201901.n0KJ1xTL053784@svn.freebsd.org> From: John Baldwin Date: Tue, 20 Jan 2009 19:01:59 +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: r187478 - in stable/7/sys: . conf contrib/pf dev/ath/ath_hal dev/cxgb kern nfsclient ufs/ffs ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 19:02:01 -0000 Author: jhb Date: Tue Jan 20 19:01:59 2009 New Revision: 187478 URL: http://svn.freebsd.org/changeset/base/187478 Log: MFC: Close several races with using shared vnode locks for pathname lookups with UFS and enable shared lookups for UFS. - Change the name cache to fail lookups with EBADF if a directory vnode is recycled while it waits for a lock upgrade. - Rework the locking of the dirhash to use an sx lock and reference count on each hash structure. Using an sx lock instead of a mutex allows the lock to be held across disk I/O closing a number of races when using shared vnode locks that were previously handled by exclusive vnode locks. - Remove the 'i_ino' and 'i_reclen' fields from the i-node. i_ino is now a local variable in ufs_lookup(), and i_reclen is not needed since ufs_dirremove() always has the entire block holding the directory entry in memory when it updates the directory. - 'i_diroff' and 'i_offset' are now local variables in ufs_lookup(). 'i_diroff' is updated after a successful lookup. - Only set i_offset in the parent directory's i-node during a lookup for non-LOOKUP operations. - Remove the LOOKUP_SHARED option. One can set vfs.lookup_shared to 1 in either loader.conf or sysctl.conf instead. The default setting for vfs.lookup_shared is not changed and remains off by default. Modified: stable/7/sys/ (props changed) stable/7/sys/conf/options stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c stable/7/sys/kern/vfs_lookup.c stable/7/sys/nfsclient/nfs_vnops.c stable/7/sys/ufs/ffs/ffs_vfsops.c stable/7/sys/ufs/ufs/dirhash.h stable/7/sys/ufs/ufs/inode.h stable/7/sys/ufs/ufs/ufs_dirhash.c stable/7/sys/ufs/ufs/ufs_lookup.c Modified: stable/7/sys/conf/options ============================================================================== --- stable/7/sys/conf/options Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/conf/options Tue Jan 20 19:01:59 2009 (r187478) @@ -741,9 +741,6 @@ NI4BTEL opt_i4b.h #XXXBZ#NI4BING opt_i4b.h #XXXBZ#NI4BISPPP opt_i4b.h -# VFS options -LOOKUP_SHARED opt_vfs.h - # HWPMC options HWPMC_HOOKS Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/kern/vfs_cache.c Tue Jan 20 19:01:59 2009 (r187478) @@ -300,7 +300,9 @@ cache_zap(ncp) * succeeds, the vnode is returned in *vpp, and a status of -1 is * returned. If the lookup determines that the name does not exist * (negative cacheing), a status of ENOENT is returned. If the lookup - * fails, a status of zero is returned. + * fails, a status of zero is returned. If the directory vnode is + * recycled out from under us due to a forced unmount, a status of + * EBADF is returned. * * vpp is locked and ref'd on return. If we're looking up DOTDOT, dvp is * unlocked. If we're looking up . an extra ref is taken, but the lock is @@ -425,11 +427,19 @@ success: * When we lookup "." we still can be asked to lock it * differently... */ - ltype = cnp->cn_lkflags & (LK_SHARED | LK_EXCLUSIVE); - if (ltype == VOP_ISLOCKED(*vpp, td)) - return (-1); - else if (ltype == LK_EXCLUSIVE) - vn_lock(*vpp, LK_UPGRADE | LK_RETRY, td); + ltype = cnp->cn_lkflags & LK_TYPE_MASK; + if (ltype != VOP_ISLOCKED(*vpp, td)) { + if (ltype == LK_EXCLUSIVE) { + vn_lock(*vpp, LK_UPGRADE | LK_RETRY, td); + if ((*vpp)->v_iflag & VI_DOOMED) { + /* forced unmount */ + vrele(*vpp); + *vpp = NULL; + return (EBADF); + } + } else + vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY, td); + } return (-1); } ltype = 0; /* silence gcc warning */ @@ -442,12 +452,14 @@ success: error = vget(*vpp, cnp->cn_lkflags | LK_INTERLOCK, td); if (cnp->cn_flags & ISDOTDOT) vn_lock(dvp, ltype | LK_RETRY, td); - if ((cnp->cn_flags & ISLASTCN) && (cnp->cn_lkflags & LK_EXCLUSIVE)) - ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); if (error) { *vpp = NULL; goto retry; } + if ((cnp->cn_flags & ISLASTCN) && + (cnp->cn_lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE) { + ASSERT_VOP_ELOCKED(*vpp, "cache_lookup"); + } return (-1); } @@ -663,9 +675,9 @@ vfs_cache_lookup(ap) error = cache_lookup(dvp, vpp, cnp); if (error == 0) return (VOP_CACHEDLOOKUP(dvp, vpp, cnp)); - if (error == ENOENT) - return (error); - return (0); + if (error == -1) + return (0); + return (error); } Modified: stable/7/sys/kern/vfs_lookup.c ============================================================================== --- stable/7/sys/kern/vfs_lookup.c Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/kern/vfs_lookup.c Tue Jan 20 19:01:59 2009 (r187478) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" #include "opt_mac.h" -#include "opt_vfs.h" #include #include @@ -88,13 +87,10 @@ nameiinit(void *dummy __unused) } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL); -#ifdef LOOKUP_SHARED -static int lookup_shared = 1; -#else static int lookup_shared = 0; -#endif SYSCTL_INT(_vfs, OID_AUTO, lookup_shared, CTLFLAG_RW, &lookup_shared, 0, "Enables/Disables shared locks for path name translation"); +TUNABLE_INT("vfs.lookup_shared", &lookup_shared); /* * Convert a pathname into a pointer to a locked vnode. Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/nfsclient/nfs_vnops.c Tue Jan 20 19:01:59 2009 (r187478) @@ -868,7 +868,10 @@ nfs_lookup(struct vop_lookup_args *ap) *vpp = NULLVP; return (error); } - if ((error = cache_lookup(dvp, vpp, cnp)) && error != ENOENT) { + error = cache_lookup(dvp, vpp, cnp); + if (error > 0 && error != ENOENT) + return (error); + if (error == -1) { struct vattr vattr; newvp = *vpp; Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/7/sys/ufs/ffs/ffs_vfsops.c Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/ufs/ffs/ffs_vfsops.c Tue Jan 20 19:01:59 2009 (r187478) @@ -852,7 +852,7 @@ ffs_mountfs(devvp, mp, td) * Initialize filesystem stat information in mount struct. */ MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE; + mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED; MNT_IUNLOCK(mp); #ifdef UFS_EXTATTR #ifdef UFS_EXTATTR_AUTOSTART Modified: stable/7/sys/ufs/ufs/dirhash.h ============================================================================== --- stable/7/sys/ufs/ufs/dirhash.h Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/ufs/ufs/dirhash.h Tue Jan 20 19:01:59 2009 (r187478) @@ -28,6 +28,9 @@ #ifndef _UFS_UFS_DIRHASH_H_ #define _UFS_UFS_DIRHASH_H_ +#include +#include + /* * For fast operations on large directories, we maintain a hash * that maps the file name to the offset of the directory entry within @@ -80,12 +83,14 @@ ((dh)->dh_hash[(slot) >> DH_BLKOFFSHIFT][(slot) & DH_BLKOFFMASK]) struct dirhash { - struct mtx dh_mtx; /* protects all fields except dh_list */ + struct sx dh_lock; /* protects all fields except list & score */ + int dh_refcount; doff_t **dh_hash; /* the hash array (2-level) */ int dh_narrays; /* number of entries in dh_hash */ int dh_hlen; /* total slots in the 2-level hash array */ int dh_hused; /* entries in use */ + int dh_memreq; /* Memory used. */ /* Free space statistics. XXX assumes DIRBLKSIZ is 512. */ u_int8_t *dh_blkfree; /* free DIRALIGN words in each dir block */ Modified: stable/7/sys/ufs/ufs/inode.h ============================================================================== --- stable/7/sys/ufs/ufs/inode.h Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/ufs/ufs/inode.h Tue Jan 20 19:01:59 2009 (r187478) @@ -82,8 +82,6 @@ struct inode { doff_t i_endoff; /* End of useful stuff in directory. */ doff_t i_diroff; /* Offset in dir, where we found last entry. */ doff_t i_offset; /* Offset of free space in directory. */ - ino_t i_ino; /* Inode number of found directory. */ - u_int32_t i_reclen; /* Size of found directory entry. */ union { struct dirhash *dirhash; /* Hashing for large directories. */ Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_dirhash.c Tue Jan 20 18:16:31 2009 (r187477) +++ stable/7/sys/ufs/ufs/ufs_dirhash.c Tue Jan 20 19:01:59 2009 (r187478) @@ -46,7 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -88,15 +90,16 @@ static int ufsdirhash_findslot(struct di doff_t offset); static doff_t ufsdirhash_getprev(struct direct *dp, doff_t offset); static int ufsdirhash_recycle(int wanted); +static void ufsdirhash_free_locked(struct inode *ip); static uma_zone_t ufsdirhash_zone; #define DIRHASHLIST_LOCK() mtx_lock(&ufsdirhash_mtx) #define DIRHASHLIST_UNLOCK() mtx_unlock(&ufsdirhash_mtx) -#define DIRHASH_LOCK(dh) mtx_lock(&(dh)->dh_mtx) -#define DIRHASH_UNLOCK(dh) mtx_unlock(&(dh)->dh_mtx) #define DIRHASH_BLKALLOC_WAITOK() uma_zalloc(ufsdirhash_zone, M_WAITOK) #define DIRHASH_BLKFREE(ptr) uma_zfree(ufsdirhash_zone, (ptr)) +#define DIRHASH_ASSERT_LOCKED(dh) \ + sx_assert(&(dh)->dh_lock, SA_LOCKED) /* Dirhash list; recently-used entries are near the tail. */ static TAILQ_HEAD(, dirhash) ufsdirhash_list; @@ -105,14 +108,199 @@ static TAILQ_HEAD(, dirhash) ufsdirhash_ static struct mtx ufsdirhash_mtx; /* - * Locking order: - * ufsdirhash_mtx - * dh_mtx + * Locking: * - * The dh_mtx mutex should be acquired either via the inode lock, or via - * ufsdirhash_mtx. Only the owner of the inode may free the associated - * dirhash, but anything can steal its memory and set dh_hash to NULL. + * The relationship between inode and dirhash is protected either by an + * exclusive vnode lock or the vnode interlock where a shared vnode lock + * may be used. The dirhash_mtx is acquired after the dirhash lock. To + * handle teardown races, code wishing to lock the dirhash for an inode + * when using a shared vnode lock must obtain a private reference on the + * dirhash while holding the vnode interlock. They can drop it once they + * have obtained the dirhash lock and verified that the dirhash wasn't + * recycled while they waited for the dirhash lock. + * + * ufsdirhash_build() acquires a shared lock on the dirhash when it is + * successful. This lock is released after a call to ufsdirhash_lookup(). + * + * Functions requiring exclusive access use ufsdirhash_acquire() which may + * free a dirhash structure that was recycled by ufsdirhash_recycle(). + * + * The dirhash lock may be held across io operations. + */ + +static void +ufsdirhash_hold(struct dirhash *dh) +{ + + refcount_acquire(&dh->dh_refcount); +} + +static void +ufsdirhash_drop(struct dirhash *dh) +{ + + if (refcount_release(&dh->dh_refcount)) { + sx_destroy(&dh->dh_lock); + free(dh, M_DIRHASH); + } +} + +/* + * Release the lock on a dirhash. + */ +static void +ufsdirhash_release(struct dirhash *dh) +{ + + sx_unlock(&dh->dh_lock); +} + +/* + * Either acquire an existing hash locked shared or create a new hash and + * return it exclusively locked. May return NULL if the allocation fails. + * + * The vnode interlock is used to protect the i_dirhash pointer from + * simultaneous access while only a shared vnode lock is held. + */ +static struct dirhash * +ufsdirhash_create(struct inode *ip) +{ + struct dirhash *ndh; + struct dirhash *dh; + struct vnode *vp; + int error; + + error = 0; + ndh = dh = NULL; + vp = ip->i_vnode; + for (;;) { + /* Racy check for i_dirhash to prefetch an dirhash structure. */ + if (ip->i_dirhash == NULL && ndh == NULL) { + MALLOC(ndh, struct dirhash *, sizeof *dh, M_DIRHASH, + M_NOWAIT | M_ZERO); + if (ndh == NULL) + return (NULL); + refcount_init(&ndh->dh_refcount, 1); + sx_init(&ndh->dh_lock, "dirhash"); + sx_xlock(&ndh->dh_lock); + } + /* + * Check i_dirhash. If it's NULL just try to use a + * preallocated structure. If none exists loop and try again. + */ + VI_LOCK(vp); + dh = ip->i_dirhash; + if (dh == NULL) { + ip->i_dirhash = ndh; + VI_UNLOCK(vp); + if (ndh == NULL) + continue; + return (ndh); + } + ufsdirhash_hold(dh); + VI_UNLOCK(vp); + + /* Acquire a shared lock on existing hashes. */ + sx_slock(&dh->dh_lock); + + /* The hash could've been recycled while we were waiting. */ + VI_LOCK(vp); + if (ip->i_dirhash != dh) { + VI_UNLOCK(vp); + ufsdirhash_release(dh); + ufsdirhash_drop(dh); + continue; + } + VI_UNLOCK(vp); + ufsdirhash_drop(dh); + + /* If the hash is still valid we've succeeded. */ + if (dh->dh_hash != NULL) + break; + /* + * If the hash is NULL it has been recycled. Try to upgrade + * so we can recreate it. If we fail the upgrade, drop our + * lock and try again. + */ + if (sx_try_upgrade(&dh->dh_lock)) + break; + sx_sunlock(&dh->dh_lock); + } + /* Free the preallocated structure if it was not necessary. */ + if (ndh) { + ufsdirhash_release(ndh); + ufsdirhash_drop(ndh); + } + return (dh); +} + +/* + * Acquire an exclusive lock on an existing hash. Requires an exclusive + * vnode lock to protect the i_dirhash pointer. hashes that have been + * recycled are reclaimed here and NULL is returned. + */ +static struct dirhash * +ufsdirhash_acquire(struct inode *ip) +{ + struct dirhash *dh; + struct vnode *vp; + + ASSERT_VOP_ELOCKED(ip->i_vnode, __FUNCTION__); + + vp = ip->i_vnode; + dh = ip->i_dirhash; + if (dh == NULL) + return (NULL); + sx_xlock(&dh->dh_lock); + if (dh->dh_hash != NULL) + return (dh); + ufsdirhash_free_locked(ip); + return (NULL); +} + +/* + * Acquire exclusively and free the hash pointed to by ip. Works with a + * shared or exclusive vnode lock. */ +void +ufsdirhash_free(struct inode *ip) +{ + struct dirhash *dh; + struct vnode *vp; + + vp = ip->i_vnode; + for (;;) { + /* Grab a reference on this inode's dirhash if it has one. */ + VI_LOCK(vp); + dh = ip->i_dirhash; + if (dh == NULL) { + VI_UNLOCK(vp); + return; + } + ufsdirhash_hold(dh); + VI_UNLOCK(vp); + + /* Exclusively lock the dirhash. */ + sx_xlock(&dh->dh_lock); + + /* If this dirhash still belongs to this inode, then free it. */ + VI_LOCK(vp); + if (ip->i_dirhash == dh) { + VI_UNLOCK(vp); + ufsdirhash_drop(dh); + break; + } + VI_UNLOCK(vp); + + /* + * This inode's dirhash has changed while we were + * waiting for the dirhash lock, so try again. + */ + ufsdirhash_release(dh); + ufsdirhash_drop(dh); + } + ufsdirhash_free_locked(ip); +} /* * Attempt to build up a hash table for the directory contents in @@ -128,27 +316,23 @@ ufsdirhash_build(struct inode *ip) doff_t bmask, pos; int dirblocks, i, j, memreqd, nblocks, narrays, nslots, slot; - /* Check if we can/should use dirhash. */ - if (ip->i_dirhash == NULL) { - if (ip->i_size < ufs_mindirhashsize || OFSFMT(ip->i_vnode)) + /* Take care of a decreased sysctl value. */ + while (ufs_dirhashmem > ufs_dirhashmaxmem) + if (ufsdirhash_recycle(0) != 0) return (-1); - } else { - /* Hash exists, but sysctls could have changed. */ - if (ip->i_size < ufs_mindirhashsize || - ufs_dirhashmem > ufs_dirhashmaxmem) { + + /* Check if we can/should use dirhash. */ + if (ip->i_size < ufs_mindirhashsize || OFSFMT(ip->i_vnode) || + ip->i_effnlink == 0) { + if (ip->i_dirhash) ufsdirhash_free(ip); - return (-1); - } - /* Check if hash exists and is intact (note: unlocked read). */ - if (ip->i_dirhash->dh_hash != NULL) - return (0); - /* Free the old, recycled hash and build a new one. */ - ufsdirhash_free(ip); + return (-1); } - - /* Don't hash removed directories. */ - if (ip->i_effnlink == 0) + dh = ufsdirhash_create(ip); + if (dh == NULL) return (-1); + if (dh->dh_hash != NULL) + return (0); vp = ip->i_vnode; /* Allocate 50% more entries than this dir size could ever need. */ @@ -159,7 +343,6 @@ ufsdirhash_build(struct inode *ip) nslots = narrays * DH_NBLKOFF; dirblocks = howmany(ip->i_size, DIRBLKSIZ); nblocks = (dirblocks * 3 + 1) / 2; - memreqd = sizeof(*dh) + narrays * sizeof(*dh->dh_hash) + narrays * DH_NBLKOFF * sizeof(**dh->dh_hash) + nblocks * sizeof(*dh->dh_blkfree); @@ -167,33 +350,40 @@ ufsdirhash_build(struct inode *ip) if (memreqd + ufs_dirhashmem > ufs_dirhashmaxmem) { DIRHASHLIST_UNLOCK(); if (memreqd > ufs_dirhashmaxmem / 2) - return (-1); - + goto fail; /* Try to free some space. */ if (ufsdirhash_recycle(memreqd) != 0) - return (-1); + goto fail; /* Enough was freed, and list has been locked. */ } ufs_dirhashmem += memreqd; DIRHASHLIST_UNLOCK(); + /* Initialise the hash table and block statistics. */ + dh->dh_memreq = memreqd; + dh->dh_narrays = narrays; + dh->dh_hlen = nslots; + dh->dh_nblk = nblocks; + dh->dh_dirblks = dirblocks; + for (i = 0; i < DH_NFSTATS; i++) + dh->dh_firstfree[i] = -1; + dh->dh_firstfree[DH_NFSTATS] = 0; + dh->dh_hused = 0; + dh->dh_seqopt = 0; + dh->dh_seqoff = 0; + dh->dh_score = DH_SCOREINIT; + /* * Use non-blocking mallocs so that we will revert to a linear * lookup on failure rather than potentially blocking forever. */ - MALLOC(dh, struct dirhash *, sizeof *dh, M_DIRHASH, M_NOWAIT | M_ZERO); - if (dh == NULL) { - DIRHASHLIST_LOCK(); - ufs_dirhashmem -= memreqd; - DIRHASHLIST_UNLOCK(); - return (-1); - } - mtx_init(&dh->dh_mtx, "dirhash", NULL, MTX_DEF); MALLOC(dh->dh_hash, doff_t **, narrays * sizeof(dh->dh_hash[0]), M_DIRHASH, M_NOWAIT | M_ZERO); + if (dh->dh_hash == NULL) + goto fail; MALLOC(dh->dh_blkfree, u_int8_t *, nblocks * sizeof(dh->dh_blkfree[0]), M_DIRHASH, M_NOWAIT); - if (dh->dh_hash == NULL || dh->dh_blkfree == NULL) + if (dh->dh_blkfree == NULL) goto fail; for (i = 0; i < narrays; i++) { if ((dh->dh_hash[i] = DIRHASH_BLKALLOC_WAITOK()) == NULL) @@ -201,22 +391,8 @@ ufsdirhash_build(struct inode *ip) for (j = 0; j < DH_NBLKOFF; j++) dh->dh_hash[i][j] = DIRHASH_EMPTY; } - - /* Initialise the hash table and block statistics. */ - dh->dh_narrays = narrays; - dh->dh_hlen = nslots; - dh->dh_nblk = nblocks; - dh->dh_dirblks = dirblocks; for (i = 0; i < dirblocks; i++) dh->dh_blkfree[i] = DIRBLKSIZ / DIRALIGN; - for (i = 0; i < DH_NFSTATS; i++) - dh->dh_firstfree[i] = -1; - dh->dh_firstfree[DH_NFSTATS] = 0; - dh->dh_seqopt = 0; - dh->dh_seqoff = 0; - dh->dh_score = DH_SCOREINIT; - ip->i_dirhash = dh; - bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; pos = 0; while (pos < ip->i_size) { @@ -254,63 +430,70 @@ ufsdirhash_build(struct inode *ip) TAILQ_INSERT_TAIL(&ufsdirhash_list, dh, dh_list); dh->dh_onlist = 1; DIRHASHLIST_UNLOCK(); + sx_downgrade(&dh->dh_lock); return (0); fail: - if (dh->dh_hash != NULL) { - for (i = 0; i < narrays; i++) - if (dh->dh_hash[i] != NULL) - DIRHASH_BLKFREE(dh->dh_hash[i]); - FREE(dh->dh_hash, M_DIRHASH); - } - if (dh->dh_blkfree != NULL) - FREE(dh->dh_blkfree, M_DIRHASH); - mtx_destroy(&dh->dh_mtx); - FREE(dh, M_DIRHASH); - ip->i_dirhash = NULL; - DIRHASHLIST_LOCK(); - ufs_dirhashmem -= memreqd; - DIRHASHLIST_UNLOCK(); + ufsdirhash_free_locked(ip); return (-1); } /* * Free any hash table associated with inode 'ip'. */ -void -ufsdirhash_free(struct inode *ip) +static void +ufsdirhash_free_locked(struct inode *ip) { struct dirhash *dh; - int i, mem; + struct vnode *vp; + int i; - if ((dh = ip->i_dirhash) == NULL) - return; + DIRHASH_ASSERT_LOCKED(ip->i_dirhash); + + /* + * Clear the pointer in the inode to prevent new threads from + * finding the dead structure. + */ + vp = ip->i_vnode; + VI_LOCK(vp); + dh = ip->i_dirhash; + ip->i_dirhash = NULL; + VI_UNLOCK(vp); + + /* + * Remove the hash from the list since we are going to free its + * memory. + */ DIRHASHLIST_LOCK(); - DIRHASH_LOCK(dh); if (dh->dh_onlist) TAILQ_REMOVE(&ufsdirhash_list, dh, dh_list); - DIRHASH_UNLOCK(dh); + ufs_dirhashmem -= dh->dh_memreq; DIRHASHLIST_UNLOCK(); - /* The dirhash pointed to by 'dh' is exclusively ours now. */ + /* + * At this point, any waiters for the lock should hold their + * own reference on the dirhash structure. They will drop + * that reference once they grab the vnode interlock and see + * that ip->i_dirhash is NULL. + */ + sx_xunlock(&dh->dh_lock); - mem = sizeof(*dh); + /* + * Handle partially recycled as well as fully constructed hashes. + */ if (dh->dh_hash != NULL) { for (i = 0; i < dh->dh_narrays; i++) - DIRHASH_BLKFREE(dh->dh_hash[i]); + if (dh->dh_hash[i] != NULL) + DIRHASH_BLKFREE(dh->dh_hash[i]); FREE(dh->dh_hash, M_DIRHASH); - FREE(dh->dh_blkfree, M_DIRHASH); - mem += dh->dh_narrays * sizeof(*dh->dh_hash) + - dh->dh_narrays * DH_NBLKOFF * sizeof(**dh->dh_hash) + - dh->dh_nblk * sizeof(*dh->dh_blkfree); + if (dh->dh_blkfree != NULL) + FREE(dh->dh_blkfree, M_DIRHASH); } - mtx_destroy(&dh->dh_mtx); - FREE(dh, M_DIRHASH); - ip->i_dirhash = NULL; - DIRHASHLIST_LOCK(); - ufs_dirhashmem -= mem; - DIRHASHLIST_UNLOCK(); + /* + * Drop the inode's reference to the data structure. + */ + ufsdirhash_drop(dh); } /* @@ -323,6 +506,8 @@ ufsdirhash_free(struct inode *ip) * prevoffp is non-NULL, the offset of the previous entry within * the DIRBLKSIZ-sized block is stored in *prevoffp (if the entry * is the first in a block, the start of the block is used). + * + * Must be called with the hash locked. Returns with the hash unlocked. */ int ufsdirhash_lookup(struct inode *ip, char *name, int namelen, doff_t *offp, @@ -334,48 +519,36 @@ ufsdirhash_lookup(struct inode *ip, char struct buf *bp; doff_t blkoff, bmask, offset, prevoff; int i, slot; + int error; - if ((dh = ip->i_dirhash) == NULL) - return (EJUSTRETURN); + dh = ip->i_dirhash; + KASSERT(dh != NULL && dh->dh_hash != NULL, + ("ufsdirhash_lookup: Invalid dirhash %p\n", dh)); + DIRHASH_ASSERT_LOCKED(dh); /* * Move this dirhash towards the end of the list if it has a - * score higher than the next entry, and acquire the dh_mtx. - * Optimise the case where it's already the last by performing - * an unlocked read of the TAILQ_NEXT pointer. - * - * In both cases, end up holding just dh_mtx. + * score higher than the next entry, and acquire the dh_lock. */ + DIRHASHLIST_LOCK(); if (TAILQ_NEXT(dh, dh_list) != NULL) { - DIRHASHLIST_LOCK(); - DIRHASH_LOCK(dh); /* * If the new score will be greater than that of the next * entry, then move this entry past it. With both mutexes * held, dh_next won't go away, but its dh_score could * change; that's not important since it is just a hint. */ - if (dh->dh_hash != NULL && - (dh_next = TAILQ_NEXT(dh, dh_list)) != NULL && + if ((dh_next = TAILQ_NEXT(dh, dh_list)) != NULL && dh->dh_score >= dh_next->dh_score) { KASSERT(dh->dh_onlist, ("dirhash: not on list")); TAILQ_REMOVE(&ufsdirhash_list, dh, dh_list); TAILQ_INSERT_AFTER(&ufsdirhash_list, dh_next, dh, dh_list); } - DIRHASHLIST_UNLOCK(); - } else { - /* Already the last, though that could change as we wait. */ - DIRHASH_LOCK(dh); - } - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); - return (EJUSTRETURN); } - /* Update the score. */ if (dh->dh_score < DH_SCOREMAX) dh->dh_score++; + DIRHASHLIST_UNLOCK(); vp = ip->i_vnode; bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; @@ -410,23 +583,23 @@ restart: slot = WRAPINCR(slot, dh->dh_hlen)) { if (offset == DIRHASH_DEL) continue; - DIRHASH_UNLOCK(dh); - if (offset < 0 || offset >= ip->i_size) panic("ufsdirhash_lookup: bad offset in hash array"); if ((offset & ~bmask) != blkoff) { if (bp != NULL) brelse(bp); blkoff = offset & ~bmask; - if (UFS_BLKATOFF(vp, (off_t)blkoff, NULL, &bp) != 0) - return (EJUSTRETURN); + if (UFS_BLKATOFF(vp, (off_t)blkoff, NULL, &bp) != 0) { + error = EJUSTRETURN; + goto fail; + } } dp = (struct direct *)(bp->b_data + (offset & bmask)); if (dp->d_reclen == 0 || dp->d_reclen > DIRBLKSIZ - (offset & (DIRBLKSIZ - 1))) { /* Corrupted directory. */ - brelse(bp); - return (EJUSTRETURN); + error = EJUSTRETURN; + goto fail; } if (dp->d_namlen == namelen && bcmp(dp->d_name, name, namelen) == 0) { @@ -436,8 +609,8 @@ restart: prevoff = ufsdirhash_getprev(dp, offset); if (prevoff == -1) { - brelse(bp); - return (EJUSTRETURN); + error = EJUSTRETURN; + goto fail; } } else prevoff = offset; @@ -448,20 +621,12 @@ restart: if (dh->dh_seqopt == 0 && dh->dh_seqoff == offset) dh->dh_seqopt = 1; dh->dh_seqoff = offset + DIRSIZ(0, dp); - *bpp = bp; *offp = offset; + ufsdirhash_release(dh); return (0); } - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - if (bp != NULL) - brelse(bp); - ufsdirhash_free(ip); - return (EJUSTRETURN); - } /* * When the name doesn't match in the seqopt case, go back * and search normally. @@ -471,10 +636,12 @@ restart: goto restart; } } - DIRHASH_UNLOCK(dh); + error = ENOENT; +fail: + ufsdirhash_release(dh); if (bp != NULL) brelse(bp); - return (ENOENT); + return (error); } /* @@ -502,29 +669,22 @@ ufsdirhash_findfree(struct inode *ip, in doff_t pos, slotstart; int dirblock, error, freebytes, i; - if ((dh = ip->i_dirhash) == NULL) - return (-1); - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); - return (-1); - } + dh = ip->i_dirhash; + KASSERT(dh != NULL && dh->dh_hash != NULL, + ("ufsdirhash_findfree: Invalid dirhash %p\n", dh)); + DIRHASH_ASSERT_LOCKED(dh); /* Find a directory block with the desired free space. */ dirblock = -1; for (i = howmany(slotneeded, DIRALIGN); i <= DH_NFSTATS; i++) if ((dirblock = dh->dh_firstfree[i]) != -1) break; - if (dirblock == -1) { - DIRHASH_UNLOCK(dh); + if (dirblock == -1) return (-1); - } KASSERT(dirblock < dh->dh_nblk && dh->dh_blkfree[dirblock] >= howmany(slotneeded, DIRALIGN), ("ufsdirhash_findfree: bad stats")); - DIRHASH_UNLOCK(dh); pos = dirblock * DIRBLKSIZ; error = UFS_BLKATOFF(ip->i_vnode, (off_t)pos, (char **)&dp, &bp); if (error) @@ -582,24 +742,18 @@ ufsdirhash_enduseful(struct inode *ip) struct dirhash *dh; int i; - if ((dh = ip->i_dirhash) == NULL) - return (-1); - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); - return (-1); - } + dh = ip->i_dirhash; + DIRHASH_ASSERT_LOCKED(dh); + KASSERT(dh != NULL && dh->dh_hash != NULL, + ("ufsdirhash_enduseful: Invalid dirhash %p\n", dh)); - if (dh->dh_blkfree[dh->dh_dirblks - 1] != DIRBLKSIZ / DIRALIGN) { - DIRHASH_UNLOCK(dh); + if (dh->dh_blkfree[dh->dh_dirblks - 1] != DIRBLKSIZ / DIRALIGN) return (-1); - } for (i = dh->dh_dirblks - 1; i >= 0; i--) if (dh->dh_blkfree[i] != DIRBLKSIZ / DIRALIGN) break; - DIRHASH_UNLOCK(dh); + return ((doff_t)(i + 1) * DIRBLKSIZ); } @@ -614,15 +768,9 @@ ufsdirhash_add(struct inode *ip, struct struct dirhash *dh; int slot; - if ((dh = ip->i_dirhash) == NULL) + if ((dh = ufsdirhash_acquire(ip)) == NULL) return; - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); - return; - } - + KASSERT(offset < dh->dh_dirblks * DIRBLKSIZ, ("ufsdirhash_add: bad offset")); /* @@ -630,8 +778,7 @@ ufsdirhash_add(struct inode *ip, struct * remove the hash entirely and let it be rebuilt later. */ if (dh->dh_hused >= (dh->dh_hlen * 3) / 4) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + ufsdirhash_free_locked(ip); return; } @@ -645,7 +792,7 @@ ufsdirhash_add(struct inode *ip, struct /* Update the per-block summary info. */ ufsdirhash_adjfree(dh, offset, -DIRSIZ(0, dirp)); - DIRHASH_UNLOCK(dh); + ufsdirhash_release(dh); } /* @@ -659,14 +806,8 @@ ufsdirhash_remove(struct inode *ip, stru struct dirhash *dh; int slot; - if ((dh = ip->i_dirhash) == NULL) - return; - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + if ((dh = ufsdirhash_acquire(ip)) == NULL) return; - } KASSERT(offset < dh->dh_dirblks * DIRBLKSIZ, ("ufsdirhash_remove: bad offset")); @@ -678,7 +819,7 @@ ufsdirhash_remove(struct inode *ip, stru /* Update the per-block summary info. */ ufsdirhash_adjfree(dh, offset, DIRSIZ(0, dirp)); - DIRHASH_UNLOCK(dh); + ufsdirhash_release(dh); } /* @@ -692,14 +833,8 @@ ufsdirhash_move(struct inode *ip, struct struct dirhash *dh; int slot; - if ((dh = ip->i_dirhash) == NULL) + if ((dh = ufsdirhash_acquire(ip)) == NULL) return; - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); - return; - } KASSERT(oldoff < dh->dh_dirblks * DIRBLKSIZ && newoff < dh->dh_dirblks * DIRBLKSIZ, @@ -707,7 +842,7 @@ ufsdirhash_move(struct inode *ip, struct /* Find the entry, and update the offset. */ slot = ufsdirhash_findslot(dh, dirp->d_name, dirp->d_namlen, oldoff); DH_ENTRY(dh, slot) = newoff; - DIRHASH_UNLOCK(dh); + ufsdirhash_release(dh); } /* @@ -720,22 +855,15 @@ ufsdirhash_newblk(struct inode *ip, doff struct dirhash *dh; int block; - if ((dh = ip->i_dirhash) == NULL) - return; - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + if ((dh = ufsdirhash_acquire(ip)) == NULL) return; - } KASSERT(offset == dh->dh_dirblks * DIRBLKSIZ, ("ufsdirhash_newblk: bad offset")); block = offset / DIRBLKSIZ; if (block >= dh->dh_nblk) { /* Out of space; must rebuild. */ - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + ufsdirhash_free_locked(ip); return; } dh->dh_dirblks = block + 1; @@ -744,7 +872,7 @@ ufsdirhash_newblk(struct inode *ip, doff dh->dh_blkfree[block] = DIRBLKSIZ / DIRALIGN; if (dh->dh_firstfree[DH_NFSTATS] == -1) dh->dh_firstfree[DH_NFSTATS] = block; - DIRHASH_UNLOCK(dh); + ufsdirhash_release(dh); } /* @@ -756,14 +884,8 @@ ufsdirhash_dirtrunc(struct inode *ip, do struct dirhash *dh; int block, i; - if ((dh = ip->i_dirhash) == NULL) - return; - DIRHASH_LOCK(dh); - if (dh->dh_hash == NULL) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + if ((dh = ufsdirhash_acquire(ip)) == NULL) return; - } KASSERT(offset <= dh->dh_dirblks * DIRBLKSIZ, ("ufsdirhash_dirtrunc: bad offset")); @@ -775,8 +897,7 @@ ufsdirhash_dirtrunc(struct inode *ip, do * if necessary. */ if (block < dh->dh_nblk / 8 && dh->dh_narrays > 1) { - DIRHASH_UNLOCK(dh); - ufsdirhash_free(ip); + ufsdirhash_free_locked(ip); return; } @@ -794,7 +915,7 @@ ufsdirhash_dirtrunc(struct inode *ip, do if (dh->dh_firstfree[i] >= block) panic("ufsdirhash_dirtrunc: first free corrupt"); dh->dh_dirblks = block; - DIRHASH_UNLOCK(dh); + ufsdirhash_release(dh); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 19:41:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B00D1065670; Tue, 20 Jan 2009 19:41:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECDC8FC0C; Tue, 20 Jan 2009 19:41:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KJfJhe054770; Tue, 20 Jan 2009 19:41:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KJfJUc054766; Tue, 20 Jan 2009 19:41:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901201941.n0KJfJUc054766@svn.freebsd.org> From: John Baldwin Date: Tue, 20 Jan 2009 19:41: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: r187480 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 19:41:24 -0000 Author: jhb Date: Tue Jan 20 19:41:18 2009 New Revision: 187480 URL: http://svn.freebsd.org/changeset/base/187480 Log: MFC: Stop maintaining pv_list_count for i386 and amd64 since it was obsoleted by Peter's rewrite of the pv entry allocator. To avoid ABI breakage, the field in 'struct mdpage' has not been removed, but it has been renamed to 'pv_unused'. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/include/pmap.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/pmap.c stable/7/sys/i386/include/pmap.h Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 19:06:10 2009 (r187479) +++ stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 19:41:18 2009 (r187480) @@ -601,7 +601,6 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); - m->md.pv_list_count = 0; } /* @@ -1694,7 +1693,6 @@ pmap_collect(pmap_t locked_pmap, struct TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); - m->md.pv_list_count--; free_pv_entry(pmap, pv); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); @@ -1842,7 +1840,6 @@ pmap_remove_entry(pmap_t pmap, vm_page_t } KASSERT(pv != NULL, ("pmap_remove_entry: pv not found")); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count--; if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); free_pv_entry(pmap, pv); @@ -1862,7 +1859,6 @@ pmap_insert_entry(pmap_t pmap, vm_offset pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; } /* @@ -1879,7 +1875,6 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; return (TRUE); } else return (FALSE); @@ -2119,7 +2114,6 @@ pmap_remove_all(vm_page_t m) pmap_invalidate_page(pmap, pv->pv_va); pmap_free_zero_pages(free); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count--; free_pv_entry(pmap, pv); PMAP_UNLOCK(pmap); } @@ -3029,7 +3023,6 @@ pmap_remove_pages(pmap_t pmap) PV_STAT(pv_entry_spare++); pv_entry_count--; pc->pc_map[field] |= bitmask; - m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); Modified: stable/7/sys/amd64/include/pmap.h ============================================================================== --- stable/7/sys/amd64/include/pmap.h Tue Jan 20 19:06:10 2009 (r187479) +++ stable/7/sys/amd64/include/pmap.h Tue Jan 20 19:41:18 2009 (r187480) @@ -229,7 +229,7 @@ struct pv_entry; struct pv_chunk; struct md_page { - int pv_list_count; + int pv_unused; TAILQ_HEAD(,pv_entry) pv_list; }; Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Jan 20 19:06:10 2009 (r187479) +++ stable/7/sys/i386/i386/pmap.c Tue Jan 20 19:41:18 2009 (r187480) @@ -525,7 +525,6 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); - m->md.pv_list_count = 0; } #ifdef PAE @@ -1763,7 +1762,6 @@ pmap_collect(pmap_t locked_pmap, struct TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); - m->md.pv_list_count--; free_pv_entry(pmap, pv); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); @@ -1918,7 +1916,6 @@ pmap_remove_entry(pmap_t pmap, vm_page_t } KASSERT(pv != NULL, ("pmap_remove_entry: pv not found")); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count--; if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); free_pv_entry(pmap, pv); @@ -1938,7 +1935,6 @@ pmap_insert_entry(pmap_t pmap, vm_offset pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; } /* @@ -1955,7 +1951,6 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; return (TRUE); } else return (FALSE); @@ -2173,7 +2168,6 @@ pmap_remove_all(vm_page_t m) pmap_invalidate_page(pmap, pv->pv_va); pmap_free_zero_pages(free); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count--; free_pv_entry(pmap, pv); PMAP_UNLOCK(pmap); } @@ -3114,7 +3108,6 @@ pmap_remove_pages(pmap_t pmap) PV_STAT(pv_entry_spare++); pv_entry_count--; pc->pc_map[field] |= bitmask; - m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); Modified: stable/7/sys/i386/include/pmap.h ============================================================================== --- stable/7/sys/i386/include/pmap.h Tue Jan 20 19:06:10 2009 (r187479) +++ stable/7/sys/i386/include/pmap.h Tue Jan 20 19:41:18 2009 (r187480) @@ -316,7 +316,7 @@ struct pv_entry; struct pv_chunk; struct md_page { - int pv_list_count; + int pv_unused; TAILQ_HEAD(,pv_entry) pv_list; }; From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 19:44:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 823681065701; Tue, 20 Jan 2009 19:44:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 51B098FC0A; Tue, 20 Jan 2009 19:44:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id F2F0346B06; Tue, 20 Jan 2009 14:44:04 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0KJhaUu026295; Tue, 20 Jan 2009 14:43:58 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Nick Hibma Date: Tue, 20 Jan 2009 12:48:47 -0500 User-Agent: KMail/1.9.7 References: <200901181850.n0IIoIIV083424@svn.freebsd.org> In-Reply-To: <200901181850.n0IIoIIV083424@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901201248.47688.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 20 Jan 2009 14:43:58 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8881/Tue Jan 20 09:48:51 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r187401 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 19:44:06 -0000 On Sunday 18 January 2009 1:50:18 pm Nick Hibma wrote: > Author: n_hibma > Date: Sun Jan 18 18:50:18 2009 > New Revision: 187401 > URL: http://svn.freebsd.org/changeset/base/187401 > > Log: > Speling mistake. > > Modified: > stable/7/sys/dev/ata/ata-all.c > > Modified: stable/7/sys/dev/ata/ata-all.c > ============================================================================== > --- stable/7/sys/dev/ata/ata-all.c Sun Jan 18 18:26:52 2009 (r187400) > +++ stable/7/sys/dev/ata/ata-all.c Sun Jan 18 18:50:18 2009 (r187401) > @@ -127,7 +127,7 @@ ata_attach(device_t dev) > > /* reset the controller HW, the channel and device(s) */ > while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) > - pause("ataatch", 1); > + pause("attach", 1); > ATA_RESET(dev); > ATA_LOCKING(dev, ATA_LF_UNLOCK); Actually, I suspect this was on purpose and was short for "ata attach". -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 20:32:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20B8F1065903; Tue, 20 Jan 2009 20:32:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1228FC16; Tue, 20 Jan 2009 20:32:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KKWmgB055927; Tue, 20 Jan 2009 20:32:48 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KKWmVZ055926; Tue, 20 Jan 2009 20:32:48 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901202032.n0KKWmVZ055926@svn.freebsd.org> From: Nick Hibma Date: Tue, 20 Jan 2009 20:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187484 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 20:32:49 -0000 Author: n_hibma Date: Tue Jan 20 20:32:48 2009 New Revision: 187484 URL: http://svn.freebsd.org/changeset/base/187484 Log: revert my previous commit. It was in error. I got primed by a few other similar typos in man-pages. Submitted by: jhb Modified: stable/7/sys/dev/ata/ata-all.c Modified: stable/7/sys/dev/ata/ata-all.c ============================================================================== --- stable/7/sys/dev/ata/ata-all.c Tue Jan 20 20:22:28 2009 (r187483) +++ stable/7/sys/dev/ata/ata-all.c Tue Jan 20 20:32:48 2009 (r187484) @@ -127,7 +127,7 @@ ata_attach(device_t dev) /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) - pause("attach", 1); + pause("atatch", 1); ATA_RESET(dev); ATA_LOCKING(dev, ATA_LF_UNLOCK); From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 20:41:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C350106566C; Tue, 20 Jan 2009 20:41:42 +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 ED78F8FC0A; Tue, 20 Jan 2009 20:41:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KKffHi056114; Tue, 20 Jan 2009 20:41:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KKffnr056112; Tue, 20 Jan 2009 20:41:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901202041.n0KKffnr056112@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Jan 2009 20:41:41 +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: r187485 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 20:41:43 -0000 Author: alc Date: Tue Jan 20 20:41:41 2009 New Revision: 187485 URL: http://svn.freebsd.org/changeset/base/187485 Log: MFC rev 180600 Simplify pmap_extract()'s control flow, making it more like the related functions pmap_extract_and_hold() and pmap_kextract(). Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 20:32:48 2009 (r187484) +++ stable/7/sys/amd64/amd64/pmap.c Tue Jan 20 20:41:41 2009 (r187485) @@ -901,13 +901,12 @@ pmap_extract(pmap_t pmap, vm_offset_t va if (pdep != NULL) { pde = *pdep; if (pde) { - if ((pde & PG_PS) != 0) { + if ((pde & PG_PS) != 0) rtval = (pde & PG_PS_FRAME) | (va & PDRMASK); - PMAP_UNLOCK(pmap); - return rtval; + else { + pte = pmap_pde_to_pte(pdep, va); + rtval = (*pte & PG_FRAME) | (va & PAGE_MASK); } - pte = pmap_pde_to_pte(pdep, va); - rtval = (*pte & PG_FRAME) | (va & PAGE_MASK); } } PMAP_UNLOCK(pmap); Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Tue Jan 20 20:32:48 2009 (r187484) +++ stable/7/sys/i386/i386/pmap.c Tue Jan 20 20:41:41 2009 (r187485) @@ -981,14 +981,13 @@ pmap_extract(pmap_t pmap, vm_offset_t va PMAP_LOCK(pmap); pde = pmap->pm_pdir[va >> PDRSHIFT]; if (pde != 0) { - if ((pde & PG_PS) != 0) { + if ((pde & PG_PS) != 0) rtval = (pde & PG_PS_FRAME) | (va & PDRMASK); - PMAP_UNLOCK(pmap); - return rtval; + else { + pte = pmap_pte(pmap, va); + rtval = (*pte & PG_FRAME) | (va & PAGE_MASK); + pmap_pte_release(pte); } - pte = pmap_pte(pmap, va); - rtval = (*pte & PG_FRAME) | (va & PAGE_MASK); - pmap_pte_release(pte); } PMAP_UNLOCK(pmap); return (rtval); From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 22:34:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0799A106566C; Tue, 20 Jan 2009 22:34:39 +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 EA5158FC08; Tue, 20 Jan 2009 22:34:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KMYcab058828; Tue, 20 Jan 2009 22:34:38 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KMYclD058827; Tue, 20 Jan 2009 22:34:38 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200901202234.n0KMYclD058827@svn.freebsd.org> From: Ed Maste Date: Tue, 20 Jan 2009 22:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187496 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 22:34:39 -0000 Author: emaste Date: Tue Jan 20 22:34:38 2009 New Revision: 187496 URL: http://svn.freebsd.org/changeset/base/187496 Log: MFC r181693: Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space that redzone adds to the allocation for storing its metadata is at least as large as the metadata that it will store there. PR: kern/128744 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/vm/redzone.c Modified: stable/7/sys/vm/redzone.c ============================================================================== --- stable/7/sys/vm/redzone.c Tue Jan 20 22:26:09 2009 (r187495) +++ stable/7/sys/vm/redzone.c Tue Jan 20 22:34:38 2009 (r187496) @@ -54,6 +54,8 @@ static u_long redzone_roundup(u_long n) { + if (n < REDZONE_HSIZE) + n = REDZONE_HSIZE; if (n <= 128) return (128); else if (n <= 256) From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 22:37:57 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04D71106564A; Tue, 20 Jan 2009 22:37: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 E85DE8FC12; Tue, 20 Jan 2009 22:37:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0KMbuEu058961; Tue, 20 Jan 2009 22:37:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0KMbuNf058960; Tue, 20 Jan 2009 22:37:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200901202237.n0KMbuNf058960@svn.freebsd.org> From: Xin LI Date: Tue, 20 Jan 2009 22:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187497 - stable/7/lib/libstand X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 22:37:57 -0000 Author: delphij Date: Tue Jan 20 22:37:56 2009 New Revision: 187497 URL: http://svn.freebsd.org/changeset/base/187497 Log: MFC r185037: Obey signedness flag in %z case. Modified: stable/7/lib/libstand/ (props changed) stable/7/lib/libstand/printf.c Modified: stable/7/lib/libstand/printf.c ============================================================================== --- stable/7/lib/libstand/printf.c Tue Jan 20 22:34:38 2009 (r187496) +++ stable/7/lib/libstand/printf.c Tue Jan 20 22:37:56 2009 (r187497) @@ -381,7 +381,7 @@ handle_sign: else if (lflag) num = va_arg(ap, long); else if (zflag) - num = va_arg(ap, size_t); + num = va_arg(ap, ssize_t); else num = va_arg(ap, int); number: From owner-svn-src-stable@FreeBSD.ORG Tue Jan 20 22:51:34 2009 Return-Path: Delivered-To: svn-src-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501C21065692; Tue, 20 Jan 2009 22:51:34 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id DE89C8FC20; Tue, 20 Jan 2009 22:51:33 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id DA6912844E; Wed, 21 Jan 2009 06:51:32 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 8B095EB1A59; Wed, 21 Jan 2009 06:51:32 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id 0YXrQS0-H-7e; Wed, 21 Jan 2009 06:51:27 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 00209EB0F33; Wed, 21 Jan 2009 06:51:22 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=nfJzAJOqNf332eda9M6FurfGHnquMpL9WUnOfRNVLa7I2kXAUi8Fz/0RwRsB8xCW5 T0ke2lcJ+iV6hu+7IKbbg== Message-ID: <49765564.7000808@delphij.net> Date: Tue, 20 Jan 2009 14:51:16 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.19 (X11/20090112) MIME-Version: 1.0 To: d@delphij.net References: <200901120039.n0C0dMKX043214@svn.freebsd.org> <20090112083144.GA69408@dragon.NUXI.org> <4971AE26.70406@delphij.net> In-Reply-To: <4971AE26.70406@delphij.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@FreeBSD.ORG, svn-src-stable@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, obrien@FreeBSD.ORG, src-committers@FreeBSD.ORG, Xin LI Subject: Re: svn commit: r187069 - stable/7/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2009 22:51:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, David, I have made a change to rename my 'C' to 'D' to avoid the conflict. I will MFC my change after 1 week settle to see if there is objections. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkl2VWMACgkQi+vbBBjt66BPHQCfYMW9AIJ5W9Q8PVVg0YoSa+FD KfUAn27fXoHFnAqjUom2e3JGb5QeCH+j =atXi -----END PGP SIGNATURE----- From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 00:26:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE49B106564A; Wed, 21 Jan 2009 00:26:45 +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 9D4358FC1D; Wed, 21 Jan 2009 00:26:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0L0QjZP061299; Wed, 21 Jan 2009 00:26:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0L0Qjfe061298; Wed, 21 Jan 2009 00:26:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200901210026.n0L0Qjfe061298@svn.freebsd.org> From: Xin LI Date: Wed, 21 Jan 2009 00:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187506 - in stable/7/sys: . kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 00:26:46 -0000 Author: delphij Date: Wed Jan 21 00:26:45 2009 New Revision: 187506 URL: http://svn.freebsd.org/changeset/base/187506 Log: MFC r185036: Obey signedness flag in %z case. Modified: stable/7/sys/ (props changed) stable/7/sys/kern/subr_prf.c Modified: stable/7/sys/kern/subr_prf.c ============================================================================== --- stable/7/sys/kern/subr_prf.c Tue Jan 20 23:25:27 2009 (r187505) +++ stable/7/sys/kern/subr_prf.c Wed Jan 21 00:26:45 2009 (r187506) @@ -810,7 +810,7 @@ handle_sign: else if (lflag) num = va_arg(ap, long); else if (zflag) - num = va_arg(ap, size_t); + num = va_arg(ap, ssize_t); else if (hflag) num = (short)va_arg(ap, int); else if (cflag) From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 06:32:33 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ECDC1065695; Wed, 21 Jan 2009 06:32:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1B08FC22; Wed, 21 Jan 2009 06:32:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0L6WWPJ068906; Wed, 21 Jan 2009 06:32:32 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0L6WW4Y068905; Wed, 21 Jan 2009 06:32:32 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901210632.n0L6WW4Y068905@svn.freebsd.org> From: Alan Cox Date: Wed, 21 Jan 2009 06:32: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: r187520 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 06:32:34 -0000 Author: alc Date: Wed Jan 21 06:32:32 2009 New Revision: 187520 URL: http://svn.freebsd.org/changeset/base/187520 Log: MFC rev 177851 Optimize pmap_pml4e() and pmap_pdpe() based upon two observations: The given pmap is never NULL, and therefore pmap_pml4e() can never return NULL. The pervasive use of these inline functions throughout the pmap makes these simple changes worthwhile. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 06:30:53 2009 (r187519) +++ stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 06:32:32 2009 (r187520) @@ -290,8 +290,6 @@ static __inline pml4_entry_t * pmap_pml4e(pmap_t pmap, vm_offset_t va) { - if (!pmap) - return NULL; return (&pmap->pm_pml4[pmap_pml4e_index(va)]); } @@ -312,7 +310,7 @@ pmap_pdpe(pmap_t pmap, vm_offset_t va) pml4_entry_t *pml4e; pml4e = pmap_pml4e(pmap, va); - if (pml4e == NULL || (*pml4e & PG_V) == 0) + if ((*pml4e & PG_V) == 0) return NULL; return (pmap_pml4e_to_pdpe(pml4e, va)); } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 07:33:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2D2E106564A; Wed, 21 Jan 2009 07:33:18 +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 C4CC18FC0A; Wed, 21 Jan 2009 07:33:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0L7XIYq070138; Wed, 21 Jan 2009 07:33:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0L7XIsn070136; Wed, 21 Jan 2009 07:33:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901210733.n0L7XIsn070136@svn.freebsd.org> From: Alan Cox Date: Wed, 21 Jan 2009 07:33:18 +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: r187522 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 07:33:19 -0000 Author: alc Date: Wed Jan 21 07:33:18 2009 New Revision: 187522 URL: http://svn.freebsd.org/changeset/base/187522 Log: MFC rev 180846 Style fixes to several function definitions. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 06:55:27 2009 (r187521) +++ stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 07:33:18 2009 (r187522) @@ -2602,9 +2602,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int * are taken, but the code works. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { vm_offset_t va; vm_page_t p, pdpg; @@ -2728,7 +2727,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) + vm_offset_t src_addr) { vm_page_t free; vm_offset_t addr; @@ -3339,10 +3338,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t } int -pmap_change_attr(va, size, mode) - vm_offset_t va; - vm_size_t size; - int mode; +pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; pd_entry_t *pde; Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Wed Jan 21 06:55:27 2009 (r187521) +++ stable/7/sys/i386/i386/pmap.c Wed Jan 21 07:33:18 2009 (r187522) @@ -2674,9 +2674,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int * are taken, but the code works. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { vm_page_t p; @@ -2781,7 +2780,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) + vm_offset_t src_addr) { vm_page_t free; vm_offset_t addr; @@ -3409,10 +3408,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t } int -pmap_change_attr(va, size, mode) - vm_offset_t va; - vm_size_t size; - int mode; +pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; pt_entry_t *pte; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 07:41:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787C2106564A; Wed, 21 Jan 2009 07:41:24 +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 659148FC08; Wed, 21 Jan 2009 07:41:24 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0L7fOdg070344; Wed, 21 Jan 2009 07:41:24 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0L7fODh070343; Wed, 21 Jan 2009 07:41:24 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901210741.n0L7fODh070343@svn.freebsd.org> From: Alan Cox Date: Wed, 21 Jan 2009 07:41:24 +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: r187523 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 07:41:25 -0000 Author: alc Date: Wed Jan 21 07:41:24 2009 New Revision: 187523 URL: http://svn.freebsd.org/changeset/base/187523 Log: MFC rev 175325 Make pmap_is_prefaultable() more TLB friendly. Specifically, make it use the kernel's direct map instead of the pmap's recursive mapping to access the lowest level in the page table. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 07:33:18 2009 (r187522) +++ stable/7/sys/amd64/amd64/pmap.c Wed Jan 21 07:41:24 2009 (r187523) @@ -3091,7 +3091,7 @@ pmap_is_prefaultable(pmap_t pmap, vm_off PMAP_LOCK(pmap); pde = pmap_pde(pmap, addr); if (pde != NULL && (*pde & PG_V)) { - pte = vtopte(addr); + pte = pmap_pde_to_pte(pde, addr); rv = (*pte & PG_V) == 0; } PMAP_UNLOCK(pmap); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 12:11:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FA01065861; Wed, 21 Jan 2009 12:11:19 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 530078FC1E; Wed, 21 Jan 2009 12:11:19 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180170197.adsl.alicedsl.de [85.180.170.197]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n0LCBFjo073619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Jan 2009 13:11:16 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n0LCBDGb077079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jan 2009 13:11:13 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n0LCBCh1077078; Wed, 21 Jan 2009 13:11:12 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Wed, 21 Jan 2009 13:11:12 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Peter Wemm Message-ID: <20090121121111.GA1440@roadrunner.spoerlein.net> Mail-Followup-To: Peter Wemm , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org References: <200901210741.n0L7fODh070343@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200901210741.n0L7fODh070343@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Mailman-Approved-At: Wed, 21 Jan 2009 12:32:29 +0000 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187523 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 12:11:21 -0000 Just picking a random commit, but since a couple of days, nearly all commits to stable/7/sys contain the props changed line for > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/dev/ath/ath_hal/ (props changed) > stable/7/sys/dev/cxgb/ (props changed) It's always these four. What's up with that? Cheers, Ulrich Spörlein -- None are more hopelessly enslaved than those who falsely believe they are free -- Johann Wolfgang von Goethe From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 13:16:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3069D10656CF; Wed, 21 Jan 2009 13:16:21 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id E509D8FC20; Wed, 21 Jan 2009 13:16:20 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:1416:e549:1db8:acb8] (unknown [IPv6:2001:7b8:3a7:0:1416:e549:1db8:acb8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 98EF511F838; Wed, 21 Jan 2009 14:16:19 +0100 (CET) Message-ID: <49772025.9050807@andric.com> Date: Wed, 21 Jan 2009 14:16:21 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b3pre) Gecko/20090116 Shredder/3.0b2pre MIME-Version: 1.0 To: Peter Wemm , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org References: <200901210741.n0L7fODh070343@svn.freebsd.org> <20090121121111.GA1440@roadrunner.spoerlein.net> In-Reply-To: <20090121121111.GA1440@roadrunner.spoerlein.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r187523 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 13:16:23 -0000 On 2009-01-21 13:11, Ulrich Sp=C3=B6rlein wrote: > Just picking a random commit, but since a couple of days, nearly all > commits to stable/7/sys contain the props changed line for >=20 >> Modified: >> stable/7/sys/ (props changed) >> stable/7/sys/contrib/pf/ (props changed) >> stable/7/sys/dev/ath/ath_hal/ (props changed) >> stable/7/sys/dev/cxgb/ (props changed) >=20 > It's always these four. What's up with that? Looks like Subversion merge information (since it says "props changed"). From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:01:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BC231065670; Wed, 21 Jan 2009 15:01:36 +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 48C798FC17; Wed, 21 Jan 2009 15:01:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LF1aLu080912; Wed, 21 Jan 2009 15:01:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LF1agR080911; Wed, 21 Jan 2009 15:01:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211501.n0LF1agR080911@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 15:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187529 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb i386/cpufreq X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:01:37 -0000 Author: jhb Date: Wed Jan 21 15:01:36 2009 New Revision: 187529 URL: http://svn.freebsd.org/changeset/base/187529 Log: MFC: If we are unable to obtain a frequency list from either ACPI or the static tables, then attempt to build a simple list containing just the high and low frequencies if the hw.est.msr_info tunable is set to 1. By default this is disabled. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/cpufreq/est.c Modified: stable/7/sys/i386/cpufreq/est.c ============================================================================== --- stable/7/sys/i386/cpufreq/est.c Wed Jan 21 14:51:38 2009 (r187528) +++ stable/7/sys/i386/cpufreq/est.c Wed Jan 21 15:01:36 2009 (r187529) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include "cpufreq_if.h" +#include #include #include @@ -71,6 +72,7 @@ typedef struct { struct est_softc { device_t dev; int acpi_settings; + int msr_settings; freq_info *freq_list; }; @@ -92,6 +94,8 @@ struct est_softc { const char intel_id[] = "GenuineIntel"; const char centaur_id[] = "CentaurHauls"; +static int msr_info_enabled = 0; +TUNABLE_INT("hw.est.msr_info", &msr_info_enabled); /* Default bus clock value for Centrino processors. */ #define INTEL_BUS_CLK 100 @@ -898,6 +902,7 @@ static int est_detach(device_t parent); static int est_get_info(device_t dev); static int est_acpi_info(device_t dev, freq_info **freqs); static int est_table_info(device_t dev, uint64_t msr, freq_info **freqs); +static int est_msr_info(device_t dev, uint64_t msr, freq_info **freqs); static freq_info *est_get_current(freq_info *freq_list); static int est_settings(device_t dev, struct cf_setting *sets, int *count); static int est_set(device_t dev, const struct cf_setting *set); @@ -1039,7 +1044,7 @@ est_detach(device_t dev) return (error); sc = device_get_softc(dev); - if (sc->acpi_settings) + if (sc->acpi_settings || sc->msr_settings) free(sc->freq_list, M_DEVBUF); return (0); } @@ -1063,6 +1068,8 @@ est_get_info(device_t dev) error = est_table_info(dev, msr, &sc->freq_list); if (error) error = est_acpi_info(dev, &sc->freq_list); + if (error) + error = est_msr_info(dev, msr, &sc->freq_list); if (error) { printf( @@ -1168,6 +1175,91 @@ est_table_info(device_t dev, uint64_t ms return (0); } +static int +bus_speed_ok(int bus) +{ + + switch (bus) { + case 100: + case 133: + case 333: + return (1); + default: + return (0); + } +} + +/* + * Flesh out a simple rate table containing the high and low frequencies + * based on the current clock speed and the upper 32 bits of the MSR. + */ +static int +est_msr_info(device_t dev, uint64_t msr, freq_info **freqs) +{ + struct est_softc *sc; + freq_info *fp; + int bus, freq, volts; + uint16_t id; + + if (!msr_info_enabled) + return (EOPNOTSUPP); + + /* Figure out the bus clock. */ + freq = tsc_freq / 1000000; + id = msr >> 32; + bus = freq / (id >> 8); + device_printf(dev, "Guessed bus clock (high) of %d MHz\n", bus); + if (!bus_speed_ok(bus)) { + /* We may be running on the low frequency. */ + id = msr >> 48; + bus = freq / (id >> 8); + device_printf(dev, "Guessed bus clock (low) of %d MHz\n", bus); + if (!bus_speed_ok(bus)) + return (EOPNOTSUPP); + + /* Calculate high frequency. */ + id = msr >> 32; + freq = ((id >> 8) & 0xff) * bus; + } + + /* Fill out a new freq table containing just the high and low freqs. */ + sc = device_get_softc(dev); + fp = malloc(sizeof(freq_info) * 3, M_DEVBUF, M_WAITOK | M_ZERO); + + /* First, the high frequency. */ + volts = id & 0xff; + if (volts != 0) { + volts <<= 4; + volts += 700; + } + fp[0].freq = freq; + fp[0].volts = volts; + fp[0].id16 = id; + fp[0].power = CPUFREQ_VAL_UNKNOWN; + device_printf(dev, "Guessed high setting of %d MHz @ %d Mv\n", freq, + volts); + + /* Second, the low frequency. */ + id = msr >> 48; + freq = ((id >> 8) & 0xff) * bus; + volts = id & 0xff; + if (volts != 0) { + volts <<= 4; + volts += 700; + } + fp[1].freq = freq; + fp[1].volts = volts; + fp[1].id16 = id; + fp[1].power = CPUFREQ_VAL_UNKNOWN; + device_printf(dev, "Guessed low setting of %d MHz @ %d Mv\n", freq, + volts); + + /* Table is already terminated due to M_ZERO. */ + sc->msr_settings = TRUE; + *freqs = fp; + return (0); +} + static void est_get_id16(uint16_t *id16_p) { From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:04:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A03106567D; Wed, 21 Jan 2009 15:04:06 +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 BE8BD8FC18; Wed, 21 Jan 2009 15:04:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LF46E2081010; Wed, 21 Jan 2009 15:04:06 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LF46BP081009; Wed, 21 Jan 2009 15:04:06 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200901211504.n0LF46BP081009@svn.freebsd.org> From: Ed Maste Date: Wed, 21 Jan 2009 15:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187530 - in stable/6/sys: . vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:04:10 -0000 Author: emaste Date: Wed Jan 21 15:04:06 2009 New Revision: 187530 URL: http://svn.freebsd.org/changeset/base/187530 Log: MFC r181693: Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space that redzone adds to the allocation for storing its metadata is at least as large as the metadata that it will store there. PR: kern/128744 Modified: stable/6/sys/ (props changed) stable/6/sys/vm/redzone.c Modified: stable/6/sys/vm/redzone.c ============================================================================== --- stable/6/sys/vm/redzone.c Wed Jan 21 15:01:36 2009 (r187529) +++ stable/6/sys/vm/redzone.c Wed Jan 21 15:04:06 2009 (r187530) @@ -54,6 +54,8 @@ static u_long redzone_roundup(u_long n) { + if (n < REDZONE_HSIZE) + n = REDZONE_HSIZE; if (n <= 128) return (128); else if (n <= 256) From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:06:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 092FC106585F; Wed, 21 Jan 2009 15:06:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E773B8FC24; Wed, 21 Jan 2009 15:06:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LF6ris081131; Wed, 21 Jan 2009 15:06:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LF6rwP081130; Wed, 21 Jan 2009 15:06:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901211506.n0LF6rwP081130@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 21 Jan 2009 15:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187531 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:06:57 -0000 Author: kib Date: Wed Jan 21 15:06:53 2009 New Revision: 187531 URL: http://svn.freebsd.org/changeset/base/187531 Log: MFC r185170. r185556: Busy ufs filesystem around block of code that does ".." lookup. Do not lock vnode interlock around reading of v_iflag to check VI_DOOMED. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/ufs/ufs/ufs_lookup.c Modified: stable/7/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_lookup.c Wed Jan 21 15:04:06 2009 (r187530) +++ stable/7/sys/ufs/ufs/ufs_lookup.c Wed Jan 21 15:06:53 2009 (r187531) @@ -158,6 +158,7 @@ ufs_lookup(ap) struct thread *td = cnp->cn_thread; ino_t ino; int ltype; + struct mount *mp; bp = NULL; slotoffset = -1; @@ -579,9 +580,26 @@ found: pdp = vdp; if (flags & ISDOTDOT) { ltype = VOP_ISLOCKED(pdp, td); + mp = pdp->v_mount; + for (;;) { + error = vfs_busy(mp, LK_NOWAIT, NULL, td); + if (error == 0) + break; + VOP_UNLOCK(pdp, 0, td); + pause("ufs_dd", 1); + vn_lock(pdp, ltype | LK_RETRY, td); + if (pdp->v_iflag & VI_DOOMED) + return (ENOENT); + } VOP_UNLOCK(pdp, 0, td); /* race to get the inode */ - error = VFS_VGET(pdp->v_mount, ino, cnp->cn_lkflags, &tdp); + error = VFS_VGET(mp, ino, cnp->cn_lkflags, &tdp); + vfs_unbusy(mp, td); vn_lock(pdp, ltype | LK_RETRY, td); + if (pdp->v_iflag & VI_DOOMED) { + if (error == 0) + vput(tdp); + error = ENOENT; + } if (error) return (error); *vpp = tdp; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:19:38 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4D6106567A; Wed, 21 Jan 2009 15: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 A82EF8FC12; Wed, 21 Jan 2009 15:19:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LFJcVT081416; Wed, 21 Jan 2009 15:19:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LFJc3x081415; Wed, 21 Jan 2009 15:19:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211519.n0LFJc3x081415@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 15:19:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187532 - stable/7/gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:19:39 -0000 Author: jhb Date: Wed Jan 21 15:19:38 2009 New Revision: 187532 URL: http://svn.freebsd.org/changeset/base/187532 Log: MFC: Use existing GDB routines for parsing the section table of klds in the 'add-kld' command. Modified: stable/7/gnu/usr.bin/gdb/kgdb/ (props changed) stable/7/gnu/usr.bin/gdb/kgdb/kld.c Modified: stable/7/gnu/usr.bin/gdb/kgdb/kld.c ============================================================================== --- stable/7/gnu/usr.bin/gdb/kgdb/kld.c Wed Jan 21 15:06:53 2009 (r187531) +++ stable/7/gnu/usr.bin/gdb/kgdb/kld.c Wed Jan 21 15:19:38 2009 (r187532) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -196,39 +197,14 @@ find_kld_address (char *arg, CORE_ADDR * return (0); } -struct add_section_info { - struct section_addr_info *section_addrs; - int sect_index; - CORE_ADDR base_addr; -}; - -static void -add_section (bfd *bfd, asection *sect, void *arg) -{ - struct add_section_info *asi = arg; - CORE_ADDR address; - char *name; - - /* Ignore non-resident sections. */ - if ((bfd_get_section_flags(bfd, sect) & (SEC_ALLOC | SEC_LOAD)) == 0) - return; - - name = xstrdup(bfd_get_section_name(bfd, sect)); - make_cleanup(xfree, name); - address = asi->base_addr + bfd_get_section_vma(bfd, sect); - asi->section_addrs->other[asi->sect_index].name = name; - asi->section_addrs->other[asi->sect_index].addr = address; - asi->section_addrs->other[asi->sect_index].sectindex = sect->index; - printf_unfiltered("\t%s_addr = %s\n", name, local_hex_string(address)); - asi->sect_index++; -} - static void load_kld (char *path, CORE_ADDR base_addr, int from_tty) { - struct add_section_info asi; + struct section_addr_info *sap; + struct section_table *sections = NULL, *sections_end = NULL, *s; struct cleanup *cleanup; bfd *bfd; + int i; /* Open the kld. */ bfd = bfd_openr(path, gnutarget); @@ -244,19 +220,30 @@ load_kld (char *path, CORE_ADDR base_add if (bfd_get_section_by_name (bfd, ".text") == NULL) error("\"%s\": can't find text section", path); - printf_unfiltered("add symbol table from file \"%s\" at\n", path); + /* Build a section table from the bfd and relocate the sections. */ + if (build_section_table (bfd, §ions, §ions_end)) + error("\"%s\": can't find file sections", path); + cleanup = make_cleanup(xfree, sections); + for (s = sections; s < sections_end; s++) { + s->addr += base_addr; + s->endaddr += base_addr; + } + + /* Build a section addr info to pass to symbol_file_add(). */ + sap = build_section_addr_info_from_section_table (sections, + sections_end); + cleanup = make_cleanup((make_cleanup_ftype *)free_section_addr_info, + sap); - /* Build a section table for symbol_file_add() from the bfd sections. */ - asi.section_addrs = alloc_section_addr_info(bfd_count_sections(bfd)); - cleanup = make_cleanup(xfree, asi.section_addrs); - asi.sect_index = 0; - asi.base_addr = base_addr; - bfd_map_over_sections(bfd, add_section, &asi); + printf_unfiltered("add symbol table from file \"%s\" at\n", path); + for (i = 0; i < sap->num_sections; i++) + printf_unfiltered("\t%s_addr = %s\n", sap->other[i].name, + local_hex_string(sap->other[i].addr)); if (from_tty && (!query("%s", ""))) error("Not confirmed."); - symbol_file_add(path, from_tty, asi.section_addrs, 0, OBJF_USERLOADED); + symbol_file_add(path, from_tty, sap, 0, OBJF_USERLOADED); do_cleanups(cleanup); } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:25:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76112106566B; Wed, 21 Jan 2009 15:25:01 +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 635C98FC18; Wed, 21 Jan 2009 15:25:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LFP0eY081609; Wed, 21 Jan 2009 15:25:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LFP0jn081608; Wed, 21 Jan 2009 15:25:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211525.n0LFP0jn081608@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 15:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187533 - stable/6/gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:25:02 -0000 Author: jhb Date: Wed Jan 21 15:25:00 2009 New Revision: 187533 URL: http://svn.freebsd.org/changeset/base/187533 Log: MFC: Use existing GDB routines for parsing the section table of klds in the 'add-kld' command. Modified: stable/6/gnu/usr.bin/gdb/kgdb/ (props changed) stable/6/gnu/usr.bin/gdb/kgdb/kld.c Modified: stable/6/gnu/usr.bin/gdb/kgdb/kld.c ============================================================================== --- stable/6/gnu/usr.bin/gdb/kgdb/kld.c Wed Jan 21 15:19:38 2009 (r187532) +++ stable/6/gnu/usr.bin/gdb/kgdb/kld.c Wed Jan 21 15:25:00 2009 (r187533) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -196,39 +197,14 @@ find_kld_address (char *arg, CORE_ADDR * return (0); } -struct add_section_info { - struct section_addr_info *section_addrs; - int sect_index; - CORE_ADDR base_addr; -}; - -static void -add_section (bfd *bfd, asection *sect, void *arg) -{ - struct add_section_info *asi = arg; - CORE_ADDR address; - char *name; - - /* Ignore non-resident sections. */ - if ((bfd_get_section_flags(bfd, sect) & (SEC_ALLOC | SEC_LOAD)) == 0) - return; - - name = xstrdup(bfd_get_section_name(bfd, sect)); - make_cleanup(xfree, name); - address = asi->base_addr + bfd_get_section_vma(bfd, sect); - asi->section_addrs->other[asi->sect_index].name = name; - asi->section_addrs->other[asi->sect_index].addr = address; - asi->section_addrs->other[asi->sect_index].sectindex = sect->index; - printf_unfiltered("\t%s_addr = %s\n", name, local_hex_string(address)); - asi->sect_index++; -} - static void load_kld (char *path, CORE_ADDR base_addr, int from_tty) { - struct add_section_info asi; + struct section_addr_info *sap; + struct section_table *sections = NULL, *sections_end = NULL, *s; struct cleanup *cleanup; bfd *bfd; + int i; /* Open the kld. */ bfd = bfd_openr(path, gnutarget); @@ -244,19 +220,30 @@ load_kld (char *path, CORE_ADDR base_add if (bfd_get_section_by_name (bfd, ".text") == NULL) error("\"%s\": can't find text section", path); - printf_unfiltered("add symbol table from file \"%s\" at\n", path); + /* Build a section table from the bfd and relocate the sections. */ + if (build_section_table (bfd, §ions, §ions_end)) + error("\"%s\": can't find file sections", path); + cleanup = make_cleanup(xfree, sections); + for (s = sections; s < sections_end; s++) { + s->addr += base_addr; + s->endaddr += base_addr; + } + + /* Build a section addr info to pass to symbol_file_add(). */ + sap = build_section_addr_info_from_section_table (sections, + sections_end); + cleanup = make_cleanup((make_cleanup_ftype *)free_section_addr_info, + sap); - /* Build a section table for symbol_file_add() from the bfd sections. */ - asi.section_addrs = alloc_section_addr_info(bfd_count_sections(bfd)); - cleanup = make_cleanup(xfree, asi.section_addrs); - asi.sect_index = 0; - asi.base_addr = base_addr; - bfd_map_over_sections(bfd, add_section, &asi); + printf_unfiltered("add symbol table from file \"%s\" at\n", path); + for (i = 0; i < sap->num_sections; i++) + printf_unfiltered("\t%s_addr = %s\n", sap->other[i].name, + local_hex_string(sap->other[i].addr)); if (from_tty && (!query("%s", ""))) error("Not confirmed."); - symbol_file_add(path, from_tty, asi.section_addrs, 0, OBJF_USERLOADED); + symbol_file_add(path, from_tty, sap, 0, OBJF_USERLOADED); do_cleanups(cleanup); } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 15:51:16 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3F5A1065677; Wed, 21 Jan 2009 15:51:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DC088FC27; Wed, 21 Jan 2009 15:51:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LFpG6B082200; Wed, 21 Jan 2009 15:51:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LFpGQP082185; Wed, 21 Jan 2009 15:51:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901211551.n0LFpGQP082185@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 21 Jan 2009 15:51: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: r187534 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb fs/devfs fs/fdescfs fs/hpfs fs/msdosfs fs/ntfs fs/portalfs fs/pseudofs fs/smbfs fs/tmpfs fs/udf gnu/fs/xfs/FreeBSD kern ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 15:51:17 -0000 Author: kib Date: Wed Jan 21 15:51:15 2009 New Revision: 187534 URL: http://svn.freebsd.org/changeset/base/187534 Log: MFC r183211: Initialize birthtime fields in vn_stat() to prevent stat(2) from returning uninitialized birthtime. Most file systems don't initialize birthtime properly in their VOP_GETTATTR(). MFC r183212: Initialize va_flags and va_filerev properly in VOP_GETATTR(). Don't initialize va_vaflags and va_spare because they are not part of the VOP_GETATTR() API. Also don't initialize birthtime to ctime or zero. MFC rr183213: Initialize va_rdev to NODEV and va_fsid to VNOVAL before the VOP_GETATTR() call in vn_stat(). Thus if a file system doesn't initialize those fields in VOP_GETATTR() they will have a sane default value. MFC r183214: Initialize va_rdev to NODEV instead of 0 or VNOVAL in VOP_GETATTR(). NODEV is more appropriate when va_rdev doesn't have a meaningful value. MFC r183215: fdescfs, devfs, mqueuefs, nfs, portalfs, pseudofs, tmpfs and xfs initialize the vattr structure in VOP_GETATTR() with VATTR_NULL(), vattr_null() or by zeroing it. Remove these to allow preinitialization of fields work in vn_stat(). This is needed to get birthtime initialized correctly. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/fs/devfs/devfs_vnops.c stable/7/sys/fs/fdescfs/fdesc_vnops.c stable/7/sys/fs/hpfs/hpfs_vnops.c stable/7/sys/fs/msdosfs/msdosfs_vnops.c stable/7/sys/fs/ntfs/ntfs_vnops.c stable/7/sys/fs/portalfs/portal_vnops.c stable/7/sys/fs/pseudofs/pseudofs_vnops.c stable/7/sys/fs/smbfs/smbfs_node.c stable/7/sys/fs/tmpfs/tmpfs_vnops.c stable/7/sys/fs/udf/udf_vnops.c stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c stable/7/sys/kern/uipc_mqueue.c stable/7/sys/kern/vfs_vnops.c stable/7/sys/nfsclient/nfs_vnops.c stable/7/sys/ufs/ufs/ufs_vnops.c Modified: stable/7/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/7/sys/fs/devfs/devfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/devfs/devfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -507,8 +507,6 @@ devfs_getattr(struct vop_getattr_args *a KASSERT(de != NULL, ("Null dir dirent in devfs_getattr vp=%p", vp)); } - bzero((caddr_t) vap, sizeof(*vap)); - vattr_null(vap); vap->va_uid = de->de_uid; vap->va_gid = de->de_gid; vap->va_mode = de->de_mode; @@ -551,6 +549,7 @@ devfs_getattr(struct vop_getattr_args *a } vap->va_gen = 0; vap->va_flags = 0; + vap->va_filerev = 0; vap->va_nlink = de->de_links; vap->va_fileid = de->de_inode; Modified: stable/7/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- stable/7/sys/fs/fdescfs/fdesc_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/fdescfs/fdesc_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -391,8 +391,6 @@ fdesc_getattr(ap) switch (VTOFDESC(vp)->fd_type) { case Froot: - VATTR_NULL(vap); - vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; vap->va_type = VDIR; vap->va_nlink = 2; @@ -407,8 +405,9 @@ fdesc_getattr(ap) vap->va_ctime = vap->va_mtime; vap->va_gen = 0; vap->va_flags = 0; - vap->va_rdev = 0; + vap->va_rdev = NODEV; vap->va_bytes = 0; + vap->va_filerev = 0; break; case Fdesc: @@ -421,7 +420,6 @@ fdesc_getattr(ap) error = fo_stat(fp, &stb, ap->a_td->td_ucred, ap->a_td); fdrop(fp, ap->a_td); if (error == 0) { - VATTR_NULL(vap); vap->va_type = IFTOVT(stb.st_mode); vap->va_mode = stb.st_mode; #define FDRX (VREAD|VEXEC) @@ -456,6 +454,8 @@ fdesc_getattr(ap) vap->va_ctime = stb.st_ctimespec; vap->va_uid = stb.st_uid; vap->va_gid = stb.st_gid; + vap->va_gen = 0; + vap->va_filerev = 0; } break; Modified: stable/7/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- stable/7/sys/fs/hpfs/hpfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/hpfs/hpfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -425,7 +425,7 @@ hpfs_getattr(ap) vap->va_nlink = 1; vap->va_uid = hp->h_uid; vap->va_gid = hp->h_gid; - vap->va_rdev = 0; /* XXX UNODEV ? */ + vap->va_rdev = NODEV; vap->va_size = hp->h_fn.fn_size; vap->va_bytes = ((hp->h_fn.fn_size + DEV_BSIZE-1) & ~(DEV_BSIZE-1)) + DEV_BSIZE; Modified: stable/7/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/7/sys/fs/msdosfs/msdosfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/msdosfs/msdosfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -335,7 +335,7 @@ msdosfs_getattr(ap) vap->va_uid = pmp->pm_uid; vap->va_gid = pmp->pm_gid; vap->va_nlink = 1; - vap->va_rdev = 0; + vap->va_rdev = NODEV; vap->va_size = dep->de_FileSize; fattime2timespec(dep->de_MDate, dep->de_MTime, 0, 0, &vap->va_mtime); vap->va_ctime = vap->va_mtime; Modified: stable/7/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- stable/7/sys/fs/ntfs/ntfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/ntfs/ntfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -191,7 +191,7 @@ ntfs_getattr(ap) vap->va_nlink = (ip->i_nlink || ip->i_flag & IN_LOADED ? ip->i_nlink : 1); vap->va_uid = ip->i_mp->ntm_uid; vap->va_gid = ip->i_mp->ntm_gid; - vap->va_rdev = 0; /* XXX UNODEV ? */ + vap->va_rdev = NODEV; vap->va_size = fp->f_size; vap->va_bytes = fp->f_allocated; vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access); Modified: stable/7/sys/fs/portalfs/portal_vnops.c ============================================================================== --- stable/7/sys/fs/portalfs/portal_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/portalfs/portal_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -453,8 +453,6 @@ portal_getattr(ap) struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - bzero(vap, sizeof(*vap)); - vattr_null(vap); vap->va_uid = 0; vap->va_gid = 0; vap->va_size = DEV_BSIZE; @@ -464,9 +462,10 @@ portal_getattr(ap) vap->va_ctime = vap->va_mtime; vap->va_gen = 0; vap->va_flags = 0; - vap->va_rdev = 0; + vap->va_rdev = NODEV; /* vap->va_qbytes = 0; */ vap->va_bytes = 0; + vap->va_filerev = 0; /* vap->va_qsize = 0; */ if (vp->v_vflag & VV_ROOT) { vap->va_type = VDIR; Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/7/sys/fs/pseudofs/pseudofs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/pseudofs/pseudofs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -191,12 +191,12 @@ pfs_getattr(struct vop_getattr_args *va) if (!pfs_visible(curthread, pn, pvd->pvd_pid, &proc)) PFS_RETURN (ENOENT); - VATTR_NULL(vap); vap->va_type = vn->v_type; vap->va_fileid = pn_fileno(pn, pvd->pvd_pid); vap->va_flags = 0; vap->va_blocksize = PAGE_SIZE; vap->va_bytes = vap->va_size = 0; + vap->va_filerev = 0; vap->va_fsid = vn->v_mount->mnt_stat.f_fsid.val[0]; vap->va_nlink = 1; nanotime(&vap->va_ctime); Modified: stable/7/sys/fs/smbfs/smbfs_node.c ============================================================================== --- stable/7/sys/fs/smbfs/smbfs_node.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/smbfs/smbfs_node.c Wed Jan 21 15:51:15 2009 (r187534) @@ -438,7 +438,7 @@ smbfs_attr_cachelookup(struct vnode *vp, va->va_atime = va->va_ctime = va->va_mtime; /* time file changed */ va->va_gen = VNOVAL; /* generation number of file */ va->va_flags = 0; /* flags defined for file */ - va->va_rdev = VNOVAL; /* device the special file represents */ + va->va_rdev = NODEV; /* device the special file represents */ va->va_bytes = va->va_size; /* bytes of disk space held by file */ va->va_filerev = 0; /* file modification number */ va->va_vaflags = 0; /* operations flags */ Modified: stable/7/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/7/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/tmpfs/tmpfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -344,8 +344,6 @@ tmpfs_getattr(struct vop_getattr_args *v node = VP_TO_TMPFS_NODE(vp); - VATTR_NULL(vap); - tmpfs_update(vp); vap->va_type = vp->v_type; @@ -364,11 +362,9 @@ tmpfs_getattr(struct vop_getattr_args *v vap->va_gen = node->tn_gen; vap->va_flags = node->tn_flags; vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - node->tn_rdev : VNOVAL; + node->tn_rdev : NODEV; vap->va_bytes = round_page(node->tn_size); - vap->va_filerev = VNOVAL; - vap->va_vaflags = 0; - vap->va_spare = VNOVAL; /* XXX */ + vap->va_filerev = 0; return 0; } Modified: stable/7/sys/fs/udf/udf_vnops.c ============================================================================== --- stable/7/sys/fs/udf/udf_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/fs/udf/udf_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -279,7 +279,7 @@ udf_getattr(struct vop_getattr_args *a) udf_timetotimespec(&fentry->atime, &vap->va_atime); udf_timetotimespec(&fentry->mtime, &vap->va_mtime); vap->va_ctime = vap->va_mtime; /* XXX Stored as an Extended Attribute */ - vap->va_rdev = 0; /* XXX */ + vap->va_rdev = NODEV; if (vp->v_type & VDIR) { /* * Directories that are recorded within their ICB will show Modified: stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c ============================================================================== --- stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -241,7 +241,6 @@ _xfs_getattr( /* extract the xfs vnode from the private data */ //xfs_vnode_t *xvp = (xfs_vnode_t *)vp->v_data; - VATTR_NULL(vap); memset(&va,0,sizeof(xfs_vattr_t)); va.va_mask = XFS_AT_STAT|XFS_AT_GENCOUNT|XFS_AT_XFLAGS; @@ -274,15 +273,9 @@ _xfs_getattr( /* * Fields with no direct equivalent in XFS - * leave initialized by VATTR_NULL */ -#if 0 vap->va_filerev = 0; - vap->va_birthtime = va.va_ctime; - vap->va_vaflags = 0; vap->va_flags = 0; - vap->va_spare = 0; -#endif return (0); } Modified: stable/7/sys/kern/uipc_mqueue.c ============================================================================== --- stable/7/sys/kern/uipc_mqueue.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/kern/uipc_mqueue.c Wed Jan 21 15:51:15 2009 (r187534) @@ -1133,7 +1133,6 @@ mqfs_getattr(struct vop_getattr_args *ap struct vattr *vap = ap->a_vap; int error = 0; - VATTR_NULL(vap); vap->va_type = vp->v_type; vap->va_mode = pn->mn_mode; vap->va_nlink = 1; @@ -1150,10 +1149,9 @@ mqfs_getattr(struct vop_getattr_args *ap vap->va_birthtime = pn->mn_birth; vap->va_gen = 0; vap->va_flags = 0; - vap->va_rdev = 0; + vap->va_rdev = NODEV; vap->va_bytes = 0; vap->va_filerev = 0; - vap->va_vaflags = 0; return (error); } Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/kern/vfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -641,6 +641,17 @@ vn_stat(vp, sb, active_cred, file_cred, #endif vap = &vattr; + + /* + * Initialize defaults for new and unusual fields, so that file + * systems which don't support these fields don't need to know + * about them. + */ + vap->va_birthtime.tv_sec = -1; + vap->va_birthtime.tv_nsec = 0; + vap->va_fsid = VNOVAL; + vap->va_rdev = NODEV; + error = VOP_GETATTR(vp, vap, active_cred, td); if (error) return (error); Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/nfsclient/nfs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -631,6 +631,8 @@ nfs_getattr(struct vop_getattr_args *ap) { struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); + struct vattr *vap = ap->a_vap; + struct vattr vattr; caddr_t bpos, dpos; int error = 0; struct mbuf *mreq, *mrep, *md, *mb; @@ -646,12 +648,12 @@ nfs_getattr(struct vop_getattr_args *ap) /* * First look in the cache. */ - if (nfs_getattrcache(vp, ap->a_vap) == 0) + if (nfs_getattrcache(vp, &vattr) == 0) goto nfsmout; if (v3 && nfsaccess_cache_timeout > 0) { nfsstats.accesscache_misses++; nfs3_access_otw(vp, NFSV3ACCESS_ALL, ap->a_td, ap->a_cred); - if (nfs_getattrcache(vp, ap->a_vap) == 0) + if (nfs_getattrcache(vp, &vattr) == 0) goto nfsmout; } nfsstats.rpccnt[NFSPROC_GETATTR]++; @@ -661,10 +663,28 @@ nfs_getattr(struct vop_getattr_args *ap) nfsm_fhtom(vp, v3); nfsm_request(vp, NFSPROC_GETATTR, ap->a_td, ap->a_cred); if (!error) { - nfsm_loadattr(vp, ap->a_vap); + nfsm_loadattr(vp, &vattr); } m_freem(mrep); nfsmout: + vap->va_type = vattr.va_type; + vap->va_mode = vattr.va_mode; + vap->va_nlink = vattr.va_nlink; + vap->va_uid = vattr.va_uid; + vap->va_gid = vattr.va_gid; + vap->va_fsid = vattr.va_fsid; + vap->va_fileid = vattr.va_fileid; + vap->va_size = vattr.va_size; + vap->va_blocksize = vattr.va_blocksize; + vap->va_atime = vattr.va_atime; + vap->va_mtime = vattr.va_mtime; + vap->va_ctime = vattr.va_ctime; + vap->va_gen = vattr.va_gen; + vap->va_flags = vattr.va_flags; + vap->va_rdev = vattr.va_rdev; + vap->va_bytes = vattr.va_bytes; + vap->va_filerev = vattr.va_filerev; + return (error); } Modified: stable/7/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_vnops.c Wed Jan 21 15:25:00 2009 (r187533) +++ stable/7/sys/ufs/ufs/ufs_vnops.c Wed Jan 21 15:51:15 2009 (r187534) @@ -445,8 +445,6 @@ ufs_getattr(ap) vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec; vap->va_ctime.tv_sec = ip->i_din1->di_ctime; vap->va_ctime.tv_nsec = ip->i_din1->di_ctimensec; - vap->va_birthtime.tv_sec = 0; - vap->va_birthtime.tv_nsec = 0; vap->va_bytes = dbtob((u_quad_t)ip->i_din1->di_blocks); } else { vap->va_rdev = ip->i_din2->di_rdev; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 16:14:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 699B4106566C; Wed, 21 Jan 2009 16:14:44 +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 55B8E8FC18; Wed, 21 Jan 2009 16:14:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LGEiP6082750; Wed, 21 Jan 2009 16:14:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LGEiFM082747; Wed, 21 Jan 2009 16:14:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211614.n0LGEiFM082747@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 16:14:44 +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: r187535 - in stable/7/sys: . compat/freebsd32 compat/ia32 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 16:14:45 -0000 Author: jhb Date: Wed Jan 21 16:14:43 2009 New Revision: 187535 URL: http://svn.freebsd.org/changeset/base/187535 Log: MFC: Add support for installing 32-bit system calls from kernel modules. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/freebsd32_misc.c stable/7/sys/compat/freebsd32/freebsd32_util.h stable/7/sys/compat/ia32/ia32_sysvec.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 15:51:15 2009 (r187534) +++ stable/7/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 16:14:43 2009 (r187535) @@ -2589,3 +2589,83 @@ freebsd32_xxx(struct thread *td, struct return (error); } #endif + +int +syscall32_register(int *offset, struct sysent *new_sysent, + struct sysent *old_sysent) +{ + if (*offset == NO_SYSCALL) { + int i; + + for (i = 1; i < SYS_MAXSYSCALL; ++i) + if (freebsd32_sysent[i].sy_call == + (sy_call_t *)lkmnosys) + break; + if (i == SYS_MAXSYSCALL) + return (ENFILE); + *offset = i; + } else if (*offset < 0 || *offset >= SYS_MAXSYSCALL) + return (EINVAL); + else if (freebsd32_sysent[*offset].sy_call != (sy_call_t *)lkmnosys && + freebsd32_sysent[*offset].sy_call != (sy_call_t *)lkmressys) + return (EEXIST); + + *old_sysent = freebsd32_sysent[*offset]; + freebsd32_sysent[*offset] = *new_sysent; + return 0; +} + +int +syscall32_deregister(int *offset, struct sysent *old_sysent) +{ + + if (*offset) + freebsd32_sysent[*offset] = *old_sysent; + return 0; +} + +int +syscall32_module_handler(struct module *mod, int what, void *arg) +{ + struct syscall_module_data *data = (struct syscall_module_data*)arg; + modspecific_t ms; + int error; + + switch (what) { + case MOD_LOAD: + error = syscall32_register(data->offset, data->new_sysent, + &data->old_sysent); + if (error) { + /* Leave a mark so we know to safely unload below. */ + data->offset = NULL; + return error; + } + ms.intval = *data->offset; + MOD_XLOCK; + module_setspecific(mod, &ms); + MOD_XUNLOCK; + if (data->chainevh) + error = data->chainevh(mod, what, data->chainarg); + return (error); + case MOD_UNLOAD: + /* + * MOD_LOAD failed, so just return without calling the + * chained handler since we didn't pass along the MOD_LOAD + * event. + */ + if (data->offset == NULL) + return (0); + if (data->chainevh) { + error = data->chainevh(mod, what, data->chainarg); + if (error) + return (error); + } + error = syscall32_deregister(data->offset, &data->old_sysent); + return (error); + default: + error = EOPNOTSUPP; + if (data->chainevh) + error = data->chainevh(mod, what, data->chainarg); + return (error); + } +} Modified: stable/7/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_util.h Wed Jan 21 15:51:15 2009 (r187534) +++ stable/7/sys/compat/freebsd32/freebsd32_util.h Wed Jan 21 16:14:43 2009 (r187535) @@ -28,14 +28,16 @@ * $FreeBSD$ */ -#include -#include -#include - +#ifndef _COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ +#define _COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ +#include #include #include -#include + +#include +#include +#include struct freebsd32_ps_strings { u_int32_t ps_argvstr; /* first of 0 or more argument strings */ @@ -50,3 +52,35 @@ struct freebsd32_ps_strings { #define FREEBSD32_PS_STRINGS \ (FREEBSD32_USRSTACK - sizeof(struct freebsd32_ps_strings)) + +extern struct sysent freebsd32_sysent[]; + +#define SYSCALL32_MODULE(name, offset, new_sysent, evh, arg) \ +static struct syscall_module_data name##_syscall32_mod = { \ + evh, arg, offset, new_sysent, { 0, NULL } \ +}; \ + \ +static moduledata_t name##32_mod = { \ + #name, \ + syscall32_module_handler, \ + &name##_syscall32_mod \ +}; \ +DECLARE_MODULE(name##32, name##32_mod, SI_SUB_SYSCALLS, SI_ORDER_MIDDLE) + +#define SYSCALL32_MODULE_HELPER(syscallname) \ +static int syscallname##_syscall32 = FREEBSD32_SYS_##syscallname; \ +static struct sysent syscallname##_sysent32 = { \ + (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + (sy_call_t *)& syscallname \ +}; \ +SYSCALL32_MODULE(syscallname, \ + & syscallname##_syscall32, & syscallname##_sysent32,\ + NULL, NULL); + +int syscall32_register(int *offset, struct sysent *new_sysent, + struct sysent *old_sysent); +int syscall32_deregister(int *offset, struct sysent *old_sysent); +int syscall32_module_handler(struct module *mod, int what, void *arg); + +#endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ Modified: stable/7/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/7/sys/compat/ia32/ia32_sysvec.c Wed Jan 21 15:51:15 2009 (r187534) +++ stable/7/sys/compat/ia32/ia32_sysvec.c Wed Jan 21 16:14:43 2009 (r187535) @@ -96,8 +96,6 @@ CTASSERT(sizeof(struct ia32_sigframe4) = static register_t *ia32_copyout_strings(struct image_params *imgp); static void ia32_fixlimit(struct rlimit *rl, int which); -extern struct sysent freebsd32_sysent[]; - SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); static u_long ia32_maxdsiz = IA32_MAXDSIZ; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 16:28:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7996A1065672; Wed, 21 Jan 2009 16:28:15 +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 668328FC16; Wed, 21 Jan 2009 16:28:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LGSF83083051; Wed, 21 Jan 2009 16:28:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LGSFev083048; Wed, 21 Jan 2009 16:28:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211628.n0LGSFev083048@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 16:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187536 - in stable/6/sys: . compat/freebsd32 compat/ia32 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 16:28:16 -0000 Author: jhb Date: Wed Jan 21 16:28:15 2009 New Revision: 187536 URL: http://svn.freebsd.org/changeset/base/187536 Log: MFC: Add support for installing 32-bit system calls from kernel modules. Modified: stable/6/sys/ (props changed) stable/6/sys/compat/freebsd32/freebsd32_misc.c stable/6/sys/compat/freebsd32/freebsd32_util.h stable/6/sys/compat/ia32/ia32_sysvec.c Modified: stable/6/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 16:14:43 2009 (r187535) +++ stable/6/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 16:28:15 2009 (r187536) @@ -2298,3 +2298,83 @@ freebsd32_xxx(struct thread *td, struct } #endif + +int +syscall32_register(int *offset, struct sysent *new_sysent, + struct sysent *old_sysent) +{ + if (*offset == NO_SYSCALL) { + int i; + + for (i = 1; i < SYS_MAXSYSCALL; ++i) + if (freebsd32_sysent[i].sy_call == + (sy_call_t *)lkmnosys) + break; + if (i == SYS_MAXSYSCALL) + return (ENFILE); + *offset = i; + } else if (*offset < 0 || *offset >= SYS_MAXSYSCALL) + return (EINVAL); + else if (freebsd32_sysent[*offset].sy_call != (sy_call_t *)lkmnosys && + freebsd32_sysent[*offset].sy_call != (sy_call_t *)lkmressys) + return (EEXIST); + + *old_sysent = freebsd32_sysent[*offset]; + freebsd32_sysent[*offset] = *new_sysent; + return 0; +} + +int +syscall32_deregister(int *offset, struct sysent *old_sysent) +{ + + if (*offset) + freebsd32_sysent[*offset] = *old_sysent; + return 0; +} + +int +syscall32_module_handler(struct module *mod, int what, void *arg) +{ + struct syscall_module_data *data = (struct syscall_module_data*)arg; + modspecific_t ms; + int error; + + switch (what) { + case MOD_LOAD: + error = syscall32_register(data->offset, data->new_sysent, + &data->old_sysent); + if (error) { + /* Leave a mark so we know to safely unload below. */ + data->offset = NULL; + return error; + } + ms.intval = *data->offset; + MOD_XLOCK; + module_setspecific(mod, &ms); + MOD_XUNLOCK; + if (data->chainevh) + error = data->chainevh(mod, what, data->chainarg); + return (error); + case MOD_UNLOAD: + /* + * MOD_LOAD failed, so just return without calling the + * chained handler since we didn't pass along the MOD_LOAD + * event. + */ + if (data->offset == NULL) + return (0); + if (data->chainevh) { + error = data->chainevh(mod, what, data->chainarg); + if (error) + return (error); + } + error = syscall32_deregister(data->offset, &data->old_sysent); + return (error); + default: + error = EOPNOTSUPP; + if (data->chainevh) + error = data->chainevh(mod, what, data->chainarg); + return (error); + } +} Modified: stable/6/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_util.h Wed Jan 21 16:14:43 2009 (r187535) +++ stable/6/sys/compat/freebsd32/freebsd32_util.h Wed Jan 21 16:28:15 2009 (r187536) @@ -28,14 +28,16 @@ * $FreeBSD$ */ -#include -#include -#include - +#ifndef _COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ +#define _COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ +#include #include #include -#include + +#include +#include +#include struct freebsd32_ps_strings { u_int32_t ps_argvstr; /* first of 0 or more argument strings */ @@ -50,3 +52,35 @@ struct freebsd32_ps_strings { #define FREEBSD32_PS_STRINGS \ (FREEBSD32_USRSTACK - sizeof(struct freebsd32_ps_strings)) + +extern struct sysent freebsd32_sysent[]; + +#define SYSCALL32_MODULE(name, offset, new_sysent, evh, arg) \ +static struct syscall_module_data name##_syscall32_mod = { \ + evh, arg, offset, new_sysent, { 0, NULL } \ +}; \ + \ +static moduledata_t name##32_mod = { \ + #name, \ + syscall32_module_handler, \ + &name##_syscall32_mod \ +}; \ +DECLARE_MODULE(name##32, name##32_mod, SI_SUB_SYSCALLS, SI_ORDER_MIDDLE) + +#define SYSCALL32_MODULE_HELPER(syscallname) \ +static int syscallname##_syscall32 = FREEBSD32_SYS_##syscallname; \ +static struct sysent syscallname##_sysent32 = { \ + (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + (sy_call_t *)& syscallname \ +}; \ +SYSCALL32_MODULE(syscallname, \ + & syscallname##_syscall32, & syscallname##_sysent32,\ + NULL, NULL); + +int syscall32_register(int *offset, struct sysent *new_sysent, + struct sysent *old_sysent); +int syscall32_deregister(int *offset, struct sysent *old_sysent); +int syscall32_module_handler(struct module *mod, int what, void *arg); + +#endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ Modified: stable/6/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/6/sys/compat/ia32/ia32_sysvec.c Wed Jan 21 16:14:43 2009 (r187535) +++ stable/6/sys/compat/ia32/ia32_sysvec.c Wed Jan 21 16:28:15 2009 (r187536) @@ -95,8 +95,6 @@ CTASSERT(sizeof(struct ia32_sigframe4) = static register_t *ia32_copyout_strings(struct image_params *imgp); static void ia32_fixlimit(struct rlimit *rl, int which); -extern struct sysent freebsd32_sysent[]; - SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); struct sysentvec ia32_freebsd_sysvec = { From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:03:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A37ED1065749; Wed, 21 Jan 2009 17:03:55 +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 84B908FC14; Wed, 21 Jan 2009 17:03:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LH3tOu083890; Wed, 21 Jan 2009 17:03:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LH3t0a083886; Wed, 21 Jan 2009 17:03:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211703.n0LH3t0a083886@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 17:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187537 - in stable/6/sys: . compat/freebsd32 kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:03:56 -0000 Author: jhb Date: Wed Jan 21 17:03:55 2009 New Revision: 187537 URL: http://svn.freebsd.org/changeset/base/187537 Log: MFC: Split most of getdirentries() out into a kern_getdirentries() and add a freebsd32 frontend to fix a data corruption bug with 32-bit binaries. Modified: stable/6/sys/ (props changed) stable/6/sys/compat/freebsd32/freebsd32_misc.c stable/6/sys/compat/freebsd32/syscalls.master stable/6/sys/kern/vfs_syscalls.c stable/6/sys/sys/syscallsubr.h Modified: stable/6/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 16:28:15 2009 (r187536) +++ stable/6/sys/compat/freebsd32/freebsd32_misc.c Wed Jan 21 17:03:55 2009 (r187537) @@ -1702,6 +1702,24 @@ freebsd32_ftruncate(struct thread *td, s return (ftruncate(td, &ap)); } +int +freebsd32_getdirentries(struct thread *td, + struct freebsd32_getdirentries_args *uap) +{ + long base; + int32_t base32; + int error; + + error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base); + if (error) + return (error); + if (uap->basep != NULL) { + base32 = base; + error = copyout(&base32, uap->basep, sizeof(int32_t)); + } + return (error); +} + struct sf_hdtr32 { uint32_t headers; int hdr_cnt; Modified: stable/6/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/6/sys/compat/freebsd32/syscalls.master Wed Jan 21 16:28:15 2009 (r187536) +++ stable/6/sys/compat/freebsd32/syscalls.master Wed Jan 21 17:03:55 2009 (r187537) @@ -355,8 +355,8 @@ 195 AUE_SETRLIMIT MNOPROTO { int setrlimit(u_int which, \ struct rlimit *rlp); } setrlimit \ __setrlimit_args int -196 AUE_GETDIRENTRIES MNOPROTO { int getdirentries(int fd, char *buf, \ - u_int count, long *basep); } +196 AUE_GETDIRENTRIES MSTD { int freebsd32_getdirentries(int fd, \ + char *buf, u_int count, int32_t *basep); } 197 AUE_MMAP MSTD { caddr_t freebsd32_mmap(caddr_t addr, \ size_t len, int prot, int flags, int fd, \ int pad, u_int32_t poslo, \ Modified: stable/6/sys/kern/vfs_syscalls.c ============================================================================== --- stable/6/sys/kern/vfs_syscalls.c Wed Jan 21 16:28:15 2009 (r187536) +++ stable/6/sys/kern/vfs_syscalls.c Wed Jan 21 17:03:55 2009 (r187537) @@ -3688,6 +3688,21 @@ getdirentries(td, uap) long *basep; } */ *uap; { + long base; + int error; + + error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base); + if (error) + return (error); + if (uap->basep != NULL) + error = copyout(&base, uap->basep, sizeof(long)); + return (error); +} + +int +kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, + long *basep) +{ struct vnode *vp; struct file *fp; struct uio auio; @@ -3696,10 +3711,10 @@ getdirentries(td, uap) long loff; int error, eofflag; - AUDIT_ARG(fd, uap->fd); + AUDIT_ARG(fd, fd); if (uap->count > INT_MAX) return (EINVAL); - if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) + if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { fdrop(fp, td); @@ -3713,14 +3728,14 @@ unionread: error = EINVAL; goto fail; } - aiov.iov_base = uap->buf; - aiov.iov_len = uap->count; + aiov.iov_base = buf; + aiov.iov_len = count; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; auio.uio_td = td; - auio.uio_resid = uap->count; + auio.uio_resid = count; /* vn_lock(vp, LK_SHARED | LK_RETRY, td); */ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); AUDIT_ARG(vnode, vp, ARG_VNODE1); @@ -3737,7 +3752,7 @@ unionread: VFS_UNLOCK_GIANT(vfslocked); goto fail; } - if (uap->count == auio.uio_resid && + if (count == auio.uio_resid && (vp->v_vflag & VV_ROOT) && (vp->v_mount->mnt_flag & MNT_UNION)) { struct vnode *tvp = vp; @@ -3752,10 +3767,8 @@ unionread: } VOP_UNLOCK(vp, 0, td); VFS_UNLOCK_GIANT(vfslocked); - if (uap->basep != NULL) { - error = copyout(&loff, uap->basep, sizeof(long)); - } - td->td_retval[0] = uap->count - auio.uio_resid; + *basep = loff; + td->td_retval[0] = count - auio.uio_resid; fail: fdrop(fp, td); return (error); Modified: stable/6/sys/sys/syscallsubr.h ============================================================================== --- stable/6/sys/sys/syscallsubr.h Wed Jan 21 16:28:15 2009 (r187536) +++ stable/6/sys/sys/syscallsubr.h Wed Jan 21 17:03:55 2009 (r187537) @@ -79,6 +79,8 @@ int kern_fstat(struct thread *td, int fd int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); int kern_futimes(struct thread *td, int fd, struct timeval *tptr, enum uio_seg tptrseg); +int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, + long *basep); int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, enum uio_seg bufseg, int flags); int kern_getitimer(struct thread *, u_int, struct itimerval *); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:07:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB3D7106566B; Wed, 21 Jan 2009 17:07:23 +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 B7DFF8FC12; Wed, 21 Jan 2009 17:07:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LH7NJA084038; Wed, 21 Jan 2009 17:07:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LH7N6T084034; Wed, 21 Jan 2009 17:07:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211707.n0LH7N6T084034@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 17:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187538 - stable/6/sys/compat/freebsd32 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:07:25 -0000 Author: jhb Date: Wed Jan 21 17:07:23 2009 New Revision: 187538 URL: http://svn.freebsd.org/changeset/base/187538 Log: Regen. Modified: stable/6/sys/compat/freebsd32/freebsd32_proto.h stable/6/sys/compat/freebsd32/freebsd32_syscall.h stable/6/sys/compat/freebsd32/freebsd32_syscalls.c stable/6/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/6/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_proto.h Wed Jan 21 17:03:55 2009 (r187537) +++ stable/6/sys/compat/freebsd32/freebsd32_proto.h Wed Jan 21 17:07:23 2009 (r187538) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.50.2.16 2008/04/24 10:46:17 dfr Exp + * created from FreeBSD: stable/6/sys/compat/freebsd32/syscalls.master 187537 2009-01-21 17:03:55Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -163,6 +163,12 @@ struct freebsd32_lstat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; }; +struct freebsd32_getdirentries_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; + char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)]; + char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)]; +}; struct freebsd32_mmap_args { char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; @@ -349,6 +355,7 @@ int freebsd32_pwrite(struct thread *, st int freebsd32_stat(struct thread *, struct freebsd32_stat_args *); int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); int freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *); +int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *); int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); Modified: stable/6/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_syscall.h Wed Jan 21 17:03:55 2009 (r187537) +++ stable/6/sys/compat/freebsd32/freebsd32_syscall.h Wed Jan 21 17:07:23 2009 (r187538) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.50.2.16 2008/04/24 10:46:17 dfr Exp + * created from FreeBSD: stable/6/sys/compat/freebsd32/syscalls.master 187537 2009-01-21 17:03:55Z jhb */ #define FREEBSD32_SYS_syscall 0 @@ -177,7 +177,7 @@ #define FREEBSD32_SYS_fpathconf 192 #define FREEBSD32_SYS_getrlimit 194 #define FREEBSD32_SYS_setrlimit 195 -#define FREEBSD32_SYS_getdirentries 196 +#define FREEBSD32_SYS_freebsd32_getdirentries 196 #define FREEBSD32_SYS_freebsd32_mmap 197 #define FREEBSD32_SYS___syscall 198 #define FREEBSD32_SYS_freebsd32_lseek 199 Modified: stable/6/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jan 21 17:03:55 2009 (r187537) +++ stable/6/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jan 21 17:07:23 2009 (r187538) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.50.2.16 2008/04/24 10:46:17 dfr Exp + * created from FreeBSD: stable/6/sys/compat/freebsd32/syscalls.master 187537 2009-01-21 17:03:55Z jhb */ const char *freebsd32_syscallnames[] = { @@ -203,7 +203,7 @@ const char *freebsd32_syscallnames[] = { "#193", /* 193 = nosys */ "getrlimit", /* 194 = getrlimit */ "setrlimit", /* 195 = setrlimit */ - "getdirentries", /* 196 = getdirentries */ + "freebsd32_getdirentries", /* 196 = freebsd32_getdirentries */ "freebsd32_mmap", /* 197 = freebsd32_mmap */ "__syscall", /* 198 = __syscall */ "freebsd32_lseek", /* 199 = freebsd32_lseek */ Modified: stable/6/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/6/sys/compat/freebsd32/freebsd32_sysent.c Wed Jan 21 17:03:55 2009 (r187537) +++ stable/6/sys/compat/freebsd32/freebsd32_sysent.c Wed Jan 21 17:07:23 2009 (r187538) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.50.2.16 2008/04/24 10:46:17 dfr Exp + * created from FreeBSD: stable/6/sys/compat/freebsd32/syscalls.master 187537 2009-01-21 17:03:55Z jhb */ #include "opt_compat.h" @@ -229,7 +229,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL }, /* 193 = nosys */ { SYF_MPSAFE | AS(__getrlimit_args), (sy_call_t *)getrlimit, AUE_GETRLIMIT }, /* 194 = getrlimit */ { SYF_MPSAFE | AS(__setrlimit_args), (sy_call_t *)setrlimit, AUE_SETRLIMIT }, /* 195 = setrlimit */ - { SYF_MPSAFE | AS(getdirentries_args), (sy_call_t *)getdirentries, AUE_GETDIRENTRIES }, /* 196 = getdirentries */ + { SYF_MPSAFE | AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES }, /* 196 = freebsd32_getdirentries */ { SYF_MPSAFE | AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP }, /* 197 = freebsd32_mmap */ { SYF_MPSAFE | 0, (sy_call_t *)nosys, AUE_NULL }, /* 198 = __syscall */ { SYF_MPSAFE | AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK }, /* 199 = freebsd32_lseek */ From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:07:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B78791065673; Wed, 21 Jan 2009 17:07:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A422C8FC21; Wed, 21 Jan 2009 17:07:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LH7k53084094; Wed, 21 Jan 2009 17:07:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LH7kJ1084093; Wed, 21 Jan 2009 17:07:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901211707.n0LH7kJ1084093@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 17:07:46 +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: r187539 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:07:47 -0000 Author: jkim Date: Wed Jan 21 17:07:46 2009 New Revision: 187539 URL: http://svn.freebsd.org/changeset/base/187539 Log: MFC: Add support for AMD64 Family 10h processors. PR: kern/128331 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/pci/agp_amd64.c Modified: stable/7/sys/pci/agp_amd64.c ============================================================================== --- stable/7/sys/pci/agp_amd64.c Wed Jan 21 17:07:23 2009 (r187538) +++ stable/7/sys/pci/agp_amd64.c Wed Jan 21 17:07:46 2009 (r187539) @@ -167,14 +167,16 @@ agp_amd64_attach(device_t dev) { struct agp_amd64_softc *sc = device_get_softc(dev); struct agp_gatt *gatt; + uint32_t devid; int i, n, error; - for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) - if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) { + for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) { + devid = pci_cfgregread(0, i, 3, 0, 4); + if (devid == 0x11031022 || devid == 0x12031022) { sc->mctrl[n] = i; n++; } - + } if (n == 0) return (ENXIO); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:13:31 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834CC1065672; Wed, 21 Jan 2009 17:13:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 707678FC1C; Wed, 21 Jan 2009 17:13:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LHDVcE084280; Wed, 21 Jan 2009 17:13:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LHDVQg084279; Wed, 21 Jan 2009 17:13:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211713.n0LHDVQg084279@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 17:13:31 +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: r187540 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/mfi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:13:32 -0000 Author: jhb Date: Wed Jan 21 17:13:31 2009 New Revision: 187540 URL: http://svn.freebsd.org/changeset/base/187540 Log: MFC: Fix the maximum transfer size for mfi(4) disk devices to not exceed the maximum number of scatter/gather elements supported in the bus dma tag. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/mfi/mfi_disk.c Modified: stable/7/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/7/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:07:46 2009 (r187539) +++ stable/7/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:13:31 2009 (r187540) @@ -136,7 +136,8 @@ mfi_disk_attach(device_t dev) sc->ld_disk = disk_alloc(); sc->ld_disk->d_drv1 = sc; - sc->ld_disk->d_maxsize = sc->ld_controller->mfi_max_io * secsize; + sc->ld_disk->d_maxsize = min(sc->ld_controller->mfi_max_io * secsize, + (sc->ld_controller->mfi_max_sge - 1) * PAGE_SIZE); sc->ld_disk->d_name = "mfid"; sc->ld_disk->d_open = mfi_disk_open; sc->ld_disk->d_close = mfi_disk_close; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:16:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE105106566B; Wed, 21 Jan 2009 17:16:03 +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 9BAE98FC18; Wed, 21 Jan 2009 17:16:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LHG3kd084391; Wed, 21 Jan 2009 17:16:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LHG3RG084390; Wed, 21 Jan 2009 17:16:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211716.n0LHG3RG084390@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 17:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187541 - in stable/6/sys: . dev/mfi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:16:04 -0000 Author: jhb Date: Wed Jan 21 17:16:03 2009 New Revision: 187541 URL: http://svn.freebsd.org/changeset/base/187541 Log: MFC: Fix the maximum transfer size for mfi(4) disk devices to not exceed the maximum number of scatter/gather elements supported in the bus dma tag. Modified: stable/6/sys/ (props changed) stable/6/sys/dev/mfi/mfi_disk.c Modified: stable/6/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/6/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:13:31 2009 (r187540) +++ stable/6/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:16:03 2009 (r187541) @@ -136,7 +136,8 @@ mfi_disk_attach(device_t dev) sc->ld_disk = disk_alloc(); sc->ld_disk->d_drv1 = sc; - sc->ld_disk->d_maxsize = sc->ld_controller->mfi_max_io * secsize; + sc->ld_disk->d_maxsize = min(sc->ld_controller->mfi_max_io * secsize, + (sc->ld_controller->mfi_max_sge - 1) * PAGE_SIZE); sc->ld_disk->d_name = "mfid"; sc->ld_disk->d_open = mfi_disk_open; sc->ld_disk->d_close = mfi_disk_close; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:23:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B51441065689; Wed, 21 Jan 2009 17:23:06 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A242F8FC12; Wed, 21 Jan 2009 17:23:06 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LHN6E4084593; Wed, 21 Jan 2009 17:23:06 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LHN6PS084592; Wed, 21 Jan 2009 17:23:06 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901211723.n0LHN6PS084592@svn.freebsd.org> From: Nick Hibma Date: Wed, 21 Jan 2009 17:23:06 +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: r187542 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:23:07 -0000 Author: n_hibma Date: Wed Jan 21 17:23:06 2009 New Revision: 187542 URL: http://svn.freebsd.org/changeset/base/187542 Log: Couple of pointy hats to me, please. Not only did I make an unnecessary commit, I actually managed to screw up the revert as well. Submitted by: quite a few people... Modified: stable/7/sys/dev/ata/ata-all.c Modified: stable/7/sys/dev/ata/ata-all.c ============================================================================== --- stable/7/sys/dev/ata/ata-all.c Wed Jan 21 17:16:03 2009 (r187541) +++ stable/7/sys/dev/ata/ata-all.c Wed Jan 21 17:23:06 2009 (r187542) @@ -127,7 +127,7 @@ ata_attach(device_t dev) /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) - pause("atatch", 1); + pause("ataatch", 1); ATA_RESET(dev); ATA_LOCKING(dev, ATA_LF_UNLOCK); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 17:32:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A90FB1065674; Wed, 21 Jan 2009 17:32:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955688FC1E; Wed, 21 Jan 2009 17:32:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LHWQHi084921; Wed, 21 Jan 2009 17:32:26 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LHWQoE084920; Wed, 21 Jan 2009 17:32:26 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901211732.n0LHWQoE084920@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 17:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187544 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/fdc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:32:27 -0000 Author: jkim Date: Wed Jan 21 17:32:26 2009 New Revision: 187544 URL: http://svn.freebsd.org/changeset/base/187544 Log: MFC: r184976 - Revive fdc(4) per-device flag 0x10, which was removed in r1.284[1]. - If the flag is set and auto-select fails, assume disk is not present. - Set disk empty flag only when the floppy controller reset is needed. It fixes regression introduced in r1.311, which prevented it from ignoring errors. Now fdformat(1) and dd(1) with conv=noerror option can continue when read/write errors occur as they should. - Do not retry disk probing as it is extremely slow and pointless. - Move the disk probing code into a separate function. - Do not reset disk empty flag if write-protect check fails somehow. PR: kern/116538[1] Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/fdc/fdc.c Modified: stable/7/sys/dev/fdc/fdc.c ============================================================================== --- stable/7/sys/dev/fdc/fdc.c Wed Jan 21 17:28:24 2009 (r187543) +++ stable/7/sys/dev/fdc/fdc.c Wed Jan 21 17:32:26 2009 (r187544) @@ -97,6 +97,8 @@ __FBSDID("$FreeBSD$"); * fd_drivetype; on i386 machines, if * given as 0, use RTC type for fd0 * and fd1 */ +#define FD_NO_CHLINE 0x10 /* drive does not support changeline + * aka. unit attention */ #define FD_NO_PROBE 0x20 /* don't probe drive (seek test), just * assume it is there */ @@ -263,6 +265,7 @@ struct fd_data { static driver_intr_t fdc_intr; static driver_filter_t fdc_intr_fast; static void fdc_reset(struct fdc_data *); +static int fd_probe_disk(struct fd_data *, int *); SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver"); @@ -768,9 +771,11 @@ fdc_worker(struct fdc_data *fdc) (fdc->retry >= retries || (fd->options & FDOPT_NORETRY))) { if ((debugflags & 4)) printf("Too many retries (EIO)\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); + if (fdc->flags & FDC_NEEDS_RESET) { + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + } return (fdc_biodone(fdc, EIO)); } @@ -836,65 +841,12 @@ fdc_worker(struct fdc_data *fdc) fdctl_wr(fdc, fd->ft->trans); if (bp->bio_cmd & BIO_PROBE) { - - if (!(fdin_rd(fdc) & FDI_DCHG) && !(fd->flags & FD_EMPTY)) + if ((!(device_get_flags(fd->dev) & FD_NO_CHLINE) && + !(fdin_rd(fdc) & FDI_DCHG) && + !(fd->flags & FD_EMPTY)) || + fd_probe_disk(fd, &need_recal) == 0) return (fdc_biodone(fdc, 0)); - - /* - * Try to find out if we have a disk in the drive - * - * First recal, then seek to cyl#1, this clears the - * old condition on the disk change line so we can - * examine it for current status - */ - if (debugflags & 0x40) - printf("New disk in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_NEWDISK; - mtx_unlock(&fdc->fdc_mtx); - retry_line = __LINE__; - if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) - return (1); - tsleep(fdc, PRIBIO, "fdrecal", hz); - retry_line = __LINE__; - if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) - return (1); /* XXX */ - retry_line = __LINE__; - if ((st0 & 0xc0) || cyl != 0) - return (1); - - /* Seek to track 1 */ - retry_line = __LINE__; - if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) - return (1); - tsleep(fdc, PRIBIO, "fdseek", hz); - retry_line = __LINE__; - if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) - return (1); /* XXX */ - need_recal |= (1 << fd->fdsu); - if (fdin_rd(fdc) & FDI_DCHG) { - if (debugflags & 0x40) - printf("Empty in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); - } else { - if (debugflags & 0x40) - printf("Got disk in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags &= ~FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); - retry_line = __LINE__; - if(fdc_sense_drive(fdc, &st3) != 0) - return (1); - mtx_lock(&fdc->fdc_mtx); - if(st3 & NE7_ST3_WP) - fd->flags |= FD_WP; - else - fd->flags &= ~FD_WP; - mtx_unlock(&fdc->fdc_mtx); - } - return (fdc_biodone(fdc, 0)); + return (1); } /* @@ -1238,6 +1190,71 @@ fd_enqueue(struct fd_data *fd, struct bi mtx_unlock(&fdc->fdc_mtx); } +/* + * Try to find out if we have a disk in the drive. + */ +static int +fd_probe_disk(struct fd_data *fd, int *recal) +{ + struct fdc_data *fdc; + int st0, st3, cyl; + int oopts, ret; + + fdc = fd->fdc; + oopts = fd->options; + fd->options |= FDOPT_NOERRLOG | FDOPT_NORETRY; + ret = 1; + + /* + * First recal, then seek to cyl#1, this clears the old condition on + * the disk change line so we can examine it for current status. + */ + if (debugflags & 0x40) + printf("New disk in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_NEWDISK; + mtx_unlock(&fdc->fdc_mtx); + if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) + goto done; + tsleep(fdc, PRIBIO, "fdrecal", hz); + if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) + goto done; /* XXX */ + if ((st0 & 0xc0) || cyl != 0) + goto done; + + /* Seek to track 1 */ + if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) + goto done; + tsleep(fdc, PRIBIO, "fdseek", hz); + if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) + goto done; /* XXX */ + *recal |= (1 << fd->fdsu); + if (fdin_rd(fdc) & FDI_DCHG) { + if (debugflags & 0x40) + printf("Empty in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + } else { + if (fdc_sense_drive(fdc, &st3) != 0) + goto done; + if (debugflags & 0x40) + printf("Got disk in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags &= ~FD_EMPTY; + if (st3 & NE7_ST3_WP) + fd->flags |= FD_WP; + else + fd->flags &= ~FD_WP; + mtx_unlock(&fdc->fdc_mtx); + } + ret = 0; + +done: + fd->options = oopts; + return (ret); +} + static int fdmisccmd(struct fd_data *fd, u_int cmd, void *data) { @@ -1350,7 +1367,7 @@ fdautoselect(struct fd_data *fd) if (debugflags & 0x40) device_printf(fd->dev, "autoselection failed\n"); fdsettype(fd, fd_native_types[fd->type]); - return (0); + return (-1); } else { if (debugflags & 0x40) { device_printf(fd->dev, @@ -1411,7 +1428,13 @@ fd_access(struct g_provider *pp, int r, if (fd->flags & FD_EMPTY) return (ENXIO); if (fd->flags & FD_NEWDISK) { - fdautoselect(fd); + if (fdautoselect(fd) != 0 && + (device_get_flags(fd->dev) & FD_NO_CHLINE)) { + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + return (ENXIO); + } mtx_lock(&fdc->fdc_mtx); fd->flags &= ~FD_NEWDISK; mtx_unlock(&fdc->fdc_mtx); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:26:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0AC106564A; Wed, 21 Jan 2009 18:26:10 +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 882B38FC1A; Wed, 21 Jan 2009 18:26:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIQAla086269; Wed, 21 Jan 2009 18:26:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIQAit086268; Wed, 21 Jan 2009 18:26:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211826.n0LIQAit086268@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187552 - in stable/7/sys: . compat/linprocfs contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:26:11 -0000 Author: jhb Date: Wed Jan 21 18:26:10 2009 New Revision: 187552 URL: http://svn.freebsd.org/changeset/base/187552 Log: MFC: Don't leak a reference on the /compat/linux vnode everytime the linprocfs 'mtab' file is read. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linprocfs/linprocfs.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/7/sys/compat/linprocfs/linprocfs.c Wed Jan 21 17:49:23 2009 (r187551) +++ stable/7/sys/compat/linprocfs/linprocfs.c Wed Jan 21 18:26:10 2009 (r187552) @@ -315,11 +315,13 @@ linprocfs_domtab(PFS_FILL_ARGS) NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; error = namei(&nd); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); - if (error != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0) - lep = linux_emul_path; - else - lep = dlep; + lep = linux_emul_path; + if (error == 0) { + if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0) + lep = dlep; + vrele(nd.ni_vp); + VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); + } lep_len = strlen(lep); mtx_lock(&mountlist_mtx); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:32:43 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9321D106564A; Wed, 21 Jan 2009 18:32:43 +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 804DB8FC29; Wed, 21 Jan 2009 18:32:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIWhCa086516; Wed, 21 Jan 2009 18:32:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIWhig086513; Wed, 21 Jan 2009 18:32:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211832.n0LIWhig086513@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:32: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: r187553 - in stable/7/sys: . contrib/pf dev/cxgb kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:32:44 -0000 Author: jhb Date: Wed Jan 21 18:32:43 2009 New Revision: 187553 URL: http://svn.freebsd.org/changeset/base/187553 Log: MFC: Invoke MOD_QUIESCE on all modules in a linker file (kld) before unloading any modules. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_linker.c stable/7/sys/kern/kern_module.c stable/7/sys/sys/module.h Modified: stable/7/sys/kern/kern_linker.c ============================================================================== --- stable/7/sys/kern/kern_linker.c Wed Jan 21 18:26:10 2009 (r187552) +++ stable/7/sys/kern/kern_linker.c Wed Jan 21 18:32:43 2009 (r187553) @@ -587,7 +587,30 @@ linker_file_unload(linker_file_t file, i " informing modules\n")); /* - * Inform any modules associated with this file. + * Quiesce all the modules to give them a chance to veto the unload. + */ + MOD_SLOCK; + for (mod = TAILQ_FIRST(&file->modules); mod; + mod = module_getfnext(mod)) { + + error = module_quiesce(mod); + if (error != 0 && flags != LINKER_UNLOAD_FORCE) { + KLD_DPF(FILE, ("linker_file_unload: module %s" + " vetoed unload\n", module_getname(mod))); + /* + * XXX: Do we need to tell all the quiesced modules + * that they can resume work now via a new module + * event? + */ + MOD_SUNLOCK; + return (error); + } + } + MOD_SUNLOCK; + + /* + * Inform any modules associated with this file that they are + * being be unloaded. */ MOD_XLOCK; for (mod = TAILQ_FIRST(&file->modules); mod; mod = next) { @@ -597,9 +620,9 @@ linker_file_unload(linker_file_t file, i /* * Give the module a chance to veto the unload. */ - if ((error = module_unload(mod, flags)) != 0) { - KLD_DPF(FILE, ("linker_file_unload: module %p" - " vetoes unload\n", mod)); + if ((error = module_unload(mod)) != 0) { + KLD_DPF(FILE, ("linker_file_unload: module %s" + " failed unload\n", mod)); return (error); } MOD_XLOCK; Modified: stable/7/sys/kern/kern_module.c ============================================================================== --- stable/7/sys/kern/kern_module.c Wed Jan 21 18:26:10 2009 (r187552) +++ stable/7/sys/kern/kern_module.c Wed Jan 21 18:32:43 2009 (r187553) @@ -196,9 +196,7 @@ module_release(module_t mod) TAILQ_REMOVE(&modules, mod, link); if (mod->file) TAILQ_REMOVE(&mod->file->modules, mod, flink); - MOD_XUNLOCK; free(mod, M_MODULE); - MOD_XLOCK; } } @@ -232,16 +230,25 @@ module_lookupbyid(int modid) } int -module_unload(module_t mod, int flags) +module_quiesce(module_t mod) { int error; mtx_lock(&Giant); error = MOD_EVENT(mod, MOD_QUIESCE); + mtx_unlock(&Giant); if (error == EOPNOTSUPP || error == EINVAL) error = 0; - if (error == 0 || flags == LINKER_UNLOAD_FORCE) - error = MOD_EVENT(mod, MOD_UNLOAD); + return (error); +} + +int +module_unload(module_t mod) +{ + int error; + + mtx_lock(&Giant); + error = MOD_EVENT(mod, MOD_UNLOAD); mtx_unlock(&Giant); return (error); } @@ -262,6 +269,14 @@ module_getfnext(module_t mod) return (TAILQ_NEXT(mod, flink)); } +const char * +module_getname(module_t mod) +{ + + MOD_LOCK_ASSERT; + return (mod->name); +} + void module_setspecific(module_t mod, modspecific_t *datap) { Modified: stable/7/sys/sys/module.h ============================================================================== --- stable/7/sys/sys/module.h Wed Jan 21 18:26:10 2009 (r187552) +++ stable/7/sys/sys/module.h Wed Jan 21 18:32:43 2009 (r187553) @@ -141,11 +141,13 @@ void module_register_init(const void *); int module_register(const struct moduledata *, struct linker_file *); module_t module_lookupbyname(const char *); module_t module_lookupbyid(int); +int module_quiesce(module_t); void module_reference(module_t); void module_release(module_t); -int module_unload(module_t, int flags); +int module_unload(module_t); int module_getid(module_t); module_t module_getfnext(module_t); +const char * module_getname(module_t); void module_setspecific(module_t, modspecific_t *); struct linker_file *module_file(module_t); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:35:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB615106570F; Wed, 21 Jan 2009 18:35:48 +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 A2CB88FC0C; Wed, 21 Jan 2009 18:35:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIZmLJ086638; Wed, 21 Jan 2009 18:35:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIZmCf086637; Wed, 21 Jan 2009 18:35:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211835.n0LIZmCf086637@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187554 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:35:55 -0000 Author: jhb Date: Wed Jan 21 18:35:48 2009 New Revision: 187554 URL: http://svn.freebsd.org/changeset/base/187554 Log: MFC: Reorder modules during initialization to ensure that MOD_QUIESCE and MOD_UNLOAD events are posted to kernel modules in the reverse order of MOD_LOAD events. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_module.c Modified: stable/7/sys/kern/kern_module.c ============================================================================== --- stable/7/sys/kern/kern_module.c Wed Jan 21 18:32:43 2009 (r187553) +++ stable/7/sys/kern/kern_module.c Wed Jan 21 18:35:48 2009 (r187554) @@ -130,6 +130,21 @@ module_register_init(const void *arg) printf("module_register_init: MOD_LOAD (%s, %p, %p) error" " %d\n", data->name, (void *)data->evhand, data->priv, error); + } else { + MOD_XLOCK; + if (mod->file) { + /* + * Once a module is succesfully loaded, move + * it to the head of the module list for this + * linker file. This resorts the list so that + * when the kernel linker iterates over the + * modules to unload them, it will unload them + * in the reverse order they were loaded. + */ + TAILQ_REMOVE(&mod->file->modules, mod, flink); + TAILQ_INSERT_HEAD(&mod->file->modules, mod, flink); + } + MOD_XUNLOCK; } mtx_unlock(&Giant); } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:38:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E513106564A; Wed, 21 Jan 2009 18:38:13 +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 2BC7E8FC19; Wed, 21 Jan 2009 18:38:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIcDx6086719; Wed, 21 Jan 2009 18:38:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIcDEs086718; Wed, 21 Jan 2009 18:38:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211838.n0LIcDEs086718@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:38:13 +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: r187555 - in stable/7/sys: . contrib/pf dev/cxgb sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:38:14 -0000 Author: jhb Date: Wed Jan 21 18:38:12 2009 New Revision: 187555 URL: http://svn.freebsd.org/changeset/base/187555 Log: MFC: Use ints and a pointer to represent the spare fields used by the old sigevent structure rather than using a char array with explicit knowledge about padding. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/aio.h Modified: stable/7/sys/sys/aio.h ============================================================================== --- stable/7/sys/sys/aio.h Wed Jan 21 18:35:48 2009 (r187554) +++ stable/7/sys/sys/aio.h Wed Jan 21 18:38:12 2009 (r187555) @@ -69,7 +69,8 @@ typedef struct aiocb { off_t aio_offset; /* File offset for I/O */ volatile void *aio_buf; /* I/O buffer in process space */ size_t aio_nbytes; /* Number of bytes for I/O */ - char __spare__[sizeof(int) * 2 + sizeof(void *)]; /* osigevent. */ + int __spare__[2]; + void *__spare2__; int aio_lio_opcode; /* LIO opcode */ int aio_reqprio; /* Request priority -- ignored */ struct __aiocb_private _aiocb_private; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:52:34 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38FB01065675; Wed, 21 Jan 2009 18:52: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 2464A8FC2A; Wed, 21 Jan 2009 18:52:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIqY3B087134; Wed, 21 Jan 2009 18:52:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIqYMS087131; Wed, 21 Jan 2009 18:52:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211852.n0LIqYMS087131@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:52:34 +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: r187559 - in stable/7/sys: . compat/freebsd32 contrib/pf dev/cxgb kern modules/aio X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:52:35 -0000 Author: jhb Date: Wed Jan 21 18:52:33 2009 New Revision: 187559 URL: http://svn.freebsd.org/changeset/base/187559 Log: MFC: Add 32-bit compat system calls for VFS_AIO. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/syscalls.master stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_aio.c stable/7/sys/modules/aio/Makefile Modified: stable/7/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/7/sys/compat/freebsd32/syscalls.master Wed Jan 21 18:47:52 2009 (r187558) +++ stable/7/sys/compat/freebsd32/syscalls.master Wed Jan 21 18:52:33 2009 (r187559) @@ -456,9 +456,13 @@ u_int nfds, int timeout); } 253 AUE_ISSETUGID NOPROTO { int issetugid(void); } 254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); } -255 AUE_NULL UNIMPL nosys -256 AUE_NULL UNIMPL nosys -257 AUE_NULL UNIMPL nosys +255 AUE_NULL NOSTD { int freebsd32_aio_read( \ + struct aiocb32 *aiocbp); } +256 AUE_NULL NOSTD { int freebsd32_aio_write( \ + struct aiocb32 *aiocbp); } +257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \ + struct aiocb32 * const *acb_list, \ + int nent, struct sigevent *sig); } 258 AUE_NULL UNIMPL nosys 259 AUE_NULL UNIMPL nosys 260 AUE_NULL UNIMPL nosys @@ -537,13 +541,22 @@ 312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \ gid_t sgid); } 313 AUE_NULL OBSOL signanosleep -314 AUE_NULL UNIMPL aio_return -315 AUE_NULL UNIMPL aio_suspend -316 AUE_NULL UNIMPL aio_cancel -317 AUE_NULL UNIMPL aio_error -318 AUE_NULL UNIMPL aio_read -319 AUE_NULL UNIMPL aio_write -320 AUE_NULL UNIMPL lio_listio +314 AUE_NULL NOSTD { int freebsd32_aio_return( \ + struct aiocb32 *aiocbp); } +315 AUE_NULL NOSTD { int freebsd32_aio_suspend( \ + struct aiocb32 * const * aiocbp, int nent, \ + const struct timespec32 *timeout); } +316 AUE_NULL NOSTD { int freebsd32_aio_cancel(int fd, \ + struct aiocb32 *aiocbp); } +317 AUE_NULL NOSTD { int freebsd32_aio_error( \ + struct aiocb32 *aiocbp); } +318 AUE_NULL NOSTD { int freebsd32_oaio_read( \ + struct oaiocb32 *aiocbp); } +319 AUE_NULL NOSTD { int freebsd32_oaio_write( \ + struct oaiocb32 *aiocbp); } +320 AUE_NULL NOSTD { int freebsd32_olio_listio(int mode, \ + struct oaiocb32 * const *acb_list, \ + int nent, struct osigevent32 *sig); } 321 AUE_NULL NOPROTO { int yield(void); } 322 AUE_NULL OBSOL thr_sleep 323 AUE_NULL OBSOL thr_wakeup @@ -620,7 +633,9 @@ 358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \ const char *path, int attrnamespace, \ const char *attrname); } -359 AUE_NULL UNIMPL aio_waitcomplete +359 AUE_NULL NOSTD { int freebsd32_aio_waitcomplete( \ + struct aiocb32 **aiocbp, \ + struct timespec32 *timeout); } 360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ uid_t *suid); } 361 AUE_GETRESGID NOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \ @@ -770,7 +785,8 @@ 462 AUE_NULL UNIMPL kmq_unlink 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } -465 AUE_NULL UNIMPL aio_fsync +465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \ + struct aiocb32 *aiocbp); } 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ lwpid_t lwpid, struct rtprio *rtp); } 467 AUE_NULL UNIMPL nosys Modified: stable/7/sys/kern/vfs_aio.c ============================================================================== --- stable/7/sys/kern/vfs_aio.c Wed Jan 21 18:47:52 2009 (r187558) +++ stable/7/sys/kern/vfs_aio.c Wed Jan 21 18:52:33 2009 (r187559) @@ -21,6 +21,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -121,6 +123,8 @@ static uint64_t jobseqno; FEATURE(aio, "Asynchronous I/O"); +static MALLOC_DEFINE(M_LIO, "lio", "listio aio control block list"); + static SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management"); static int max_aio_procs = MAX_AIO_PROCS; @@ -308,6 +312,20 @@ struct kaioinfo { #define KAIO_RUNDOWN 0x1 /* process is being run down */ #define KAIO_WAKEUP 0x2 /* wakeup process when there is a significant event */ +/* + * Operations used to interact with userland aio control blocks. + * Different ABIs provide their own operations. + */ +struct aiocb_ops { + int (*copyin)(struct aiocb *ujob, struct aiocb *kjob); + long (*fetch_status)(struct aiocb *ujob); + long (*fetch_error)(struct aiocb *ujob); + int (*store_status)(struct aiocb *ujob, long status); + int (*store_error)(struct aiocb *ujob, long error); + int (*store_kernelinfo)(struct aiocb *ujob, long jobref); + int (*store_aiocb)(struct aiocb **ujobp, struct aiocb *ujob); +}; + static TAILQ_HEAD(,aiothreadlist) aio_freeproc; /* (c) Idle daemons */ static struct sema aio_newproc_sem; static struct mtx aio_job_mtx; @@ -321,7 +339,7 @@ static int aio_free_entry(struct aiocbli static void aio_process(struct aiocblist *aiocbe); static int aio_newproc(int *); int aio_aqueue(struct thread *td, struct aiocb *job, - struct aioliojob *lio, int type, int osigev); + struct aioliojob *lio, int type, struct aiocb_ops *ops); static void aio_physwakeup(struct buf *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); @@ -333,7 +351,6 @@ static int aio_unload(void); static void aio_bio_done_notify(struct proc *userp, struct aiocblist *aiocbe, int type); #define DONE_BUF 1 #define DONE_QUEUE 2 -static int do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev); static int aio_kick(struct proc *userp); static void aio_kick_nowait(struct proc *userp); static void aio_kick_helper(void *context, int pending); @@ -1322,13 +1339,122 @@ aio_swake_cb(struct socket *so, struct s SOCKBUF_UNLOCK(sb); } +static int +convert_old_sigevent(struct osigevent *osig, struct sigevent *nsig) +{ + + /* + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are + * supported by AIO with the old sigevent structure. + */ + nsig->sigev_notify = osig->sigev_notify; + switch (nsig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_SIGNAL: + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; + break; + case SIGEV_KEVENT: + nsig->sigev_notify_kqueue = + osig->__sigev_u.__sigev_notify_kqueue; + nsig->sigev_value.sival_ptr = osig->sigev_value.sival_ptr; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) +{ + struct oaiocb *ojob; + int error; + + bzero(kjob, sizeof(struct aiocb)); + error = copyin(ujob, kjob, sizeof(struct oaiocb)); + if (error) + return (error); + ojob = (struct oaiocb *)kjob; + return (convert_old_sigevent(&ojob->aio_sigevent, &kjob->aio_sigevent)); +} + +static int +aiocb_copyin(struct aiocb *ujob, struct aiocb *kjob) +{ + + return (copyin(ujob, kjob, sizeof(struct aiocb))); +} + +static long +aiocb_fetch_status(struct aiocb *ujob) +{ + + return (fuword(&ujob->_aiocb_private.status)); +} + +static long +aiocb_fetch_error(struct aiocb *ujob) +{ + + return (fuword(&ujob->_aiocb_private.error)); +} + +static int +aiocb_store_status(struct aiocb *ujob, long status) +{ + + return (suword(&ujob->_aiocb_private.status, status)); +} + +static int +aiocb_store_error(struct aiocb *ujob, long error) +{ + + return (suword(&ujob->_aiocb_private.error, error)); +} + +static int +aiocb_store_kernelinfo(struct aiocb *ujob, long jobref) +{ + + return (suword(&ujob->_aiocb_private.kernelinfo, jobref)); +} + +static int +aiocb_store_aiocb(struct aiocb **ujobp, struct aiocb *ujob) +{ + + return (suword(ujobp, (long)ujob)); +} + +static struct aiocb_ops aiocb_ops = { + .copyin = aiocb_copyin, + .fetch_status = aiocb_fetch_status, + .fetch_error = aiocb_fetch_error, + .store_status = aiocb_store_status, + .store_error = aiocb_store_error, + .store_kernelinfo = aiocb_store_kernelinfo, + .store_aiocb = aiocb_store_aiocb, +}; + +static struct aiocb_ops aiocb_ops_osigevent = { + .copyin = aiocb_copyin_old_sigevent, + .fetch_status = aiocb_fetch_status, + .fetch_error = aiocb_fetch_error, + .store_status = aiocb_store_status, + .store_error = aiocb_store_error, + .store_kernelinfo = aiocb_store_kernelinfo, + .store_aiocb = aiocb_store_aiocb, +}; + /* * Queue a new AIO request. Choosing either the threaded or direct physio VCHR * technique is done in this code. */ int aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj, - int type, int oldsigev) + int type, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct file *fp; @@ -1347,13 +1473,13 @@ aio_aqueue(struct thread *td, struct aio ki = p->p_aioinfo; - suword(&job->_aiocb_private.status, -1); - suword(&job->_aiocb_private.error, 0); - suword(&job->_aiocb_private.kernelinfo, -1); + ops->store_status(job, -1); + ops->store_error(job, 0); + ops->store_kernelinfo(job, -1); if (num_queue_count >= max_queue_count || ki->kaio_count >= ki->kaio_qallowed_count) { - suword(&job->_aiocb_private.error, EAGAIN); + ops->store_error(job, EAGAIN); return (EAGAIN); } @@ -1362,16 +1488,9 @@ aio_aqueue(struct thread *td, struct aio aiocbe->outputcharge = 0; knlist_init(&aiocbe->klist, AIO_MTX(ki), NULL, NULL, NULL); - if (oldsigev) { - bzero(&aiocbe->uaiocb, sizeof(struct aiocb)); - error = copyin(job, &aiocbe->uaiocb, sizeof(struct oaiocb)); - bcopy(&aiocbe->uaiocb.__spare__, &aiocbe->uaiocb.aio_sigevent, - sizeof(struct osigevent)); - } else { - error = copyin(job, &aiocbe->uaiocb, sizeof(struct aiocb)); - } + error = ops->copyin(job, &aiocbe->uaiocb); if (error) { - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); uma_zfree(aiocb_zone, aiocbe); return (error); } @@ -1380,11 +1499,11 @@ aio_aqueue(struct thread *td, struct aio aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_SIGNAL && aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_THREAD_ID && aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_NONE) { - suword(&job->_aiocb_private.error, EINVAL); + ops->store_error(job, EINVAL); uma_zfree(aiocb_zone, aiocbe); return (EINVAL); } - + if ((aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) && !_SIG_VALID(aiocbe->uaiocb.aio_sigevent.sigev_signo)) { @@ -1416,7 +1535,7 @@ aio_aqueue(struct thread *td, struct aio } if (error) { uma_zfree(aiocb_zone, aiocbe); - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); return (error); } @@ -1436,7 +1555,7 @@ aio_aqueue(struct thread *td, struct aio jid = jobrefid++; aiocbe->seqno = jobseqno++; mtx_unlock(&aio_job_mtx); - error = suword(&job->_aiocb_private.kernelinfo, jid); + error = ops->store_kernelinfo(job, jid); if (error) { error = EINVAL; goto aqueue_fail; @@ -1467,12 +1586,12 @@ aqueue_fail: if (error) { fdrop(fp, td); uma_zfree(aiocb_zone, aiocbe); - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); goto done; } no_kqueue: - suword(&job->_aiocb_private.error, EINPROGRESS); + ops->store_error(job, EINPROGRESS); aiocbe->uaiocb._aiocb_private.error = EINPROGRESS; aiocbe->userproc = p; aiocbe->cred = crhold(td->td_ucred); @@ -1528,7 +1647,7 @@ no_kqueue: #if 0 if (error > 0) { aiocbe->uaiocb._aiocb_private.error = error; - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); goto done; } #endif @@ -1643,19 +1762,17 @@ aio_kick_helper(void *context, int pendi * Support the aio_return system call, as a side-effect, kernel resources are * released. */ -int -aio_return(struct thread *td, struct aio_return_args *uap) +static int +kern_aio_return(struct thread *td, struct aiocb *uaiocb, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct aiocblist *cb; - struct aiocb *uaiocb; struct kaioinfo *ki; int status, error; ki = p->p_aioinfo; if (ki == NULL) return (EINVAL); - uaiocb = uap->aiocbp; AIO_LOCK(ki); TAILQ_FOREACH(cb, &ki->kaio_done, plist) { if (cb->uuaiocb == uaiocb) @@ -1675,8 +1792,8 @@ aio_return(struct thread *td, struct aio } aio_free_entry(cb); AIO_UNLOCK(ki); - suword(&uaiocb->_aiocb_private.error, error); - suword(&uaiocb->_aiocb_private.status, status); + ops->store_error(uaiocb, error); + ops->store_status(uaiocb, status); } else { error = EINVAL; AIO_UNLOCK(ki); @@ -1684,37 +1801,32 @@ aio_return(struct thread *td, struct aio return (error); } +int +aio_return(struct thread *td, struct aio_return_args *uap) +{ + + return (kern_aio_return(td, uap->aiocbp, &aiocb_ops)); +} + /* * Allow a process to wakeup when any of the I/O requests are completed. */ -int -aio_suspend(struct thread *td, struct aio_suspend_args *uap) +static int +kern_aio_suspend(struct thread *td, int njoblist, struct aiocb **ujoblist, + struct timespec *ts) { struct proc *p = td->td_proc; struct timeval atv; - struct timespec ts; - struct aiocb *const *cbptr, *cbp; struct kaioinfo *ki; struct aiocblist *cb, *cbfirst; - struct aiocb **ujoblist; - int njoblist; - int error; - int timo; - int i; - - if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) - return (EINVAL); + int error, i, timo; timo = 0; - if (uap->timeout) { - /* Get timespec struct. */ - if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) - return (error); - - if (ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000) + if (ts) { + if (ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) return (EINVAL); - TIMESPEC_TO_TIMEVAL(&atv, &ts); + TIMESPEC_TO_TIMEVAL(&atv, ts); if (itimerfix(&atv)) return (EINVAL); timo = tvtohz(&atv); @@ -1724,22 +1836,8 @@ aio_suspend(struct thread *td, struct ai if (ki == NULL) return (EAGAIN); - njoblist = 0; - ujoblist = uma_zalloc(aiol_zone, M_WAITOK); - cbptr = uap->aiocbp; - - for (i = 0; i < uap->nent; i++) { - cbp = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); - if (cbp == 0) - continue; - ujoblist[njoblist] = cbp; - njoblist++; - } - - if (njoblist == 0) { - uma_zfree(aiol_zone, ujoblist); + if (njoblist == 0) return (0); - } AIO_LOCK(ki); for (;;) { @@ -1769,6 +1867,31 @@ aio_suspend(struct thread *td, struct ai } RETURN: AIO_UNLOCK(ki); + return (error); +} + +int +aio_suspend(struct thread *td, struct aio_suspend_args *uap) +{ + struct timespec ts, *tsp; + struct aiocb **ujoblist; + int error; + + if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->timeout) { + /* Get timespec struct. */ + if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) + return (error); + tsp = &ts; + } else + tsp = NULL; + + ujoblist = uma_zalloc(aiol_zone, M_WAITOK); + error = copyin(uap->aiocbp, ujoblist, uap->nent * sizeof(ujoblist[0])); + if (error == 0) + error = kern_aio_suspend(td, uap->nent, ujoblist, tsp); uma_zfree(aiol_zone, ujoblist); return (error); } @@ -1876,8 +1999,8 @@ done: * only. For a user mode async implementation, it would be best to do it in * a userland subroutine. */ -int -aio_error(struct thread *td, struct aio_error_args *uap) +static int +kern_aio_error(struct thread *td, struct aiocb *aiocbp, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct aiocblist *cb; @@ -1892,7 +2015,7 @@ aio_error(struct thread *td, struct aio_ AIO_LOCK(ki); TAILQ_FOREACH(cb, &ki->kaio_all, allist) { - if (cb->uuaiocb == uap->aiocbp) { + if (cb->uuaiocb == aiocbp) { if (cb->jobstate == JOBST_JOBFINISHED) td->td_retval[0] = cb->uaiocb._aiocb_private.error; @@ -1907,9 +2030,9 @@ aio_error(struct thread *td, struct aio_ /* * Hack for failure of aio_aqueue. */ - status = fuword(&uap->aiocbp->_aiocb_private.status); + status = ops->fetch_status(aiocbp); if (status == -1) { - td->td_retval[0] = fuword(&uap->aiocbp->_aiocb_private.error); + td->td_retval[0] = ops->fetch_error(aiocbp); return (0); } @@ -1917,19 +2040,27 @@ aio_error(struct thread *td, struct aio_ return (0); } +int +aio_error(struct thread *td, struct aio_error_args *uap) +{ + + return (kern_aio_error(td, uap->aiocbp, &aiocb_ops)); +} + /* syscall - asynchronous read from a file (REALTIME) */ int oaio_read(struct thread *td, struct oaio_read_args *uap) { - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, 1); + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, + &aiocb_ops_osigevent)); } int aio_read(struct thread *td, struct aio_read_args *uap) { - return aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, 0); + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, &aiocb_ops)); } /* syscall - asynchronous write to a file (REALTIME) */ @@ -1937,47 +2068,34 @@ int oaio_write(struct thread *td, struct oaio_write_args *uap) { - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, 1); + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, + &aiocb_ops_osigevent)); } int aio_write(struct thread *td, struct aio_write_args *uap) { - return aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, 0); -} - -/* syscall - list directed I/O (REALTIME) */ -int -olio_listio(struct thread *td, struct olio_listio_args *uap) -{ - return do_lio_listio(td, (struct lio_listio_args *)uap, 1); -} - -/* syscall - list directed I/O (REALTIME) */ -int -lio_listio(struct thread *td, struct lio_listio_args *uap) -{ - return do_lio_listio(td, uap, 0); + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, &aiocb_ops)); } static int -do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev) +kern_lio_listio(struct thread *td, int mode, struct aiocb * const *uacb_list, + struct aiocb **acb_list, int nent, struct sigevent *sig, + struct aiocb_ops *ops) { struct proc *p = td->td_proc; - struct aiocb *iocb, * const *cbptr; + struct aiocb *iocb; struct kaioinfo *ki; struct aioliojob *lj; struct kevent kev; - int nent; int error; int nerror; int i; - if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + if ((mode != LIO_NOWAIT) && (mode != LIO_WAIT)) return (EINVAL); - nent = uap->nent; if (nent < 0 || nent > AIO_LISTIO_MAX) return (EINVAL); @@ -1996,21 +2114,13 @@ do_lio_listio(struct thread *td, struct /* * Setup signal. */ - if (uap->sig && (uap->mode == LIO_NOWAIT)) { - bzero(&lj->lioj_signal, sizeof(&lj->lioj_signal)); - error = copyin(uap->sig, &lj->lioj_signal, - oldsigev ? sizeof(struct osigevent) : - sizeof(struct sigevent)); - if (error) { - uma_zfree(aiolio_zone, lj); - return (error); - } - + if (sig && (mode == LIO_NOWAIT)) { + bcopy(sig, &lj->lioj_signal, sizeof(lj->lioj_signal)); if (lj->lioj_signal.sigev_notify == SIGEV_KEVENT) { /* Assume only new style KEVENT */ kev.filter = EVFILT_LIO; kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1; - kev.ident = (uintptr_t)uap->acb_list; /* something unique */ + kev.ident = (uintptr_t)uacb_list; /* something unique */ kev.data = (intptr_t)lj; /* pass user defined sigval data */ kev.udata = lj->lioj_signal.sigev_value.sival_ptr; @@ -2050,11 +2160,10 @@ do_lio_listio(struct thread *td, struct * Get pointers to the list of I/O requests. */ nerror = 0; - cbptr = uap->acb_list; - for (i = 0; i < uap->nent; i++) { - iocb = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); - if (((intptr_t)iocb != -1) && ((intptr_t)iocb != 0)) { - error = aio_aqueue(td, iocb, lj, LIO_NOP, oldsigev); + for (i = 0; i < nent; i++) { + iocb = acb_list[i]; + if (iocb != NULL) { + error = aio_aqueue(td, iocb, lj, LIO_NOP, ops); if (error != 0) nerror++; } @@ -2062,7 +2171,7 @@ do_lio_listio(struct thread *td, struct error = 0; AIO_LOCK(ki); - if (uap->mode == LIO_WAIT) { + if (mode == LIO_WAIT) { while (lj->lioj_count - 1 != lj->lioj_finished_count) { ki->kaio_flags |= KAIO_WAKEUP; error = msleep(&p->p_aioinfo, AIO_MTX(ki), @@ -2105,6 +2214,75 @@ do_lio_listio(struct thread *td, struct return (error); } +/* syscall - list directed I/O (REALTIME) */ +int +olio_listio(struct thread *td, struct olio_listio_args *uap) +{ + struct aiocb **acb_list; + struct sigevent *sigp, sig; + struct osigevent osig; + int error, nent; + + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + return (EINVAL); + + nent = uap->nent; + if (nent < 0 || nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->sig && (uap->mode == LIO_NOWAIT)) { + error = copyin(uap->sig, &osig, sizeof(osig)); + if (error) + return (error); + error = convert_old_sigevent(&osig, &sig); + if (error) + return (error); + sigp = &sig; + } else + sigp = NULL; + + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); + if (error == 0) + error = kern_lio_listio(td, uap->mode, + (struct aiocb * const *)uap->acb_list, acb_list, nent, sigp, + &aiocb_ops_osigevent); + free(acb_list, M_LIO); + return (error); +} + +/* syscall - list directed I/O (REALTIME) */ +int +lio_listio(struct thread *td, struct lio_listio_args *uap) +{ + struct aiocb **acb_list; + struct sigevent *sigp, sig; + int error, nent; + + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + return (EINVAL); + + nent = uap->nent; + if (nent < 0 || nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->sig && (uap->mode == LIO_NOWAIT)) { + error = copyin(uap->sig, &sig, sizeof(sig)); + if (error) + return (error); + sigp = &sig; + } else + sigp = NULL; + + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); + if (error == 0) + error = kern_lio_listio(td, uap->mode, uap->acb_list, acb_list, + nent, sigp, &aiocb_ops); + free(acb_list, M_LIO); + return (error); +} + /* * Called from interrupt thread for physio, we should return as fast * as possible, so we schedule a biohelper task. @@ -2156,30 +2334,25 @@ biohelper(void *context, int pending) } /* syscall - wait for the next completion of an aio request */ -int -aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) +static int +kern_aio_waitcomplete(struct thread *td, struct aiocb **aiocbp, + struct timespec *ts, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct timeval atv; - struct timespec ts; struct kaioinfo *ki; struct aiocblist *cb; struct aiocb *uuaiocb; int error, status, timo; - suword(uap->aiocbp, (long)NULL); + ops->store_aiocb(aiocbp, NULL); timo = 0; - if (uap->timeout) { - /* Get timespec struct. */ - error = copyin(uap->timeout, &ts, sizeof(ts)); - if (error) - return (error); - - if ((ts.tv_nsec < 0) || (ts.tv_nsec >= 1000000000)) + if (ts) { + if ((ts->tv_nsec < 0) || (ts->tv_nsec >= 1000000000)) return (EINVAL); - TIMESPEC_TO_TIMEVAL(&atv, &ts); + TIMESPEC_TO_TIMEVAL(&atv, ts); if (itimerfix(&atv)) return (EINVAL); timo = tvtohz(&atv); @@ -2217,9 +2390,9 @@ aio_waitcomplete(struct thread *td, stru } aio_free_entry(cb); AIO_UNLOCK(ki); - suword(uap->aiocbp, (long)uuaiocb); - suword(&uuaiocb->_aiocb_private.error, error); - suword(&uuaiocb->_aiocb_private.status, status); + ops->store_aiocb(aiocbp, uuaiocb); + ops->store_error(uuaiocb, error); + ops->store_status(uuaiocb, status); } else AIO_UNLOCK(ki); @@ -2227,17 +2400,43 @@ aio_waitcomplete(struct thread *td, stru } int -aio_fsync(struct thread *td, struct aio_fsync_args *uap) +aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) +{ + struct timespec ts, *tsp; + int error; + + if (uap->timeout) { + /* Get timespec struct. */ + error = copyin(uap->timeout, &ts, sizeof(ts)); + if (error) + return (error); + tsp = &ts; + } else + tsp = NULL; + + return (kern_aio_waitcomplete(td, uap->aiocbp, tsp, &aiocb_ops)); +} + +static int +kern_aio_fsync(struct thread *td, int op, struct aiocb *aiocbp, + struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct kaioinfo *ki; - if (uap->op != O_SYNC) /* XXX lack of O_DSYNC */ + if (op != O_SYNC) /* XXX lack of O_DSYNC */ return (EINVAL); ki = p->p_aioinfo; if (ki == NULL) aio_init_aioinfo(p); - return aio_aqueue(td, uap->aiocbp, NULL, LIO_SYNC, 0); + return (aio_aqueue(td, aiocbp, NULL, LIO_SYNC, ops)); +} + +int +aio_fsync(struct thread *td, struct aio_fsync_args *uap) +{ + + return (kern_aio_fsync(td, uap->op, uap->aiocbp, &aiocb_ops)); } /* kqueue attach function */ @@ -2325,3 +2524,433 @@ filt_lio(struct knote *kn, long hint) return (lj->lioj_flags & LIOJ_KEVENT_POSTED); } + +#ifdef COMPAT_IA32 +#include +#include +#include +#include +#include +#include +#include + +struct __aiocb_private32 { + int32_t status; + int32_t error; + uint32_t kernelinfo; +}; + +typedef struct oaiocb32 { + int aio_fildes; /* File descriptor */ + uint64_t aio_offset __packed; /* File offset for I/O */ + uint32_t aio_buf; /* I/O buffer in process space */ + uint32_t aio_nbytes; /* Number of bytes for I/O */ + struct osigevent32 aio_sigevent; /* Signal to deliver */ + int aio_lio_opcode; /* LIO opcode */ + int aio_reqprio; /* Request priority -- ignored */ + struct __aiocb_private32 _aiocb_private; +} oaiocb32_t; + +typedef struct aiocb32 { + int32_t aio_fildes; /* File descriptor */ + uint64_t aio_offset __packed; /* File offset for I/O */ + uint32_t aio_buf; /* I/O buffer in process space */ + uint32_t aio_nbytes; /* Number of bytes for I/O */ + int __spare__[2]; + uint32_t __spare2__; + int aio_lio_opcode; /* LIO opcode */ + int aio_reqprio; /* Request priority -- ignored */ + struct __aiocb_private32 _aiocb_private; + struct sigevent32 aio_sigevent; /* Signal to deliver */ +} aiocb32_t; + +static int +convert_old_sigevent32(struct osigevent32 *osig, struct sigevent *nsig) +{ + + /* + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are + * supported by AIO with the old sigevent structure. + */ + CP(*osig, *nsig, sigev_notify); + switch (nsig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_SIGNAL: + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; + break; + case SIGEV_KEVENT: + nsig->sigev_notify_kqueue = + osig->__sigev_u.__sigev_notify_kqueue; + PTRIN_CP(*osig, *nsig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb32_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) +{ + struct oaiocb32 job32; + int error; + + bzero(kjob, sizeof(struct aiocb)); + error = copyin(ujob, &job32, sizeof(job32)); + if (error) + return (error); + + CP(job32, *kjob, aio_fildes); + CP(job32, *kjob, aio_offset); + PTRIN_CP(job32, *kjob, aio_buf); + CP(job32, *kjob, aio_nbytes); + CP(job32, *kjob, aio_lio_opcode); + CP(job32, *kjob, aio_reqprio); + CP(job32, *kjob, _aiocb_private.status); + CP(job32, *kjob, _aiocb_private.error); + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); + return (convert_old_sigevent32(&job32.aio_sigevent, + &kjob->aio_sigevent)); +} + +static int +convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig) +{ + + CP(*sig32, *sig, sigev_notify); + switch (sig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_THREAD_ID: + CP(*sig32, *sig, sigev_notify_thread_id); + /* FALLTHROUGH */ + case SIGEV_SIGNAL: + CP(*sig32, *sig, sigev_signo); + break; + case SIGEV_KEVENT: + CP(*sig32, *sig, sigev_notify_kqueue); + PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb32_copyin(struct aiocb *ujob, struct aiocb *kjob) +{ + struct aiocb32 job32; + int error; + + error = copyin(ujob, &job32, sizeof(job32)); + if (error) + return (error); + CP(job32, *kjob, aio_fildes); + CP(job32, *kjob, aio_offset); + PTRIN_CP(job32, *kjob, aio_buf); + CP(job32, *kjob, aio_nbytes); + CP(job32, *kjob, aio_lio_opcode); + CP(job32, *kjob, aio_reqprio); + CP(job32, *kjob, _aiocb_private.status); + CP(job32, *kjob, _aiocb_private.error); + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); + return (convert_sigevent32(&job32.aio_sigevent, &kjob->aio_sigevent)); +} + +static long +aiocb32_fetch_status(struct aiocb *ujob) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (fuword32(&ujob32->_aiocb_private.status)); +} + +static long +aiocb32_fetch_error(struct aiocb *ujob) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (fuword32(&ujob32->_aiocb_private.error)); +} + +static int +aiocb32_store_status(struct aiocb *ujob, long status) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (suword32(&ujob32->_aiocb_private.status, status)); +} + +static int +aiocb32_store_error(struct aiocb *ujob, long error) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 18:54:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 079A6106566C; Wed, 21 Jan 2009 18:54:36 +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 E97D88FC19; Wed, 21 Jan 2009 18:54:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LIsZne087258; Wed, 21 Jan 2009 18:54:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LIsZ7b087257; Wed, 21 Jan 2009 18:54:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211854.n0LIsZ7b087257@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 18:54: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: r187561 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 18:54:36 -0000 Author: jhb Date: Wed Jan 21 18:54:35 2009 New Revision: 187561 URL: http://svn.freebsd.org/changeset/base/187561 Log: MFC: Add a new KTR tracepoint in the KTR_CALLOUT class to note when a callout routine finishes executing. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_timeout.c Modified: stable/7/sys/kern/kern_timeout.c ============================================================================== --- stable/7/sys/kern/kern_timeout.c Wed Jan 21 18:53:46 2009 (r187560) +++ stable/7/sys/kern/kern_timeout.c Wed Jan 21 18:54:35 2009 (r187561) @@ -290,6 +290,7 @@ softclock(void *dummy) lastfunc = c_func; } #endif + CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) mtx_unlock(c_mtx); skip: From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 20:05:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C34410656C4; Wed, 21 Jan 2009 20:05:12 +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 68C928FC19; Wed, 21 Jan 2009 20:05:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LK5C9D088669; Wed, 21 Jan 2009 20:05:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LK5CUJ088665; Wed, 21 Jan 2009 20:05:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901212005.n0LK5CUJ088665@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 20:05: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: r187563 - stable/7/sys/compat/freebsd32 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 20:05:13 -0000 Author: jhb Date: Wed Jan 21 20:05:12 2009 New Revision: 187563 URL: http://svn.freebsd.org/changeset/base/187563 Log: Regen. Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h stable/7/sys/compat/freebsd32/freebsd32_syscall.h stable/7/sys/compat/freebsd32/freebsd32_syscalls.c stable/7/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_proto.h Wed Jan 21 19:43:10 2009 (r187562) +++ stable/7/sys/compat/freebsd32/freebsd32_proto.h Wed Jan 21 20:05:12 2009 (r187563) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 187559 2009-01-21 18:52:33Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -215,6 +215,18 @@ struct freebsd32_nanosleep_args { char rqtp_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * rqtp; char rqtp_r_[PADR_(const struct timespec32 *)]; char rmtp_l_[PADL_(struct timespec32 *)]; struct timespec32 * rmtp; char rmtp_r_[PADR_(struct timespec32 *)]; }; +struct freebsd32_aio_read_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_write_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_lio_listio_args { + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char acb_list_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * acb_list; char acb_list_r_[PADR_(struct aiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char sig_l_[PADL_(struct sigevent *)]; struct sigevent * sig; char sig_r_[PADR_(struct sigevent *)]; +}; struct freebsd32_lutimes_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; @@ -235,6 +247,33 @@ struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; char stat_l_[PADL_(struct module_stat32 *)]; struct module_stat32 * stat; char stat_r_[PADR_(struct module_stat32 *)]; }; +struct freebsd32_aio_return_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_suspend_args { + char aiocbp_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; +}; +struct freebsd32_aio_cancel_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_error_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_oaio_read_args { + char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; +}; +struct freebsd32_oaio_write_args { + char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; +}; +struct freebsd32_olio_listio_args { + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)]; +}; struct freebsd32_sigtimedwait_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; @@ -244,6 +283,10 @@ struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; }; +struct freebsd32_aio_waitcomplete_args { + char aiocbp_l_[PADL_(struct aiocb32 **)]; struct aiocb32 ** aiocbp; char aiocbp_r_[PADR_(struct aiocb32 **)]; + char timeout_l_[PADL_(struct timespec32 *)]; struct timespec32 * timeout; char timeout_r_[PADR_(struct timespec32 *)]; +}; struct freebsd32_kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char changelist_l_[PADL_(const struct kevent32 *)]; const struct kevent32 * changelist; char changelist_r_[PADR_(const struct kevent32 *)]; @@ -305,6 +348,10 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_aio_fsync_args { + char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; @@ -408,12 +455,23 @@ int freebsd32_clock_gettime(struct threa int freebsd32_clock_settime(struct thread *, struct freebsd32_clock_settime_args *); int freebsd32_clock_getres(struct thread *, struct freebsd32_clock_getres_args *); int freebsd32_nanosleep(struct thread *, struct freebsd32_nanosleep_args *); +int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); +int freebsd32_aio_write(struct thread *, struct freebsd32_aio_write_args *); +int freebsd32_lio_listio(struct thread *, struct freebsd32_lio_listio_args *); int freebsd32_lutimes(struct thread *, struct freebsd32_lutimes_args *); int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); int freebsd32_modstat(struct thread *, struct freebsd32_modstat_args *); +int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *); +int freebsd32_aio_suspend(struct thread *, struct freebsd32_aio_suspend_args *); +int freebsd32_aio_cancel(struct thread *, struct freebsd32_aio_cancel_args *); +int freebsd32_aio_error(struct thread *, struct freebsd32_aio_error_args *); +int freebsd32_oaio_read(struct thread *, struct freebsd32_oaio_read_args *); +int freebsd32_oaio_write(struct thread *, struct freebsd32_oaio_write_args *); +int freebsd32_olio_listio(struct thread *, struct freebsd32_olio_listio_args *); int freebsd32_sigtimedwait(struct thread *, struct freebsd32_sigtimedwait_args *); int freebsd32_sigwaitinfo(struct thread *, struct freebsd32_sigwaitinfo_args *); +int freebsd32_aio_waitcomplete(struct thread *, struct freebsd32_aio_waitcomplete_args *); int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); int freebsd32_nmount(struct thread *, struct freebsd32_nmount_args *); int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *); @@ -427,6 +485,7 @@ int freebsd32_umtx_unlock(struct thread int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); @@ -618,12 +677,23 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_clock_settime AUE_CLOCK_SETTIME #define FREEBSD32_SYS_AUE_freebsd32_clock_getres AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nanosleep AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_write AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_lio_listio AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_suspend AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_cancel AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_error AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_oaio_read AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_oaio_write AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_olio_listio AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_sigtimedwait AUE_SIGWAIT #define FREEBSD32_SYS_AUE_freebsd32_sigwaitinfo AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_waitcomplete AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nmount AUE_NMOUNT #define FREEBSD32_SYS_AUE_freebsd32_sendfile AUE_SENDFILE @@ -637,6 +707,7 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE #define FREEBSD32_SYS_AUE_freebsd32_mmap AUE_MMAP Modified: stable/7/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscall.h Wed Jan 21 19:43:10 2009 (r187562) +++ stable/7/sys/compat/freebsd32/freebsd32_syscall.h Wed Jan 21 20:05:12 2009 (r187563) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 187559 2009-01-21 18:52:33Z jhb */ #define FREEBSD32_SYS_syscall 0 @@ -210,6 +210,9 @@ #define FREEBSD32_SYS_openbsd_poll 252 #define FREEBSD32_SYS_issetugid 253 #define FREEBSD32_SYS_lchown 254 +#define FREEBSD32_SYS_freebsd32_aio_read 255 +#define FREEBSD32_SYS_freebsd32_aio_write 256 +#define FREEBSD32_SYS_freebsd32_lio_listio 257 #define FREEBSD32_SYS_getdents 272 #define FREEBSD32_SYS_lchmod 274 #define FREEBSD32_SYS_netbsd_lchown 275 @@ -237,6 +240,13 @@ #define FREEBSD32_SYS_setresuid 311 #define FREEBSD32_SYS_setresgid 312 /* 313 is obsolete signanosleep */ +#define FREEBSD32_SYS_freebsd32_aio_return 314 +#define FREEBSD32_SYS_freebsd32_aio_suspend 315 +#define FREEBSD32_SYS_freebsd32_aio_cancel 316 +#define FREEBSD32_SYS_freebsd32_aio_error 317 +#define FREEBSD32_SYS_freebsd32_oaio_read 318 +#define FREEBSD32_SYS_freebsd32_oaio_write 319 +#define FREEBSD32_SYS_freebsd32_olio_listio 320 #define FREEBSD32_SYS_yield 321 /* 322 is obsolete thr_sleep */ /* 323 is obsolete thr_wakeup */ @@ -274,6 +284,7 @@ #define FREEBSD32_SYS_extattr_set_file 356 #define FREEBSD32_SYS_extattr_get_file 357 #define FREEBSD32_SYS_extattr_delete_file 358 +#define FREEBSD32_SYS_freebsd32_aio_waitcomplete 359 #define FREEBSD32_SYS_getresuid 360 #define FREEBSD32_SYS_getresgid 361 #define FREEBSD32_SYS_kqueue 362 @@ -326,6 +337,7 @@ #define FREEBSD32_SYS_sigqueue 456 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 +#define FREEBSD32_SYS_freebsd32_aio_fsync 465 #define FREEBSD32_SYS_rtprio_thread 466 #define FREEBSD32_SYS_sctp_peeloff 471 #define FREEBSD32_SYS_sctp_generic_sendmsg 472 Modified: stable/7/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jan 21 19:43:10 2009 (r187562) +++ stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jan 21 20:05:12 2009 (r187563) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 187559 2009-01-21 18:52:33Z jhb */ const char *freebsd32_syscallnames[] = { @@ -262,9 +262,9 @@ const char *freebsd32_syscallnames[] = { "openbsd_poll", /* 252 = openbsd_poll */ "issetugid", /* 253 = issetugid */ "lchown", /* 254 = lchown */ - "#255", /* 255 = nosys */ - "#256", /* 256 = nosys */ - "#257", /* 257 = nosys */ + "freebsd32_aio_read", /* 255 = freebsd32_aio_read */ + "freebsd32_aio_write", /* 256 = freebsd32_aio_write */ + "freebsd32_lio_listio", /* 257 = freebsd32_lio_listio */ "#258", /* 258 = nosys */ "#259", /* 259 = nosys */ "#260", /* 260 = nosys */ @@ -321,13 +321,13 @@ const char *freebsd32_syscallnames[] = { "setresuid", /* 311 = setresuid */ "setresgid", /* 312 = setresgid */ "obs_signanosleep", /* 313 = obsolete signanosleep */ - "#314", /* 314 = aio_return */ - "#315", /* 315 = aio_suspend */ - "#316", /* 316 = aio_cancel */ - "#317", /* 317 = aio_error */ - "#318", /* 318 = aio_read */ - "#319", /* 319 = aio_write */ - "#320", /* 320 = lio_listio */ + "freebsd32_aio_return", /* 314 = freebsd32_aio_return */ + "freebsd32_aio_suspend", /* 315 = freebsd32_aio_suspend */ + "freebsd32_aio_cancel", /* 316 = freebsd32_aio_cancel */ + "freebsd32_aio_error", /* 317 = freebsd32_aio_error */ + "freebsd32_oaio_read", /* 318 = freebsd32_oaio_read */ + "freebsd32_oaio_write", /* 319 = freebsd32_oaio_write */ + "freebsd32_olio_listio", /* 320 = freebsd32_olio_listio */ "yield", /* 321 = yield */ "obs_thr_sleep", /* 322 = obsolete thr_sleep */ "obs_thr_wakeup", /* 323 = obsolete thr_wakeup */ @@ -366,7 +366,7 @@ const char *freebsd32_syscallnames[] = { "extattr_set_file", /* 356 = extattr_set_file */ "extattr_get_file", /* 357 = extattr_get_file */ "extattr_delete_file", /* 358 = extattr_delete_file */ - "#359", /* 359 = aio_waitcomplete */ + "freebsd32_aio_waitcomplete", /* 359 = freebsd32_aio_waitcomplete */ "getresuid", /* 360 = getresuid */ "getresgid", /* 361 = getresgid */ "kqueue", /* 362 = kqueue */ @@ -472,7 +472,7 @@ const char *freebsd32_syscallnames[] = { "#462", /* 462 = kmq_unlink */ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ - "#465", /* 465 = aio_fsync */ + "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ "rtprio_thread", /* 466 = rtprio_thread */ "#467", /* 467 = nosys */ "#468", /* 468 = nosys */ Modified: stable/7/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_sysent.c Wed Jan 21 19:43:10 2009 (r187562) +++ stable/7/sys/compat/freebsd32/freebsd32_sysent.c Wed Jan 21 20:05:12 2009 (r187563) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 187559 2009-01-21 18:52:33Z jhb */ #include "opt_compat.h" @@ -293,9 +293,9 @@ struct sysent freebsd32_sysent[] = { { AS(openbsd_poll_args), (sy_call_t *)openbsd_poll, AUE_POLL, NULL, 0, 0 }, /* 252 = openbsd_poll */ { 0, (sy_call_t *)issetugid, AUE_ISSETUGID, NULL, 0, 0 }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)lchown, AUE_LCHOWN, NULL, 0, 0 }, /* 254 = lchown */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 255 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 256 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 257 = nosys */ + { AS(freebsd32_aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 255 = freebsd32_aio_read */ + { AS(freebsd32_aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 256 = freebsd32_aio_write */ + { AS(freebsd32_lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 257 = freebsd32_lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 260 = nosys */ @@ -352,13 +352,13 @@ struct sysent freebsd32_sysent[] = { { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID, NULL, 0, 0 }, /* 311 = setresuid */ { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID, NULL, 0, 0 }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 313 = obsolete signanosleep */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 314 = aio_return */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 315 = aio_suspend */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 316 = aio_cancel */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 317 = aio_error */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 318 = aio_read */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 319 = aio_write */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 320 = lio_listio */ + { AS(freebsd32_aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 314 = freebsd32_aio_return */ + { AS(freebsd32_aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 315 = freebsd32_aio_suspend */ + { AS(freebsd32_aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 316 = freebsd32_aio_cancel */ + { AS(freebsd32_aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 317 = freebsd32_aio_error */ + { AS(freebsd32_oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 318 = freebsd32_oaio_read */ + { AS(freebsd32_oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 319 = freebsd32_oaio_write */ + { AS(freebsd32_olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 320 = freebsd32_olio_listio */ { 0, (sy_call_t *)yield, AUE_NULL, NULL, 0, 0 }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 323 = obsolete thr_wakeup */ @@ -397,7 +397,7 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_set_file_args), (sy_call_t *)extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0 }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0 }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0 }, /* 358 = extattr_delete_file */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 359 = aio_waitcomplete */ + { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 359 = freebsd32_aio_waitcomplete */ { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID, NULL, 0, 0 }, /* 360 = getresuid */ { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID, NULL, 0, 0 }, /* 361 = getresgid */ { 0, (sy_call_t *)kqueue, AUE_KQUEUE, NULL, 0, 0 }, /* 362 = kqueue */ @@ -503,7 +503,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)abort2, AUE_NULL, NULL, 0, 0 }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)thr_set_name, AUE_NULL, NULL, 0, 0 }, /* 464 = thr_set_name */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 465 = aio_fsync */ + { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 465 = freebsd32_aio_fsync */ { AS(rtprio_thread_args), (sy_call_t *)rtprio_thread, AUE_RTPRIO, NULL, 0, 0 }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 468 = nosys */ From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 20:16:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9520810656DE; Wed, 21 Jan 2009 20:16:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 804398FC29; Wed, 21 Jan 2009 20:16:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LKGCe8088957; Wed, 21 Jan 2009 20:16:12 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LKGCHO088949; Wed, 21 Jan 2009 20:16:12 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212016.n0LKGCHO088949@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 20:16: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: r187565 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 20:16:14 -0000 Author: jkim Date: Wed Jan 21 20:16:11 2009 New Revision: 187565 URL: http://svn.freebsd.org/changeset/base/187565 Log: MFC: Detect Advanced Power Management Information for AMD CPUs. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/amd64/amd64/initcpu.c stable/7/sys/amd64/include/md_var.h stable/7/sys/amd64/include/specialreg.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/identcpu.c stable/7/sys/i386/i386/initcpu.c stable/7/sys/i386/include/md_var.h stable/7/sys/i386/include/specialreg.h Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 20:16:11 2009 (r187565) @@ -447,6 +447,10 @@ identify_cpu(void) amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); amd_feature2 = regs[2]; } + if (cpu_exthigh >= 0x80000007) { + do_cpuid(0x80000007, regs); + amd_pminfo = regs[3]; + } if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); cpu_procinfo2 = regs[2]; Modified: stable/7/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/initcpu.c Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/amd64/amd64/initcpu.c Wed Jan 21 20:16:11 2009 (r187565) @@ -53,6 +53,7 @@ u_int cpu_feature; /* Feature flags */ u_int cpu_feature2; /* Feature flags */ u_int amd_feature; /* AMD feature flags */ u_int amd_feature2; /* AMD feature flags */ +u_int amd_pminfo; /* AMD advanced power management info */ u_int cpu_high; /* Highest arg to CPUID */ u_int cpu_exthigh; /* Highest arg to extended CPUID */ u_int cpu_id; /* Stepping ID */ Modified: stable/7/sys/amd64/include/md_var.h ============================================================================== --- stable/7/sys/amd64/include/md_var.h Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/amd64/include/md_var.h Wed Jan 21 20:16:11 2009 (r187565) @@ -44,6 +44,7 @@ extern u_int cpu_feature; extern u_int cpu_feature2; extern u_int amd_feature; extern u_int amd_feature2; +extern u_int amd_pminfo; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: stable/7/sys/amd64/include/specialreg.h ============================================================================== --- stable/7/sys/amd64/include/specialreg.h Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/amd64/include/specialreg.h Wed Jan 21 20:16:11 2009 (r187565) @@ -156,6 +156,19 @@ #define CPUID_LOCAL_APIC_ID 0xff000000 /* + * AMD extended function 8000_0007h edx info + */ +#define AMDPM_TS 0x00000001 +#define AMDPM_FID 0x00000002 +#define AMDPM_VID 0x00000004 +#define AMDPM_TTP 0x00000008 +#define AMDPM_TM 0x00000010 +#define AMDPM_STC 0x00000020 +#define AMDPM_100MHZ_STEPS 0x00000040 +#define AMDPM_HW_PSTATE 0x00000080 +#define AMDPM_TSC_INVARIANT 0x00000100 + +/* * AMD extended function 8000_0008h ecx info */ #define AMDID_CMP_CORES 0x000000ff Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/i386/i386/identcpu.c Wed Jan 21 20:16:11 2009 (r187565) @@ -1088,6 +1088,10 @@ finishidentcpu(void) amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); amd_feature2 = regs[2]; } + if (cpu_exthigh >= 0x80000007) { + do_cpuid(0x80000007, regs); + amd_pminfo = regs[3]; + } if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); cpu_procinfo2 = regs[2]; Modified: stable/7/sys/i386/i386/initcpu.c ============================================================================== --- stable/7/sys/i386/i386/initcpu.c Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/i386/i386/initcpu.c Wed Jan 21 20:16:11 2009 (r187565) @@ -82,6 +82,7 @@ u_int cpu_feature = 0; /* Feature flags u_int cpu_feature2 = 0; /* Feature flags */ u_int amd_feature = 0; /* AMD feature flags */ u_int amd_feature2 = 0; /* AMD feature flags */ +u_int amd_pminfo = 0; /* AMD advanced power management info */ u_int via_feature_rng = 0; /* VIA RNG features */ u_int via_feature_xcrypt = 0; /* VIA ACE features */ u_int cpu_high = 0; /* Highest arg to CPUID */ Modified: stable/7/sys/i386/include/md_var.h ============================================================================== --- stable/7/sys/i386/include/md_var.h Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/i386/include/md_var.h Wed Jan 21 20:16:11 2009 (r187565) @@ -49,6 +49,7 @@ extern u_int cpu_feature; extern u_int cpu_feature2; extern u_int amd_feature; extern u_int amd_feature2; +extern u_int amd_pminfo; extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_fxsr; Modified: stable/7/sys/i386/include/specialreg.h ============================================================================== --- stable/7/sys/i386/include/specialreg.h Wed Jan 21 20:08:17 2009 (r187564) +++ stable/7/sys/i386/include/specialreg.h Wed Jan 21 20:16:11 2009 (r187565) @@ -158,6 +158,19 @@ #define CPUID_LOCAL_APIC_ID 0xff000000 /* + * AMD extended function 8000_0007h edx info + */ +#define AMDPM_TS 0x00000001 +#define AMDPM_FID 0x00000002 +#define AMDPM_VID 0x00000004 +#define AMDPM_TTP 0x00000008 +#define AMDPM_TM 0x00000010 +#define AMDPM_STC 0x00000020 +#define AMDPM_100MHZ_STEPS 0x00000040 +#define AMDPM_HW_PSTATE 0x00000080 +#define AMDPM_TSC_INVARIANT 0x00000100 + +/* * AMD extended function 8000_0008h ecx info */ #define AMDID_CMP_CORES 0x000000ff From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 20:53:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C94710656FA; Wed, 21 Jan 2009 20:53:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874008FC12; Wed, 21 Jan 2009 20:53:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LKrbOA090972; Wed, 21 Jan 2009 20:53:37 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LKrbEt090963; Wed, 21 Jan 2009 20:53:37 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212053.n0LKrbEt090963@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 20:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187567 - in stable/7/sys: . amd64/amd64 amd64/include contrib/altq/altq contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 i386/include i386/isa X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 20:53:39 -0000 Author: jkim Date: Wed Jan 21 20:53:36 2009 New Revision: 187567 URL: http://svn.freebsd.org/changeset/base/187567 Log: MFC: Turn off CPU frequency change notifiers when the TSC is P-state invariant or it is forced by setting 'kern.timecounter.invariant_tsc' tunable to non-zero. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/amd64/amd64/prof_machdep.c stable/7/sys/amd64/amd64/tsc.c stable/7/sys/amd64/include/clock.h stable/7/sys/contrib/altq/altq/altq_subr.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/identcpu.c stable/7/sys/i386/i386/tsc.c stable/7/sys/i386/include/clock.h stable/7/sys/i386/isa/prof_machdep.c Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 20:53:36 2009 (r187567) @@ -345,6 +345,12 @@ printcpuinfo(void) "AuthenticAMD") == 0) cpu_feature &= ~CPUID_HTT; + if (!tsc_is_invariant && + (amd_pminfo & AMDPM_TSC_INVARIANT)) { + tsc_is_invariant = 1; + printf("\n P-state invariant TSC"); + } + /* * If this CPU supports HTT or CMP then mention the * number of physical/logical cores it contains. @@ -405,8 +411,11 @@ panicifcpuunsupported(void) static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; /* Total setting for this level gives the new frequency in MHz. */ Modified: stable/7/sys/amd64/amd64/prof_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/prof_machdep.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/amd64/amd64/prof_machdep.c Wed Jan 21 20:53:36 2009 (r187567) @@ -387,8 +387,11 @@ static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; if (cputime_prof_active && cputime_clock == CPUTIME_CLOCK_TSC) printf("warning: cpu freq changed while profiling active\n"); Modified: stable/7/sys/amd64/amd64/tsc.c ============================================================================== --- stable/7/sys/amd64/amd64/tsc.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/amd64/amd64/tsc.c Wed Jan 21 20:53:36 2009 (r187567) @@ -53,8 +53,13 @@ __FBSDID("$FreeBSD$"); uint64_t tsc_freq; int tsc_is_broken; +int tsc_is_invariant; static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag; +SYSCTL_INT(_kern_timecounter, OID_AUTO, invariant_tsc, CTLFLAG_RDTUN, + &tsc_is_invariant, 0, "Indicates whether the TSC is P-state invariant"); +TUNABLE_INT("kern.timecounter.invariant_tsc", &tsc_is_invariant); + #ifdef SMP static int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, @@ -179,11 +184,12 @@ static void tsc_freq_changing(void *arg, const struct cf_level *level, int *status) { - if (*status != 0 || timecounter != &tsc_timecounter) + if (*status != 0 || timecounter != &tsc_timecounter || + tsc_is_invariant) return; printf("timecounter TSC must not be in use when " - "changing frequencies; change denied\n"); + "changing frequencies; change denied\n"); *status = EBUSY; } @@ -191,8 +197,11 @@ tsc_freq_changing(void *arg, const struc static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; /* Total setting for this level gives the new frequency in MHz. */ Modified: stable/7/sys/amd64/include/clock.h ============================================================================== --- stable/7/sys/amd64/include/clock.h Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/amd64/include/clock.h Wed Jan 21 20:53:36 2009 (r187567) @@ -22,6 +22,7 @@ extern u_int timer_freq; extern int timer0_max_count; extern uint64_t tsc_freq; extern int tsc_is_broken; +extern int tsc_is_invariant; void i8254_init(void); Modified: stable/7/sys/contrib/altq/altq/altq_subr.c ============================================================================== --- stable/7/sys/contrib/altq/altq/altq_subr.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/contrib/altq/altq/altq_subr.c Wed Jan 21 20:53:36 2009 (r187567) @@ -910,6 +910,12 @@ tsc_freq_changed(void *arg, const struct if (status != 0) return; +#if (__FreeBSD_version >= 701102) && (defined(__amd64__) || defined(__i386__)) + /* If TSC is P-state invariant, don't do anything. */ + if (tsc_is_invariant) + return; +#endif + /* Total setting for this level gives the new frequency in MHz. */ init_machclk(); } Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/i386/i386/identcpu.c Wed Jan 21 20:53:36 2009 (r187567) @@ -842,6 +842,12 @@ printcpuinfo(void) "AuthenticAMD") == 0) cpu_feature &= ~CPUID_HTT; + if (!tsc_is_invariant && + (amd_pminfo & AMDPM_TSC_INVARIANT)) { + tsc_is_invariant = 1; + printf("\n P-state invariant TSC"); + } + /* * If this CPU supports HTT or CMP then mention the * number of physical/logical cores it contains. @@ -1058,8 +1064,11 @@ identifycyrix(void) static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; /* Total setting for this level gives the new frequency in MHz. */ Modified: stable/7/sys/i386/i386/tsc.c ============================================================================== --- stable/7/sys/i386/i386/tsc.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/i386/i386/tsc.c Wed Jan 21 20:53:36 2009 (r187567) @@ -48,9 +48,14 @@ __FBSDID("$FreeBSD$"); uint64_t tsc_freq; int tsc_is_broken; +int tsc_is_invariant; u_int tsc_present; static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag; +SYSCTL_INT(_kern_timecounter, OID_AUTO, invariant_tsc, CTLFLAG_RDTUN, + &tsc_is_invariant, 0, "Indicates whether the TSC is P-state invariant"); +TUNABLE_INT("kern.timecounter.invariant_tsc", &tsc_is_invariant); + #ifdef SMP static int smp_tsc; SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0, @@ -198,11 +203,12 @@ static void tsc_freq_changing(void *arg, const struct cf_level *level, int *status) { - if (*status != 0 || timecounter != &tsc_timecounter) + if (*status != 0 || timecounter != &tsc_timecounter || + tsc_is_invariant) return; printf("timecounter TSC must not be in use when " - "changing frequencies; change denied\n"); + "changing frequencies; change denied\n"); *status = EBUSY; } @@ -210,8 +216,11 @@ tsc_freq_changing(void *arg, const struc static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; /* Total setting for this level gives the new frequency in MHz. */ Modified: stable/7/sys/i386/include/clock.h ============================================================================== --- stable/7/sys/i386/include/clock.h Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/i386/include/clock.h Wed Jan 21 20:53:36 2009 (r187567) @@ -22,6 +22,7 @@ extern u_int timer_freq; extern int timer0_max_count; extern uint64_t tsc_freq; extern int tsc_is_broken; +extern int tsc_is_invariant; void i8254_init(void); Modified: stable/7/sys/i386/isa/prof_machdep.c ============================================================================== --- stable/7/sys/i386/isa/prof_machdep.c Wed Jan 21 20:44:42 2009 (r187566) +++ stable/7/sys/i386/isa/prof_machdep.c Wed Jan 21 20:53:36 2009 (r187567) @@ -357,8 +357,11 @@ static void tsc_freq_changed(void *arg, const struct cf_level *level, int status) { - /* If there was an error during the transition, don't do anything. */ - if (status != 0) + /* + * If there was an error during the transition or + * TSC is P-state invariant, don't do anything. + */ + if (status != 0 || tsc_is_invariant) return; if (cputime_prof_active && cputime_clock == CPUTIME_CLOCK_TSC) printf("warning: cpu freq changed while profiling active\n"); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 20:57:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9614310656C7; Wed, 21 Jan 2009 20:57:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8282F8FC18; Wed, 21 Jan 2009 20:57:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LKvsdM091157; Wed, 21 Jan 2009 20:57:54 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LKvsSP091156; Wed, 21 Jan 2009 20:57:54 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212057.n0LKvsSP091156@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 20:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187569 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb i386/cpufreq X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 20:57:56 -0000 Author: jkim Date: Wed Jan 21 20:57:54 2009 New Revision: 187569 URL: http://svn.freebsd.org/changeset/base/187569 Log: MFC: Use power management information for AMD CPUs from identcpu.c. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/cpufreq/powernow.c Modified: stable/7/sys/i386/cpufreq/powernow.c ============================================================================== --- stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 20:57:28 2009 (r187568) +++ stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 20:57:54 2009 (r187569) @@ -758,22 +758,6 @@ pn_decode_pst(device_t dev) return (ENODEV); } -/* - * TODO: this should be done in sys/ARCH/ARCH/identcpu.c - */ -static int -cpu_is_powernow_capable(void) -{ - u_int regs[4]; - - if (strcmp(cpu_vendor, "AuthenticAMD") != 0 || - cpu_exthigh < 0x80000007) - return (FALSE); - - do_cpuid(0x80000007, regs); - return (regs[3] & 0x6); -} - static int pn_decode_acpi(device_t dev, device_t perf_dev) { @@ -883,7 +867,7 @@ pn_identify(driver_t *driver, device_t p { device_t child; - if (cpu_is_powernow_capable() == 0) + if ((amd_pminfo & (AMDPM_FID | AMDPM_VID)) == 0) return; switch (cpu_id & 0xf00) { case 0x600: From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 21:01:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06E141065674; Wed, 21 Jan 2009 21:01:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7F218FC36; Wed, 21 Jan 2009 21:01:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LL12F5091285; Wed, 21 Jan 2009 21:01:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LL12Gn091284; Wed, 21 Jan 2009 21:01:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212101.n0LL12Gn091284@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 21:01:02 +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: r187570 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb i386/cpufreq X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 21:01:04 -0000 Author: jkim Date: Wed Jan 21 21:01:02 2009 New Revision: 187570 URL: http://svn.freebsd.org/changeset/base/187570 Log: MFC: Do not use PowerNow! if FID or VID is missing. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/cpufreq/powernow.c Modified: stable/7/sys/i386/cpufreq/powernow.c ============================================================================== --- stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 20:57:54 2009 (r187569) +++ stable/7/sys/i386/cpufreq/powernow.c Wed Jan 21 21:01:02 2009 (r187570) @@ -867,7 +867,7 @@ pn_identify(driver_t *driver, device_t p { device_t child; - if ((amd_pminfo & (AMDPM_FID | AMDPM_VID)) == 0) + if ((amd_pminfo & AMDPM_FID) == 0 || (amd_pminfo & AMDPM_VID) == 0) return; switch (cpu_id & 0xf00) { case 0x600: From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 21:28:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA9E1065679; Wed, 21 Jan 2009 21:28:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191CF8FC1B; Wed, 21 Jan 2009 21:28:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LLSLQ1091843; Wed, 21 Jan 2009 21:28:22 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LLSLU8091839; Wed, 21 Jan 2009 21:28:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212128.n0LLSLU8091839@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 21:28:21 +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: r187572 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 21:28:23 -0000 Author: jkim Date: Wed Jan 21 21:28:21 2009 New Revision: 187572 URL: http://svn.freebsd.org/changeset/base/187572 Log: MFC: Set tsc_is_invariant for some known AMD CPUs even if BIOS does not advertise it. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/amd64/include/specialreg.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/identcpu.c stable/7/sys/i386/include/specialreg.h Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 21:24:36 2009 (r187571) +++ stable/7/sys/amd64/amd64/identcpu.c Wed Jan 21 21:28:21 2009 (r187572) @@ -345,10 +345,17 @@ printcpuinfo(void) "AuthenticAMD") == 0) cpu_feature &= ~CPUID_HTT; + /* + * If this CPU supports P-state invariant TSC then + * mention the capability. + */ if (!tsc_is_invariant && - (amd_pminfo & AMDPM_TSC_INVARIANT)) { + (strcmp(cpu_vendor, "AuthenticAMD") == 0 && + ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || + AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2))) { tsc_is_invariant = 1; - printf("\n P-state invariant TSC"); + printf("\n TSC: P-state invariant"); } /* Modified: stable/7/sys/amd64/include/specialreg.h ============================================================================== --- stable/7/sys/amd64/include/specialreg.h Wed Jan 21 21:24:36 2009 (r187571) +++ stable/7/sys/amd64/include/specialreg.h Wed Jan 21 21:28:21 2009 (r187572) @@ -148,6 +148,21 @@ #define AMDID2_PREFETCH 0x00000100 /* + * CPUID instruction 1 eax info + */ +#define CPUID_STEPPING 0x0000000f +#define CPUID_MODEL 0x000000f0 +#define CPUID_FAMILY 0x00000f00 +#define CPUID_EXT_MODEL 0x000f0000 +#define CPUID_EXT_FAMILY 0x0ff00000 +#define AMD64_CPU_MODEL(id) \ + ((((id) & CPUID_MODEL) >> 4) | \ + (((id) & CPUID_EXT_MODEL) >> 12)) +#define AMD64_CPU_FAMILY(id) \ + ((((id) & CPUID_FAMILY) >> 8) + \ + (((id) & CPUID_EXT_FAMILY) >> 20)) + +/* * CPUID instruction 1 ebx info */ #define CPUID_BRAND_INDEX 0x000000ff Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Wed Jan 21 21:24:36 2009 (r187571) +++ stable/7/sys/i386/i386/identcpu.c Wed Jan 21 21:28:21 2009 (r187572) @@ -842,10 +842,17 @@ printcpuinfo(void) "AuthenticAMD") == 0) cpu_feature &= ~CPUID_HTT; + /* + * If this CPU supports P-state invariant TSC then + * mention the capability. + */ if (!tsc_is_invariant && - (amd_pminfo & AMDPM_TSC_INVARIANT)) { + (strcmp(cpu_vendor, "AuthenticAMD") == 0 && + ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 || + I386_CPU_FAMILY(cpu_id) >= 0x10 || + cpu_id == 0x60fb2))) { tsc_is_invariant = 1; - printf("\n P-state invariant TSC"); + printf("\n TSC: P-state invariant"); } /* Modified: stable/7/sys/i386/include/specialreg.h ============================================================================== --- stable/7/sys/i386/include/specialreg.h Wed Jan 21 21:24:36 2009 (r187571) +++ stable/7/sys/i386/include/specialreg.h Wed Jan 21 21:28:21 2009 (r187572) @@ -150,6 +150,23 @@ #define AMDID2_PREFETCH 0x00000100 /* + * CPUID instruction 1 eax info + */ +#define CPUID_STEPPING 0x0000000f +#define CPUID_MODEL 0x000000f0 +#define CPUID_FAMILY 0x00000f00 +#define CPUID_EXT_MODEL 0x000f0000 +#define CPUID_EXT_FAMILY 0x0ff00000 +#define I386_CPU_MODEL(id) \ + ((((id) & CPUID_MODEL) >> 4) | \ + ((((id) & CPUID_FAMILY) >= 0x600) ? \ + (((id) & CPUID_EXT_MODEL) >> 12) : 0)) +#define I386_CPU_FAMILY(id) \ + ((((id) & CPUID_FAMILY) >> 8) + \ + ((((id) & CPUID_FAMILY) == 0xf00) ? \ + (((id) & CPUID_EXT_FAMILY) >> 20) : 0)) + +/* * CPUID instruction 1 ebx info */ #define CPUID_BRAND_INDEX 0x000000ff From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 21:31:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D14121065678; Wed, 21 Jan 2009 21:31:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5218FC1A; Wed, 21 Jan 2009 21:31:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LLVi2s091993; Wed, 21 Jan 2009 21:31:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LLViIo091992; Wed, 21 Jan 2009 21:31:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901212131.n0LLViIo091992@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 21 Jan 2009 21:31:44 +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: r187574 - in stable/7/sys: . contrib/pf dev/acpica dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 21:31:46 -0000 Author: jkim Date: Wed Jan 21 21:31:44 2009 New Revision: 187574 URL: http://svn.freebsd.org/changeset/base/187574 Log: MFC: Make sure legacy replacement route is turned off when enbling HPET. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/acpica/acpi_hpet.c stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_hpet.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_hpet.c Wed Jan 21 21:29:00 2009 (r187573) +++ stable/7/sys/dev/acpica/acpi_hpet.c Wed Jan 21 21:31:44 2009 (r187574) @@ -83,7 +83,9 @@ hpet_enable(struct acpi_hpet_softc *sc) uint32_t val; val = bus_read_4(sc->mem_res, HPET_CONFIG); - bus_write_4(sc->mem_res, HPET_CONFIG, val | HPET_CNF_ENABLE); + val &= ~HPET_CNF_LEG_RT; + val |= HPET_CNF_ENABLE; + bus_write_4(sc->mem_res, HPET_CONFIG, val); } static void @@ -92,7 +94,8 @@ hpet_disable(struct acpi_hpet_softc *sc) uint32_t val; val = bus_read_4(sc->mem_res, HPET_CONFIG); - bus_write_4(sc->mem_res, HPET_CONFIG, val & ~HPET_CNF_ENABLE); + val &= ~HPET_CNF_ENABLE; + bus_write_4(sc->mem_res, HPET_CONFIG, val); } /* Discover the HPET via the ACPI table of the same name. */ From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 21:48:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3376F106566B; Wed, 21 Jan 2009 21:48:47 +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 21E928FC1A; Wed, 21 Jan 2009 21:48:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LLmlhj092328; Wed, 21 Jan 2009 21:48:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LLmlh0092327; Wed, 21 Jan 2009 21:48:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901212148.n0LLmlh0092327@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 21:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187575 - stable/6/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 21:48:48 -0000 Author: jhb Date: Wed Jan 21 21:48:46 2009 New Revision: 187575 URL: http://svn.freebsd.org/changeset/base/187575 Log: Fix build. Pointy hat to: jhb Modified: stable/6/sys/kern/vfs_syscalls.c Modified: stable/6/sys/kern/vfs_syscalls.c ============================================================================== --- stable/6/sys/kern/vfs_syscalls.c Wed Jan 21 21:31:44 2009 (r187574) +++ stable/6/sys/kern/vfs_syscalls.c Wed Jan 21 21:48:46 2009 (r187575) @@ -3712,7 +3712,7 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG(fd, fd); - if (uap->count > INT_MAX) + if (count > INT_MAX) return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); From owner-svn-src-stable@FreeBSD.ORG Wed Jan 21 23:10:43 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C9FE10656C5; Wed, 21 Jan 2009 23:10:43 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 611F18FC1A; Wed, 21 Jan 2009 23:10:43 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LNAhTK093992; Wed, 21 Jan 2009 23:10:43 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LNAhoS093991; Wed, 21 Jan 2009 23:10:43 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901212310.n0LNAhoS093991@svn.freebsd.org> From: Nick Hibma Date: Wed, 21 Jan 2009 23:10: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: r187577 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 23:10:44 -0000 Author: n_hibma Date: Wed Jan 21 23:10:43 2009 New Revision: 187577 URL: http://svn.freebsd.org/changeset/base/187577 Log: Sync this file with HEAD r183874. - Remove a redundant MOD_LOAD function - Reduce the attach priority for the attach function to give other drivers, like the to be committed u3g driver a better chance at attaching to the 3G devices with a ZeroCD / TruInstall mass storage device. Modified: stable/7/sys/dev/usb/umass.c Modified: stable/7/sys/dev/usb/umass.c ============================================================================== --- stable/7/sys/dev/usb/umass.c Wed Jan 21 23:10:06 2009 (r187576) +++ stable/7/sys/dev/usb/umass.c Wed Jan 21 23:10:43 2009 (r187577) @@ -574,6 +574,10 @@ static struct umass_devdescr_t umass_dev UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_INQUIRY }, + { USB_VENDOR_NETAC, USB_PRODUCT_NETAC_ONLYDISK, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + IGNORE_RESIDUE + }, { USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_CLIK_40, RID_WILDCARD, UMASS_PROTO_ATAPI, NO_INQUIRY @@ -606,6 +610,10 @@ static struct umass_devdescr_t umass_dev UMASS_PROTO_SCSI, NO_QUIRKS }, + { USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_SDS_HOTFIND_D, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + NO_GETMAXLUN | NO_SYNCHRONIZE_CACHE + }, { USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_MDCFE_B_CF_READER, RID_WILDCARD, UMASS_PROTO_SCSI, NO_QUIRKS @@ -1264,7 +1272,7 @@ umass_match_proto(struct umass_softc *sc return(UMATCH_NONE); } - return(UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO); + return(UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO); } static int @@ -1276,6 +1284,7 @@ umass_match(device_t self) sc->sc_dev = self; if (uaa->iface == NULL) return(UMATCH_NONE); + return(umass_match_proto(sc, uaa->iface, uaa->device)); } @@ -3276,17 +3285,6 @@ umass_cam_quirk_cb(struct umass_softc *s xpt_done(ccb); } -static int -umass_driver_load(module_t mod, int what, void *arg) -{ - switch (what) { - case MOD_UNLOAD: - case MOD_LOAD: - default: - return(usbd_driver_load(mod, what, arg)); - } -} - /* * SCSI specific functions */ @@ -3526,7 +3524,7 @@ umass_atapi_transform(struct umass_softc /* (even the comment is missing) */ -DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, umass_driver_load, 0); +DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, usbd_driver_load, 0); From owner-svn-src-stable@FreeBSD.ORG Thu Jan 22 09:39:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F385C1065672; Thu, 22 Jan 2009 09:39:11 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E16C58FC2F; Thu, 22 Jan 2009 09:39:11 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0M9dBSl006566; Thu, 22 Jan 2009 09:39:11 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0M9dBqx006565; Thu, 22 Jan 2009 09:39:11 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901220939.n0M9dBqx006565@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 22 Jan 2009 09:39: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: r187584 - stable/7/usr.bin/netstat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 09:39:12 -0000 Author: maxim Date: Thu Jan 22 09:39:11 2009 New Revision: 187584 URL: http://svn.freebsd.org/changeset/base/187584 Log: MFC r187134: respect -ss flags for icmp6 "histogram of error messages" section. Modified: stable/7/usr.bin/netstat/inet6.c Modified: stable/7/usr.bin/netstat/inet6.c ============================================================================== --- stable/7/usr.bin/netstat/inet6.c Thu Jan 22 08:29:39 2009 (r187583) +++ stable/7/usr.bin/netstat/inet6.c Thu Jan 22 09:39:11 2009 (r187584) @@ -866,7 +866,8 @@ icmp6_stats(u_long off, const char *name #define p(f, m) if (icmp6stat.f || sflag <= 1) \ printf(m, (uintmax_t)icmp6stat.f, plural(icmp6stat.f)) -#define p_5(f, m) printf(m, (uintmax_t)icmp6stat.f) +#define p_5(f, m) if (icmp6stat.f || sflag <= 1) \ + printf(m, (uintmax_t)icmp6stat.f) p(icp6s_error, "\t%ju call%s to icmp6_error\n"); p(icp6s_canterror, From owner-svn-src-stable@FreeBSD.ORG Thu Jan 22 15:52:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3EFC1065673; Thu, 22 Jan 2009 15:52:13 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 992BA8FC1E; Thu, 22 Jan 2009 15:52:13 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MFqD4m016337; Thu, 22 Jan 2009 15:52:13 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MFqDSB016336; Thu, 22 Jan 2009 15:52:13 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200901221552.n0MFqDSB016336@svn.freebsd.org> From: Nick Hibma Date: Thu, 22 Jan 2009 15:52:13 +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: r187593 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 15:52:14 -0000 Author: n_hibma Date: Thu Jan 22 15:52:13 2009 New Revision: 187593 URL: http://svn.freebsd.org/changeset/base/187593 Log: MFC the IDs for the u3g MFC across. This fixes the build breakage introduced by me yesterday evening. Modified: stable/7/sys/dev/usb/usbdevs Modified: stable/7/sys/dev/usb/usbdevs ============================================================================== --- stable/7/sys/dev/usb/usbdevs Thu Jan 22 15:36:11 2009 (r187592) +++ stable/7/sys/dev/usb/usbdevs Thu Jan 22 15:52:13 2009 (r187593) @@ -608,6 +608,7 @@ vendor GLOBALSUN 0x16ab Global Sun Techn vendor ANYDATA 0x16d5 AnyDATA Corporation vendor JABLOTRON 0x16d6 Jablotron vendor CMOTECH 0x16d8 CMOTECH Co., Ltd. +vendor AXESSTEL 0x1726 Axesstel Co., Ltd. vendor LINKSYS4 0x1737 Linksys vendor SENAO 0x1740 Senao vendor METAGEEK 0x1781 MetaGeek @@ -829,6 +830,7 @@ product ANCHOR EZLINK 0x2720 EZLINK /* AnyData products */ product ANYDATA ADU_E100X 0x6501 CDMA 2000 1xRTT/EV-DO USB Modem +product ANYDATA ADU_500A 0x6502 CDMA 2000 EV-DO USB Modem /* AOX, Inc. products */ product AOX USB101 0x0008 Ethernet @@ -906,6 +908,9 @@ product ATMEL AT76C505A 0x7614 AT76c505 /* Avision products */ product AVISION 1200U 0x0268 1200U scanner +/* Axesstel products */ +product AXESSTEL DATAMODEM 0x1000 Data Modem + /* Baltech products */ product BALTECH CARDREADER 0x9999 Card reader @@ -1009,9 +1014,11 @@ product CISCOLINKSYS WUSB54GR 0x0023 WUS product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G /* CMOTECH products */ -product CMOTECH CNU510 0x5141 CMOTECH CDMA Technologies USB modem +product CMOTECH XSSTICKDISK 0xf000 XSStick (disk mode) +product CMOTECH CNU510 0x5141 CDMA Technologies USB modem product CMOTECH CNU550 0x5543 CDMA 2000 1xRTT/1xEVDO USB modem -product CMOTECH CDMA_MODEM1 0x6280 CMOTECH CDMA Technologies USB modem +product CMOTECH XSSTICKW12 0x6006 4G Systems XSStick W12 +product CMOTECH CDMA_MODEM1 0x6280 CDMA Technologies USB modem /* Compaq products */ product COMPAQ IPAQPOCKETPC 0x0003 iPAQ PocketPC @@ -1086,6 +1093,7 @@ product DALLAS J6502 0x4201 J-6502 spea product DELL PORT 0x0058 Port Replicator product DELL BC02 0x8000 BC02 Bluetooth USB Adapter product DELL TM350 0x8103 TrueMobile 350 Bluetooth USB Adapter +product DELL U740 0x8135 Dell U740 CDMA /* Delorme Paublishing products */ product DELORME EARTHMATE 0x0100 Earthmate GPS @@ -1403,6 +1411,7 @@ product HTC SMARTPHONE 0x0a51 SmartPhon /* HUAWEI products */ product HUAWEI MOBILE 0x1001 Huawei Mobile +product HUAWEI E220 0x1003 Huawei HSDPA modem /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g @@ -1758,6 +1767,7 @@ product NEODIO ND5010 0x5010 Multi-form /* Netac products */ product NETAC CF_CARD 0x1060 USB-CF-Card +product NETAC ONLYDISK 0x0003 OnlyDisk /* NetChip Technology Products */ product NETCHIP TURBOCONNECT 0x1080 Turbo-Connect @@ -1788,13 +1798,21 @@ product NOVATECH NV902 0x9020 NovaTech product NOVATECH RT2573 0x9021 RT2573 /* Novatel Wireless products */ +product NOVATEL V640 0x1100 Merlin V620 product NOVATEL CDMA_MODEM 0x1110 Novatel Wireless Merlin CDMA product NOVATEL V620 0x1110 Merlin V620 -product NOVATEL V720 0x1130 Merlin V720 product NOVATEL V740 0x1120 Merlin V740 +product NOVATEL V720 0x1130 Merlin V720 product NOVATEL U740 0x1400 Merlin U740 +product NOVATEL U740_2 0x1410 Merlin U740 +product NOVATEL U870 0x1420 Merlin U870 +product NOVATEL XU870 0x1430 Merlin XU870 +product NOVATEL X950D 0x1450 Merlin X950D +product NOVATEL ES620 0x2100 ES620 CDMA product NOVATEL U720 0x2110 Merlin U720 product NOVATEL U727 0x4100 Merlin U727 CDMA +product NOVATEL MC950D 0x4400 Novatel MC950D HSUPA +product NOVATEL ZEROCD 0x5010 Novatel ZeroCD product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver /* Merlin products */ @@ -1809,6 +1827,7 @@ product OMNIVISION OV511 0x0511 OV511 Ca product OMNIVISION OV511PLUS 0xa511 OV511+ Camera /* OnSpec Electronic, Inc. */ +product ONSPEC SDS_HOTFIND_D 0x0400 SDS-infrared.com Hotfind-D Infrared Camera product ONSPEC MDCFE_B_CF_READER 0xa000 MDCFE-B USB CF Reader product ONSPEC CFMS_RW 0xa001 SIIG/Datafab Memory Stick+CF Reader/Writer product ONSPEC READER 0xa003 Datafab-based Reader @@ -1819,11 +1838,15 @@ product ONSPEC CFSM_COMBO 0xa109 USB to product ONSPEC UCF100 0xa400 FlashLink UCF-100 CompactFlash Reader product ONSPEC2 IMAGEMATE_SDDR55 0xa103 ImageMate SDDR55 + /* Option products */ product OPTION VODAFONEMC3G 0x5000 Vodafone Mobile Connect 3G datacard product OPTION GT3G 0x6000 GlobeTrotter 3G datacard product OPTION GT3GQUAD 0x6300 GlobeTrotter 3G QUAD datacard product OPTION GT3GPLUS 0x6600 GlobeTrotter 3G+ datacard +product OPTION GTMAX36 0x6701 GlobeTrotter Max 3.6 Modem +product OPTION GTMAXHSUPA 0x7001 GlobeTrotter HSUPA + /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface @@ -1946,6 +1969,7 @@ product QUALCOMM CDMA_MSM 0x6000 CDMA Te product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem +product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage /* Qtronix products */ product QTRONIX 980N 0x2011 Scorpion-980N keyboard @@ -2056,9 +2080,32 @@ product SIEMENS3 X75 0x0004 X75 /* Sierra Wireless products */ product SIERRA AIRCARD580 0x0112 Sierra Wireless AirCard 580 +product SIERRA AIRCARD595 0x0019 Sierra Wireless AirCard 595 +product SIERRA AC595U 0x0120 Sierra Wireless AirCard 595U +product SIERRA AC597E 0x0021 Sierra Wireless AirCard 597E +product SIERRA C597 0x0023 Sierra Wireless Compass 597 +product SIERRA AC880 0x6850 Sierra Wireless AirCard 880 +product SIERRA AC881 0x6851 Sierra Wireless AirCard 881 +product SIERRA AC880E 0x6852 Sierra Wireless AirCard 880E +product SIERRA AC881E 0x6853 Sierra Wireless AirCard 881E +product SIERRA AC880U 0x6855 Sierra Wireless AirCard 880U +product SIERRA AC881U 0x6856 Sierra Wireless AirCard 881U +product SIERRA EM5625 0x0017 EM5625 product SIERRA MC5720 0x0218 MC5720 Wireless Modem +product SIERRA MC5720_2 0x0018 MC5720 +product SIERRA MC5725 0x0020 MC5725 +product SIERRA MINI5725 0x0220 Sierra Wireless miniPCI 5275 +product SIERRA MC8755_2 0x6802 MC8755 +product SIERRA MC8765 0x6803 MC8765 +product SIERRA MC8755 0x6804 MC8755 product SIERRA AC875U 0x6812 AC875U HSDPA USB Modem product SIERRA MC8755_3 0x6813 MC8755 HSDPA +product SIERRA MC8775_2 0x6815 MC8775 +product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA +product SIERRA MC8780 0x6832 MC8780 +product SIERRA MC8781 0x6833 MC8781 +product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer + /* Sigmatel products */ product SIGMATEL I_BEAD100 0x8008 i-Bead 100 MP3 Player From owner-svn-src-stable@FreeBSD.ORG Thu Jan 22 18:43:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2A2106566C; Thu, 22 Jan 2009 18:43:47 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 385AD8FC0C; Thu, 22 Jan 2009 18:43:47 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MIhlYN019602; Thu, 22 Jan 2009 18:43:47 GMT (envelope-from schweikh@svn.freebsd.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MIhlkB019601; Thu, 22 Jan 2009 18:43:47 GMT (envelope-from schweikh@svn.freebsd.org) Message-Id: <200901221843.n0MIhlkB019601@svn.freebsd.org> From: Jens Schweikhardt Date: Thu, 22 Jan 2009 18:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187595 - stable/7/share/man/man7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 18:43:47 -0000 Author: schweikh Date: Thu Jan 22 18:43:46 2009 New Revision: 187595 URL: http://svn.freebsd.org/changeset/base/187595 Log: MFC: Correct typo. PR: docs/129820 Submitted by: Marius Korsmo Modified: stable/7/share/man/man7/ports.7 Modified: stable/7/share/man/man7/ports.7 ============================================================================== --- stable/7/share/man/man7/ports.7 Thu Jan 22 17:06:33 2009 (r187594) +++ stable/7/share/man/man7/ports.7 Thu Jan 22 18:43:46 2009 (r187595) @@ -322,7 +322,7 @@ To find ports that contain in either of the name, path, info fields, ignore the rest of the record. .Pp -By default the search is not case-nsensitive. +By default the search is not case-sensitive. In order to make it case-sensitive you can use the .Va icase variable: From owner-svn-src-stable@FreeBSD.ORG Thu Jan 22 18:45:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A756106568B; Thu, 22 Jan 2009 18:45:12 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EACB18FC35; Thu, 22 Jan 2009 18:45:11 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MIjB9r019687; Thu, 22 Jan 2009 18:45:11 GMT (envelope-from schweikh@svn.freebsd.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MIjBp5019686; Thu, 22 Jan 2009 18:45:11 GMT (envelope-from schweikh@svn.freebsd.org) Message-Id: <200901221845.n0MIjBp5019686@svn.freebsd.org> From: Jens Schweikhardt Date: Thu, 22 Jan 2009 18:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187596 - stable/6/share/man/man7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 18:45:14 -0000 Author: schweikh Date: Thu Jan 22 18:45:11 2009 New Revision: 187596 URL: http://svn.freebsd.org/changeset/base/187596 Log: MFC: Correct typo. PR: docs/129820 Submitted by: Marius Korsmo Modified: stable/6/share/man/man7/ports.7 Modified: stable/6/share/man/man7/ports.7 ============================================================================== --- stable/6/share/man/man7/ports.7 Thu Jan 22 18:43:46 2009 (r187595) +++ stable/6/share/man/man7/ports.7 Thu Jan 22 18:45:11 2009 (r187596) @@ -320,7 +320,7 @@ To find ports that contain in either of the name, path, info fields, ignore the rest of the record. .Pp -By default the search is not case-nsensitive. +By default the search is not case-sensitive. In order to make it case-sensitive you can use the .Va icase variable: From owner-svn-src-stable@FreeBSD.ORG Thu Jan 22 23:34:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32381065672; Thu, 22 Jan 2009 23:34:55 +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 AB8278FC17; Thu, 22 Jan 2009 23:34:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MNYtvB025399; Thu, 22 Jan 2009 23:34:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MNYt7r025398; Thu, 22 Jan 2009 23:34:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901222334.n0MNYt7r025398@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 22 Jan 2009 23:34:55 +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: r187605 - in stable/7/sys: . compat/freebsd32 contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 23:34:56 -0000 Author: bz Date: Thu Jan 22 23:34:55 2009 New Revision: 187605 URL: http://svn.freebsd.org/changeset/base/187605 Log: MFC: r185898 Add 32-bit compat support for AIO. As I had comitted this as a fix for r185878 in HEAD, it seems this was missed with the MFC at r187559. Unbreak the build. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/freebsd32_signal.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_signal.h Thu Jan 22 23:25:28 2009 (r187604) +++ stable/7/sys/compat/freebsd32/freebsd32_signal.h Thu Jan 22 23:34:55 2009 (r187605) @@ -36,6 +36,9 @@ struct sigaltstack32 { }; union sigval32 { + int sival_int; + u_int32_t sival_ptr; + /* 6.0 compatibility */ int sigval_int; u_int32_t sigval_ptr; }; @@ -70,6 +73,29 @@ struct siginfo32 { } _reason; }; +struct osigevent32 { + int sigev_notify; /* Notification type */ + union { + int __sigev_signo; /* Signal number */ + int __sigev_notify_kqueue; + } __sigev_u; + union sigval32 sigev_value; /* Signal value */ +}; + +struct sigevent32 { + int sigev_notify; /* Notification type */ + int sigev_signo; /* Signal number */ + union sigval32 sigev_value; /* Signal value */ + union { + __lwpid_t _threadid; + struct { + uint32_t _function; + uint32_t _attribute; + } _sigev_thread; + uint32_t __spare__[8]; + } _sigev_un; +}; + void siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 08:12:50 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFC7B106566B; Fri, 23 Jan 2009 08:12:50 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD03A8FC18; Fri, 23 Jan 2009 08:12:50 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0N8CoRx035561; Fri, 23 Jan 2009 08:12:50 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0N8Couw035560; Fri, 23 Jan 2009 08:12:50 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901230812.n0N8Couw035560@svn.freebsd.org> From: Maxim Konovalov Date: Fri, 23 Jan 2009 08:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187622 - stable/7/share/man/man9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 08:12:51 -0000 Author: maxim Date: Fri Jan 23 08:12:50 2009 New Revision: 187622 URL: http://svn.freebsd.org/changeset/base/187622 Log: MFC r177259: add missing .El. Modified: stable/7/share/man/man9/rwlock.9 Modified: stable/7/share/man/man9/rwlock.9 ============================================================================== --- stable/7/share/man/man9/rwlock.9 Fri Jan 23 07:48:28 2009 (r187621) +++ stable/7/share/man/man9/rwlock.9 Fri Jan 23 08:12:50 2009 (r187622) @@ -153,6 +153,7 @@ Do not log any operations for this lock .It Dv RW_RECURSE Allow threads to recursively acquire exclusive locks for .Fa rw . +.El .It Fn rw_rlock "struct rwlock *rw" Lock .Fa rw From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 08:33:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A183106564A; Fri, 23 Jan 2009 08:33:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 661F28FC22; Fri, 23 Jan 2009 08:33:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0N8XF6i036065; Fri, 23 Jan 2009 08:33:15 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0N8XFlU036064; Fri, 23 Jan 2009 08:33:15 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901230833.n0N8XFlU036064@svn.freebsd.org> From: Maxim Konovalov Date: Fri, 23 Jan 2009 08:33:15 +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: r187624 - stable/7/sbin/ifconfig X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 08:33:16 -0000 Author: maxim Date: Fri Jan 23 08:33:15 2009 New Revision: 187624 URL: http://svn.freebsd.org/changeset/base/187624 Log: MFC r183616 manually: fix typoes. Fix one more typo there is no in HEAD. Modified: stable/7/sbin/ifconfig/ifconfig.8 Modified: stable/7/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/7/sbin/ifconfig/ifconfig.8 Fri Jan 23 08:18:58 2009 (r187623) +++ stable/7/sbin/ifconfig/ifconfig.8 Fri Jan 23 08:33:15 2009 (r187624) @@ -901,7 +901,7 @@ The .Fl v flag may be used to display long SSIDs. .Fl v -also causes received information elements to be displayed symbolicaly. +also causes received information elements to be displayed symbolically. This information may be updated automatically by the adaptor and/or with a .Cm scan @@ -945,7 +945,7 @@ QoS encapsulation is enabled only when W By default information elements received from associated stations are displayed in a short form; the .Fl v -flag causes this information to be displayed symbolicaly. +flag causes this information to be displayed symbolically. .It Cm list wme Display the current parameters to use when operating in WME mode. When WME mode is enabled for an adaptor this information will be @@ -1177,7 +1177,7 @@ Possible elements are: .Cm HT (station supports 802.11n/HT communication), .Cm ATH -(station supoprts Atheros protocol extensions), +(station supports Atheros protocol extensions), .Cm VEN (station supports unknown vendor-specific extensions). If the From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 08:37:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B2A106564A; Fri, 23 Jan 2009 08:37:26 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BEBB8FC16; Fri, 23 Jan 2009 08:37:26 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0N8bQNj036189; Fri, 23 Jan 2009 08:37:26 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0N8bQJn036188; Fri, 23 Jan 2009 08:37:26 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901230837.n0N8bQJn036188@svn.freebsd.org> From: Maxim Konovalov Date: Fri, 23 Jan 2009 08:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187625 - stable/7/sbin/ifconfig X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 08:37:27 -0000 Author: maxim Date: Fri Jan 23 08:37:26 2009 New Revision: 187625 URL: http://svn.freebsd.org/changeset/base/187625 Log: Record r183616 MFC. Modified: stable/7/sbin/ifconfig/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 11:54:32 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451101065678; Fri, 23 Jan 2009 11:54:32 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 338708FC25; Fri, 23 Jan 2009 11:54:32 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0NBsWRg042146; Fri, 23 Jan 2009 11:54:32 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0NBsWaP042144; Fri, 23 Jan 2009 11:54:32 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901231154.n0NBsWaP042144@svn.freebsd.org> From: Giorgos Keramidas Date: Fri, 23 Jan 2009 11: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: r187628 - stable/7/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 11:54:33 -0000 Author: keramida (doc committer) Date: Fri Jan 23 11:54:31 2009 New Revision: 187628 URL: http://svn.freebsd.org/changeset/base/187628 Log: MFC 173702 from /head Express in the usage() and SYNOPSIS that -F depends on -s, and that -f and -i are exclusive. This reduces diffs of stable/7 from /head, in preparation for more MFCs. Modified: stable/7/bin/ln/ (props changed) stable/7/bin/ln/ln.1 stable/7/bin/ln/ln.c Modified: stable/7/bin/ln/ln.1 ============================================================================== --- stable/7/bin/ln/ln.1 Fri Jan 23 11:39:00 2009 (r187627) +++ stable/7/bin/ln/ln.1 Fri Jan 23 11:54:31 2009 (r187628) @@ -41,11 +41,15 @@ .Nd make links .Sh SYNOPSIS .Nm -.Op Fl Ffhinsv +.Op Fl s Op Fl F +.Op Fl f | i +.Op Fl hnv .Ar source_file .Op Ar target_file .Nm -.Op Fl Ffhinsv +.Op Fl s Op Fl F +.Op Fl f | i +.Op Fl hnv .Ar source_file ... .Ar target_dir .Nm link Modified: stable/7/bin/ln/ln.c ============================================================================== --- stable/7/bin/ln/ln.c Fri Jan 23 11:39:00 2009 (r187627) +++ stable/7/bin/ln/ln.c Fri Jan 23 11:54:31 2009 (r187628) @@ -254,8 +254,8 @@ void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: ln [-Ffhinsv] source_file [target_file]", - " ln [-Ffhinsv] source_file ... target_dir", + "usage: ln [-s [-F]] [-f | -i] [-hnv] source_file [target_file]", + " ln [-s [-F]] [-f | -i] [-hnv] source_file ... target_dir", " link source_file target_file"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 11:58:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505AE1065673; Fri, 23 Jan 2009 11:58:25 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DDED8FC1E; Fri, 23 Jan 2009 11:58:25 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0NBwPWR042279; Fri, 23 Jan 2009 11:58:25 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0NBwPTG042277; Fri, 23 Jan 2009 11:58:25 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901231158.n0NBwPTG042277@svn.freebsd.org> From: Giorgos Keramidas Date: Fri, 23 Jan 2009 11:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187629 - stable/7/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 11:58:26 -0000 Author: keramida (doc committer) Date: Fri Jan 23 11:58:24 2009 New Revision: 187629 URL: http://svn.freebsd.org/changeset/base/187629 Log: MFC 179603 and 179636 from /head Add a -w warning flag to ln(1). When the -w option is enabled, ln(1) checks to see if the source of a symlink, i.e. the file it should point to actually exists. The default is the old ln behavior, that does not check, to avoid surprising people who may be using ln(1) in scripts or other non-interactive places. PR: bin/7265 Submitted by: Joel Ray Holveck, detlev!joelh at mail.camalott.com Modified: stable/7/bin/ln/ (props changed) stable/7/bin/ln/ln.1 stable/7/bin/ln/ln.c Modified: stable/7/bin/ln/ln.1 ============================================================================== --- stable/7/bin/ln/ln.1 Fri Jan 23 11:54:31 2009 (r187628) +++ stable/7/bin/ln/ln.1 Fri Jan 23 11:58:24 2009 (r187629) @@ -32,7 +32,7 @@ .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd February 14, 2006 +.Dd June 6, 2008 .Dt LN 1 .Os .Sh NAME @@ -42,13 +42,13 @@ .Sh SYNOPSIS .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file .Op Ar target_file .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file ... .Ar target_dir @@ -79,6 +79,8 @@ then unlink it so that the link may occu .Fl f option overrides any previous .Fl i +and +.Fl w options.) .It Fl F If the target file already exists and is a directory, then remove it @@ -134,6 +136,8 @@ Create a symbolic link. Cause .Nm to be verbose, showing files as they are processed. +.It Fl w +Warn if the source of a symbolic link does not currently exist. .El .Pp By default, @@ -194,9 +198,10 @@ operation using the two passed arguments The .Fl h , .Fl i , -.Fl n -and +.Fl n , .Fl v +and +.Fl w options are non-standard and their use in scripts is not recommended. They are provided solely for compatibility with other .Nm Modified: stable/7/bin/ln/ln.c ============================================================================== --- stable/7/bin/ln/ln.c Fri Jan 23 11:54:31 2009 (r187628) +++ stable/7/bin/ln/ln.c Fri Jan 23 11:58:24 2009 (r187629) @@ -58,6 +58,8 @@ int hflag; /* Check new name for syml int iflag; /* Interactive mode. */ int sflag; /* Symbolic, not hard, link. */ int vflag; /* Verbose output. */ +int wflag; /* Warn if symlink target does not + * exist, and -f is not enabled. */ /* System link call. */ int (*linkf)(const char *, const char *); char linkch; @@ -92,7 +94,7 @@ main(int argc, char *argv[]) exit(linkit(argv[0], argv[1], 0)); } - while ((ch = getopt(argc, argv, "Ffhinsv")) != -1) + while ((ch = getopt(argc, argv, "Ffhinsvw")) != -1) switch (ch) { case 'F': Fflag = 1; @@ -100,6 +102,7 @@ main(int argc, char *argv[]) case 'f': fflag = 1; iflag = 0; + wflag = 0; break; case 'h': case 'n': @@ -115,6 +118,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -127,8 +133,10 @@ main(int argc, char *argv[]) linkch = sflag ? '-' : '='; if (sflag == 0) Fflag = 0; - if (Fflag == 1 && iflag == 0) + if (Fflag == 1 && iflag == 0) { fflag = 1; + wflag = 0; /* Implied when fflag != 0 */ + } switch(argc) { case 0: @@ -167,6 +175,7 @@ linkit(const char *target, const char *s const char *p; int ch, exists, first; char path[PATH_MAX]; + char wbuf[PATH_MAX]; if (!sflag) { /* If target doesn't exist, quit now. */ @@ -204,6 +213,32 @@ linkit(const char *target, const char *s exists = !lstat(source, &sb); /* + * If the link source doesn't exist, and a symbolic link was + * requested, and -w was specified, give a warning. + */ + if (sflag && wflag) { + if (*source == '/') { + /* Absolute link source. */ + if (stat(source, &sb) != 0) + warn("warning: %s inaccessible", source); + } else { + /* + * Relative symlink source. Try to construct the + * absolute path of the source, by appending `source' + * to the parent directory of the target. + */ + p = strrchr(target, '/'); + if (p != NULL) + p++; + else + p = target; + (void)snprintf(wbuf, sizeof(wbuf), "%.*s%s", + (int)(p - target), target, source); + if (stat(wbuf, &sb) != 0) + warn("warning: %s", source); + } + } + /* * If the file exists, then unlink it forcibly if -f was specified * and interactively if -i was specified. */ From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 12:01:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787061065673; Fri, 23 Jan 2009 12:01:24 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66FB78FC16; Fri, 23 Jan 2009 12:01:24 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0NC1OUe042406; Fri, 23 Jan 2009 12:01:24 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0NC1OaV042405; Fri, 23 Jan 2009 12:01:24 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901231201.n0NC1OaV042405@svn.freebsd.org> From: Giorgos Keramidas Date: Fri, 23 Jan 2009 12:01:24 +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: r187630 - stable/7/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 12:01:25 -0000 Author: keramida (doc committer) Date: Fri Jan 23 12:01:24 2009 New Revision: 187630 URL: http://svn.freebsd.org/changeset/base/187630 Log: MFC 187148 from /head Clean up a bit of confusing language and improve .Nd. PR: 47818 Modified: stable/7/bin/ln/ (props changed) stable/7/bin/ln/ln.1 Modified: stable/7/bin/ln/ln.1 ============================================================================== --- stable/7/bin/ln/ln.1 Fri Jan 23 11:58:24 2009 (r187629) +++ stable/7/bin/ln/ln.1 Fri Jan 23 12:01:24 2009 (r187630) @@ -38,7 +38,7 @@ .Sh NAME .Nm ln , .Nm link -.Nd make links +.Nd link files .Sh SYNOPSIS .Nm .Op Fl s Op Fl F @@ -57,8 +57,13 @@ .Sh DESCRIPTION The .Nm -utility creates a new directory entry (linked file) which has the -same modes as the original file. +utility creates a new directory entry (linked file) for the file name +specified by +.Ar target_file . +The +.Ar target_file +will be created with the same file modes as the +.Ar source_file . It is useful for maintaining multiple copies of a file in many places at once without using up storage for the .Dq copies ; @@ -148,7 +153,7 @@ links. A hard link to a file is indistinguishable from the original directory entry; any changes to a file are effectively independent of the name used to reference the file. -Hard links may not normally refer to directories and may not span file systems. +Directories may not be hardlinked, and hard links may not span file systems. .Pp A symbolic link contains the name of the file to which it is linked. From owner-svn-src-stable@FreeBSD.ORG Fri Jan 23 13:27:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CFA1106568A; Fri, 23 Jan 2009 13:27:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E15C08FC12; Fri, 23 Jan 2009 13:27:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 9074E46B06; Fri, 23 Jan 2009 08:27:46 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0NDRIUR050730; Fri, 23 Jan 2009 08:27:40 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Bjoern A. Zeeb" Date: Fri, 23 Jan 2009 08:15:12 -0500 User-Agent: KMail/1.9.7 References: <200901222334.n0MNYt7r025398@svn.freebsd.org> In-Reply-To: <200901222334.n0MNYt7r025398@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901230815.12490.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 23 Jan 2009 08:27:40 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8895/Fri Jan 23 04:13:42 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r187605 - in stable/7/sys: . compat/freebsd32 contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 13:27:48 -0000 On Thursday 22 January 2009 6:34:55 pm Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Jan 22 23:34:55 2009 > New Revision: 187605 > URL: http://svn.freebsd.org/changeset/base/187605 > > Log: > MFC: r185898 > > Add 32-bit compat support for AIO. > > As I had comitted this as a fix for r185878 in HEAD, it seems > this was missed with the MFC at r187559. Unbreak the build. Yes, sorry. :( -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Sat Jan 24 18:57:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D32501065675; Sat, 24 Jan 2009 18:57:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C03EF8FC1D; Sat, 24 Jan 2009 18:57:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0OIvMw1095941; Sat, 24 Jan 2009 18:57:22 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0OIvMxY095940; Sat, 24 Jan 2009 18:57:22 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901241857.n0OIvMxY095940@svn.freebsd.org> From: Antoine Brodin Date: Sat, 24 Jan 2009 18:57:22 +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: r187673 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2009 18:57:23 -0000 Author: antoine Date: Sat Jan 24 18:57:22 2009 New Revision: 187673 URL: http://svn.freebsd.org/changeset/base/187673 Log: MFC r181137 to stable/7: Remove trailing ';' in BPFD_LOCK_ASSERT macro. MFC after: 1 month X-MFC-to: stable/7, stable/6 has it right Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/net/bpfdesc.h Modified: stable/7/sys/net/bpfdesc.h ============================================================================== --- stable/7/sys/net/bpfdesc.h Sat Jan 24 18:23:19 2009 (r187672) +++ stable/7/sys/net/bpfdesc.h Sat Jan 24 18:57:22 2009 (r187673) @@ -102,7 +102,7 @@ struct bpf_d { #define BPFD_LOCK(bd) mtx_lock(&(bd)->bd_mtx) #define BPFD_UNLOCK(bd) mtx_unlock(&(bd)->bd_mtx) -#define BPFD_LOCK_ASSERT(bd) mtx_assert(&(bd)->bd_mtx, MA_OWNED); +#define BPFD_LOCK_ASSERT(bd) mtx_assert(&(bd)->bd_mtx, MA_OWNED) /* Test whether a BPF is ready for read(). */ #define bpf_ready(bd) \ From owner-svn-src-stable@FreeBSD.ORG Sat Jan 24 19:22:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2842106567A; Sat, 24 Jan 2009 19:22:05 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF4478FC12; Sat, 24 Jan 2009 19:22:05 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0OJM5uh096486; Sat, 24 Jan 2009 19:22:05 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0OJM5He096485; Sat, 24 Jan 2009 19:22:05 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901241922.n0OJM5He096485@svn.freebsd.org> From: Antoine Brodin Date: Sat, 24 Jan 2009 19:22:05 +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: r187674 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2009 19:22:06 -0000 Author: antoine Date: Sat Jan 24 19:22:05 2009 New Revision: 187674 URL: http://svn.freebsd.org/changeset/base/187674 Log: MFC r182047 to stable/7: Remove unused variable nosleepwithlocks. PR: 126609 Submitted by: Mateusz Guzik MFC after: 1 month X-MFC: to stable/7 only, this variable is still used in stable/6 Reviewed by: rwatson Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/vm/uma_core.c Modified: stable/7/sys/vm/uma_core.c ============================================================================== --- stable/7/sys/vm/uma_core.c Sat Jan 24 18:57:22 2009 (r187673) +++ stable/7/sys/vm/uma_core.c Sat Jan 24 19:22:05 2009 (r187674) @@ -249,13 +249,6 @@ void uma_print_stats(void); static int sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS); static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS); -#ifdef WITNESS -static int nosleepwithlocks = 1; -#else -static int nosleepwithlocks = 0; -#endif -SYSCTL_INT(_debug, OID_AUTO, nosleepwithlocks, CTLFLAG_RW, &nosleepwithlocks, - 0, "Convert M_WAITOK to M_NOWAIT to avoid lock-held-across-sleep paths"); SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL); SYSCTL_PROC(_vm, OID_AUTO, zone_count, CTLFLAG_RD|CTLTYPE_INT,