From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 04:08:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EF43BC6; Sun, 24 Nov 2013 04:08:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F343C2C09; Sun, 24 Nov 2013 04:08:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAO48ljX029854; Sun, 24 Nov 2013 04:08:47 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAO48liD029837; Sun, 24 Nov 2013 04:08:47 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311240408.rAO48liD029837@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Nov 2013 04:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258507 - in head/gnu/usr.bin/cc: cc_int libcpp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 04:08:48 -0000 Author: pfg Date: Sun Nov 24 04:08:47 2013 New Revision: 258507 URL: http://svnweb.freebsd.org/changeset/base/258507 Log: gcc: Missing makefile changes for r258501. pointyhat: me Modified: head/gnu/usr.bin/cc/cc_int/Makefile head/gnu/usr.bin/cc/libcpp/Makefile Modified: head/gnu/usr.bin/cc/cc_int/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_int/Makefile Sun Nov 24 00:15:57 2013 (r258506) +++ head/gnu/usr.bin/cc/cc_int/Makefile Sun Nov 24 04:08:47 2013 (r258507) @@ -24,6 +24,7 @@ OBJS-common = \ tree-outof-ssa.o tree-ssa-ccp.o tree-vn.o tree-ssa-uncprop.o \ tree-ssa-dce.o tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o \ tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o \ + tree-ssa-alias-warnings.o \ tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \ tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o \ omp-low.o tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o \ Modified: head/gnu/usr.bin/cc/libcpp/Makefile ============================================================================== --- head/gnu/usr.bin/cc/libcpp/Makefile Sun Nov 24 00:15:57 2013 (r258506) +++ head/gnu/usr.bin/cc/libcpp/Makefile Sun Nov 24 04:08:47 2013 (r258507) @@ -11,9 +11,9 @@ CFLAGS+= -I${.CURDIR} -I. LIB= cpp SRCS= localedir.h -SRCS+= charset.c directives.c errors.c expr.c files.c \ - identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \ - pch.c symtab.c traditional.c +SRCS+= charset.c directives.c directives-only.c errors.c expr.c \ + files.c identifiers.c init.c lex.c line-map.c macro.c \ + mkdeps.c pch.c symtab.c traditional.c INTERNALLIB= WARNS?= 1 From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 04:21:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37D6BE04 for ; Sun, 24 Nov 2013 04:21:55 +0000 (UTC) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) by mx1.freebsd.org (Postfix) with SMTP id D310A2CC2 for ; Sun, 24 Nov 2013 04:21:54 +0000 (UTC) Received: from [98.139.215.142] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 04:16:13 -0000 Received: from [98.139.211.197] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 04:16:13 -0000 Received: from [127.0.0.1] by smtp206.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 04:16:13 -0000 X-Yahoo-Newman-Id: 576745.78756.bm@smtp206.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: qo9tytAVM1myOJXaqNhVYUod38cv6B7PhdZgr9QEVJtx_bC CbL9NQ45Yg6GtdLibAGRYwh4K7oSC7yWBIWppz5dVPNXhKPoNnqfhScLvQV2 ZF81zhVK3i0WoTa5_M7yVEGGvypfY8PnvyrQVuvZ1X2rfi23Ve2vxQ0SrsU7 4ZmU_OCErOFsVkRtcxRQKy2kmTpCze5XQoecWLfuupcR84rv2PJoLJiZ74Qi 0mwKj.a.0O8_5z9hIo3tcIbxe_0YFmPz8IWolQOKxfjVy4kBpQzX.xD2Aals eqoX5K3RAVFF1wVsqYTG55YACYWJLTcEcO9ydtdQomFVaGuokez5IWA6fBxI 2lMT1yBE3afjnnNVU37.GEERoC2134.m9oAVXdn7QnqE56xy6RkGQXcYkeTD ko4qeVhXqjJywAOl2AkTH249faPhkFBQ_FpoSWUKEgHDDcVUepp5hetyJeot vnFSPl97YJXCEyArTyGwcwDAhegT8Tusjs2tI0hVjSQaFTLmFAjcIECs4FJr YsTNMq6ITc6OkJcTpmBsLZ2c6Le2B5ESHGYflhMGp825DhFF3N44EK5Txt16 XTwigKX1d_I4AzLL92JpDAfUtqAbi4MHAGwP5sndBfoqwqLat.itpoR_d1aP 9yOe4DPDFKsVC2tSMSZ5poaUPyz4I X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with ) by smtp206.mail.bf1.yahoo.com with SMTP; 23 Nov 2013 20:16:13 -0800 PST Message-ID: <52917D89.10809@FreeBSD.org> Date: Sat, 23 Nov 2013 23:16:09 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r258507 - in head/gnu/usr.bin/cc: cc_int libcpp References: <201311240408.rAO48liD029837@svn.freebsd.org> In-Reply-To: <201311240408.rAO48liD029837@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 04:21:55 -0000 On 23.11.2013 23:08, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Nov 24 04:08:47 2013 > New Revision: 258507 > URL: http://svnweb.freebsd.org/changeset/base/258507 > > Log: > gcc: Missing makefile changes for r258501. > > pointyhat: me > > Modified: > head/gnu/usr.bin/cc/cc_int/Makefile > head/gnu/usr.bin/cc/libcpp/Makefile > > Seems like I forgot to include the gnu directory in the initial commit. I also forgot to give credit for this report: Thanks to Michael Butler for reporting the breakage. Pedro. From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 20:33:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D1709BD; Sun, 24 Nov 2013 20:33:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C7792441; Sun, 24 Nov 2013 20:33:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOKXdME004535; Sun, 24 Nov 2013 20:33:39 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOKXduC004534; Sun, 24 Nov 2013 20:33:39 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201311242033.rAOKXduC004534@svn.freebsd.org> From: Andrew Turner Date: Sun, 24 Nov 2013 20:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258527 - head/sys/boot/arm/uboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 20:33:39 -0000 Author: andrew Date: Sun Nov 24 20:33:38 2013 New Revision: 258527 URL: http://svnweb.freebsd.org/changeset/base/258527 Log: Recent versions of U-Boot require us to also backup and restore r9 for API calls to work. Modified: head/sys/boot/arm/uboot/start.S Modified: head/sys/boot/arm/uboot/start.S ============================================================================== --- head/sys/boot/arm/uboot/start.S Sun Nov 24 15:03:26 2013 (r258526) +++ head/sys/boot/arm/uboot/start.S Sun Nov 24 20:33:38 2013 (r258527) @@ -39,9 +39,10 @@ _start: ldr ip, =uboot_address str sp, [ip] - /* Save U-Boot's r8 */ + /* Save U-Boot's r8 and r9 */ ldr ip, =saved_regs str r8, [ip, #0] + str r9, [ip, #4] #ifdef _ARM_ARCH_6 mrc p15, 0, r2, c1, c0, 0 @@ -57,21 +58,24 @@ _start: * syscall() */ ENTRY(syscall) - /* Save caller's lr and r8 */ + /* Save caller's lr, r8 and r9 */ ldr ip, =saved_regs - str lr, [ip, #4] str r8, [ip, #8] - /* Restore U-Boot's r8 */ + str r9, [ip, #12] + str lr, [ip, #16] + /* Restore U-Boot's r8 and r9 */ ldr r8, [ip, #0] + ldr r9, [ip, #4] /* Call into U-Boot */ ldr lr, =return_from_syscall ldr ip, =syscall_ptr ldr pc, [ip] return_from_syscall: - /* Restore loader's r8 and lr */ + /* Restore loader's r8, r9 and lr */ ldr ip, =saved_regs + ldr lr, [ip, #16] + ldr r9, [ip, #12] ldr r8, [ip, #8] - ldr lr, [ip, #4] /* Return to caller */ mov pc, lr @@ -90,5 +94,7 @@ uboot_address: saved_regs: .long 0 /* U-Boot's r8 */ + .long 0 /* U-Boot's r9 */ .long 0 /* Loader's r8 */ + .long 0 /* Loader's r9 */ .long 0 /* Loader's lr */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 20:54:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E318F2; Sun, 24 Nov 2013 20:54:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D8A3252F; Sun, 24 Nov 2013 20:54:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOKsqn5011560; Sun, 24 Nov 2013 20:54:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOKsqUV011559; Sun, 24 Nov 2013 20:54:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311242054.rAOKsqUV011559@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Nov 2013 20:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258530 - head/contrib/gcclibs/libcpp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 20:54:52 -0000 Author: pfg Date: Sun Nov 24 20:54:52 2013 New Revision: 258530 URL: http://svnweb.freebsd.org/changeset/base/258530 Log: libcpp: Keep a record of changes from upstream GCC (pre-43). This makes it easier to track the changes in the rare event of the code being distributed without access to version control. MFC after: 3 weeks Added: head/contrib/gcclibs/libcpp/ChangeLog.gcc43 Added: head/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libcpp/ChangeLog.gcc43 Sun Nov 24 20:54:52 2013 (r258530) @@ -0,0 +1,29 @@ +2007-06-05 Joerg Wunsch (r250566) + + PR preprocessor/23479 + * expr.c (cpp_classify_number): Implement 0b-prefixed binary + integer constants. + (append_digit): Likewise. + * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed + binary integer constants. + +2007-05-21 Ian Lance Taylor (r124929) + + * internal.h (struct cpp_reader): Add new fields: + nonexistent_file_hash and nonexistent_file_ob. + * files.c: Include "obstack.h". + (find_file_in_dir): Before trying to open the file, look up the + path name in the hash table of nonexistent files. After failing + to open the file, add the path name to the hash table. + (_cpp_find_file): Cache the results of looking up the file name + starting with the quote and bracket chain heads, if we can. + (nonexistent_file_hash_eq): New static function. + (_cpp_init_files): Initialize pfile->nonexistent_file_hash and + pfile->nonexistent_file_ob. + (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and + pfile->nonexistent_file_ob. + +2006-12-29 Ian Lance Taylor (r120263) + + * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't + look backward at the end of the line unless we saw a backslash. From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 22:01:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90D03D90; Sun, 24 Nov 2013 22:01:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 671FC2844; Sun, 24 Nov 2013 22:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOM1GEN035040; Sun, 24 Nov 2013 22:01:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOM1G6U035037; Sun, 24 Nov 2013 22:01:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201311242201.rAOM1G6U035037@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Nov 2013 22:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258531 - in head/sys/arm: include mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 22:01:16 -0000 Author: gavin Date: Sun Nov 24 22:01:15 2013 New Revision: 258531 URL: http://svnweb.freebsd.org/changeset/base/258531 Log: platform_devmap_init() was renamed initarm_devmap_init() in r257669, update comments to match. Modified: head/sys/arm/include/machdep.h head/sys/arm/mv/mv_machdep.c Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Sun Nov 24 20:54:52 2013 (r258530) +++ head/sys/arm/include/machdep.h Sun Nov 24 22:01:15 2013 (r258531) @@ -41,10 +41,10 @@ vm_offset_t parse_boot_param(struct arm_ * - initarm_early_init() is called very early, after parsing the boot params * and after physical memory has been located and sized. * - * - platform_devmap_init() is called as one of the last steps of early virtual + * - initarm_devmap_init() is called as one of the last steps of early virtual * memory initialization, shortly before the new page tables are installed. * - * - initarm_lastaddr() is called after platform_devmap_init(), and must return + * - initarm_lastaddr() is called after initarm_devmap_init(), and must return * the address of the first byte of unusable KVA space. This allows a * platform to carve out of the top of the KVA space whatever reserves it * needs for things like static device mapping, and this is called to get the Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Sun Nov 24 20:54:52 2013 (r258530) +++ head/sys/arm/mv/mv_machdep.c Sun Nov 24 22:01:15 2013 (r258531) @@ -296,7 +296,7 @@ out: * Supply a default do-nothing implementation of fdt_pci_devmap() via a weak * alias. Many Marvell platforms don't support a PCI interface, but to support * those that do, we end up with a reference to this function below, in - * platform_devmap_init(). If "device pci" appears in the kernel config, the + * initarm_devmap_init(). If "device pci" appears in the kernel config, the * real implementation of this function in dev/fdt/fdt_pci.c overrides the weak * alias defined here. */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 22:45:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04EB171F; Sun, 24 Nov 2013 22:45:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E811D2A1C; Sun, 24 Nov 2013 22:45:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOMjnZQ049938; Sun, 24 Nov 2013 22:45:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOMjnPL049935; Sun, 24 Nov 2013 22:45:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201311242245.rAOMjnPL049935@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 24 Nov 2013 22:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258533 - head/tools/regression/bin/sh/execution X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 22:45:50 -0000 Author: jilles Date: Sun Nov 24 22:45:49 2013 New Revision: 258533 URL: http://svnweb.freebsd.org/changeset/base/258533 Log: sh: Add more tests for the /dev/null; { cat & wait; }' Added: head/tools/regression/bin/sh/execution/bg9.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg9.0 Sun Nov 24 22:45:49 2013 (r258533) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# The redirection does not apply to the background command, and therefore +# does not override the implicit /dev/null; { cat & wait; }' From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 22:53:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EFD4A40; Sun, 24 Nov 2013 22:53:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E28C2A94; Sun, 24 Nov 2013 22:53:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOMroMQ052904; Sun, 24 Nov 2013 22:53:50 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOMrolw052903; Sun, 24 Nov 2013 22:53:50 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201311242253.rAOMrolw052903@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 24 Nov 2013 22:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258534 - head/sys/arm/s3c2xx0 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 22:53:50 -0000 Author: gavin Date: Sun Nov 24 22:53:49 2013 New Revision: 258534 URL: http://svnweb.freebsd.org/changeset/base/258534 Log: Fix typo in comment. Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Nov 24 22:45:49 2013 (r258533) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Nov 24 22:53:49 2013 (r258534) @@ -351,7 +351,7 @@ initarm(struct arm_boot_params *abp) * but since we are boot strapping the addresses used for the read * may have just been remapped and thus the cache could be out * of sync. A re-clean after the switch will cure this. - * After booting there are no gross reloations of the kernel thus + * After booting there are no gross relocations of the kernel thus * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); From owner-svn-src-head@FreeBSD.ORG Sun Nov 24 23:12:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95020D15; Sun, 24 Nov 2013 23:12:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 69FD42B4A; Sun, 24 Nov 2013 23:12:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAONCEO4059912; Sun, 24 Nov 2013 23:12:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAONCDRC059908; Sun, 24 Nov 2013 23:12:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201311242312.rAONCDRC059908@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 24 Nov 2013 23:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258535 - in head: bin/sh tools/regression/bin/sh/execution X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 23:12:14 -0000 Author: jilles Date: Sun Nov 24 23:12:13 2013 New Revision: 258535 URL: http://svnweb.freebsd.org/changeset/base/258535 Log: sh: Make <&0 disable the renamed[i] = EMPTY; + sv->fd0_redirected = fd0_redirected; sv->next = redirlist; redirlist = sv; } for (n = redir ; n ; n = n->nfile.next) { fd = n->nfile.fd; + if (fd == 0) + fd0_redirected = 1; if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) && n->ndup.dupfd == fd) continue; /* redirect from/to same file descriptor */ @@ -134,8 +138,6 @@ redirect(union node *redir, int flags) sv->renamed[fd] = i; INTON; } - if (fd == 0) - fd0_redirected++; openredirect(n, memory); } if (memory[1]) @@ -303,8 +305,6 @@ popredir(void) for (i = 0 ; i < 10 ; i++) { if (rp->renamed[i] != EMPTY) { - if (i == 0) - fd0_redirected--; if (rp->renamed[i] >= 0) { dup2(rp->renamed[i], i); close(rp->renamed[i]); @@ -314,6 +314,7 @@ popredir(void) } } INTOFF; + fd0_redirected = rp->fd0_redirected; redirlist = rp->next; ckfree(rp); INTON; Added: head/tools/regression/bin/sh/execution/bg10.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg10.0 Sun Nov 24 23:12:13 2013 (r258535) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# The redirection overrides the Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C593CB8; Mon, 25 Nov 2013 01:26:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B541213B; Mon, 25 Nov 2013 01:26:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAP1Q83o006027; Mon, 25 Nov 2013 01:26:08 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAP1Q7Vu006022; Mon, 25 Nov 2013 01:26:07 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311250126.rAP1Q7Vu006022@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 01:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258537 - in head: include lib/libc/iconv lib/libiconv_modules/iconv_std X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 01:26:08 -0000 Author: hrs Date: Mon Nov 25 01:26:06 2013 New Revision: 258537 URL: http://svnweb.freebsd.org/changeset/base/258537 Log: Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ when there is an invalid character in the output codeset while it is valid in the input. However, POSIX requires iconv() to perform an implementation-defined conversion on the character. So, Citrus iconv converts such a character to a special character which means it is invalid in the output codeset. This is not a problem in most cases but some software like libxml2 depends on GNU's behavior to determine if a character is output as-is or another form such as a character entity (&#NNN;). Modified: head/include/iconv.h head/lib/libc/iconv/citrus_iconv_local.h head/lib/libc/iconv/iconv.c head/lib/libc/iconv/iconvctl.3 head/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Modified: head/include/iconv.h ============================================================================== --- head/include/iconv.h Sun Nov 24 23:30:23 2013 (r258536) +++ head/include/iconv.h Mon Nov 25 01:26:06 2013 (r258537) @@ -86,6 +86,8 @@ void iconv_set_relocation_prefix(const #define ICONV_SET_DISCARD_ILSEQ 4 #define ICONV_SET_HOOKS 5 #define ICONV_SET_FALLBACKS 6 +#define ICONV_GET_ILSEQ_INVALID 128 +#define ICONV_SET_ILSEQ_INVALID 129 typedef void (*iconv_unicode_char_hook) (unsigned int mbr, void *data); typedef void (*iconv_wide_char_hook) (wchar_t wc, void *data); Modified: head/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- head/lib/libc/iconv/citrus_iconv_local.h Sun Nov 24 23:30:23 2013 (r258536) +++ head/lib/libc/iconv/citrus_iconv_local.h Mon Nov 25 01:26:06 2013 (r258537) @@ -99,6 +99,7 @@ struct _citrus_iconv_shared { char *ci_convname; bool ci_discard_ilseq; struct iconv_hooks *ci_hooks; + bool ci_ilseq_invalid; }; struct _citrus_iconv { Modified: head/lib/libc/iconv/iconv.c ============================================================================== --- head/lib/libc/iconv/iconv.c Sun Nov 24 23:30:23 2013 (r258536) +++ head/lib/libc/iconv/iconv.c Mon Nov 25 01:26:06 2013 (r258537) @@ -298,6 +298,12 @@ __bsd_iconvctl(iconv_t cd, int request, case ICONV_SET_FALLBACKS: errno = EOPNOTSUPP; return (-1); + case ICONV_GET_ILSEQ_INVALID: + *i = cv->cv_shared->ci_ilseq_invalid ? 1 : 0; + return (0); + case ICONV_SET_ILSEQ_INVALID: + cv->cv_shared->ci_ilseq_invalid = *i; + return (0); default: errno = EINVAL; return (-1); Modified: head/lib/libc/iconv/iconvctl.3 ============================================================================== --- head/lib/libc/iconv/iconvctl.3 Sun Nov 24 23:30:23 2013 (r258536) +++ head/lib/libc/iconv/iconvctl.3 Mon Nov 25 01:26:06 2013 (r258537) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2009 +.Dd November 25, 2009 .Dt ICONVCTL 3 .Os .Sh NAME @@ -110,6 +110,31 @@ variable, which is passed to via .Fa argument by its address. +.It ICONV_GET_ILSEQ_INVALID +Determines if a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_ILSEQ_INVALID +Sets whether a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +If +.Fa argument , +which is of +.Ft int * +is set to 1 it will be enabled, +and if +.Fa argument +is set to 0 it will be disabled. .El .\" XXX: fallbacks are unimplemented and trying to set them will always .\" return EOPNOTSUPP but definitions are provided for source-level Modified: head/lib/libiconv_modules/iconv_std/citrus_iconv_std.c ============================================================================== --- head/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Sun Nov 24 23:30:23 2013 (r258536) +++ head/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Mon Nov 25 01:26:06 2013 (r258537) @@ -543,6 +543,16 @@ _citrus_iconv_std_iconv_convert(struct _ ret = do_conv(is, &csid, &idx); if (ret) { if (ret == E_NO_CORRESPONDING_CHAR) { + /* + * GNU iconv returns EILSEQ when no + * corresponding character in the output. + * Some software depends on this behavior + * though this is against POSIX specification. + */ + if (cv->cv_shared->ci_ilseq_invalid != 0) { + ret = EILSEQ; + goto err; + } inval++; szrout = 0; if ((((flags & _CITRUS_ICONV_F_HIDE_INVALID) == 0) && From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 07:39:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1D3AA5C; Mon, 25 Nov 2013 07:39:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEB1520EA; Mon, 25 Nov 2013 07:39:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAP7d4aG032018; Mon, 25 Nov 2013 07:39:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAP7cjIj031887; Mon, 25 Nov 2013 07:38:45 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201311250738.rAP7cjIj031887@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Nov 2013 07:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258541 - in head/sys: amd64/amd64 amd64/linux32 cam/ctl cddl/dev/dtrace cddl/dev/lockstat cddl/dev/sdt compat/linux conf dev/sfxge/common dev/xen/blkback fs/nfs fs/nfsclient i386/i386 ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 07:39:05 -0000 Author: attilio Date: Mon Nov 25 07:38:45 2013 New Revision: 258541 URL: http://svnweb.freebsd.org/changeset/base/258541 Log: - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/trap.c head/sys/amd64/linux32/linux32_dummy.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/dev/dtrace/dtrace_test.c head/sys/cddl/dev/lockstat/lockstat.c head/sys/cddl/dev/sdt/sdt.c head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_fork.c head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_sysctl.c head/sys/compat/linux/linux_time.c head/sys/compat/linux/linux_uid16.c head/sys/compat/linux/linux_util.c head/sys/conf/options head/sys/dev/sfxge/common/efsys.h head/sys/dev/xen/blkback/blkback.c head/sys/fs/nfs/nfs_commonkrpc.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clsubs.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/i386/i386/exception.s head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c head/sys/i386/linux/linux_dummy.c head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_lock.c head/sys/kern/kern_lockstat.c head/sys/kern/kern_malloc.c head/sys/kern/kern_mutex.c head/sys/kern/kern_priv.c head/sys/kern/kern_proc.c head/sys/kern/kern_racct.c head/sys/kern/kern_rmlock.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sdt.c head/sys/kern/kern_sig.c head/sys/kern/kern_sx.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/kern_timeout.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_devstat.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/kern/subr_turnstile.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/mips/mips/exception.S head/sys/mips/mips/trap.c head/sys/modules/crypto/Makefile head/sys/modules/ctl/Makefile head/sys/modules/dtrace/dtrace_test/Makefile head/sys/modules/dtrace/lockstat/Makefile head/sys/modules/dtrace/sdt/Makefile head/sys/modules/ip6_mroute_mod/Makefile head/sys/modules/linux/Makefile head/sys/modules/nfscl/Makefile head/sys/modules/nfsclient/Makefile head/sys/modules/nfscommon/Makefile head/sys/modules/send/Makefile head/sys/net/vnet.c head/sys/netinet/in_kdtrace.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/sctp_dtrace_declare.h head/sys/netinet/sctp_dtrace_define.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/nd6.c head/sys/netinet6/send.c head/sys/netinet6/udp6_usrreq.c head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_krpc.c head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vnops.c head/sys/opencrypto/crypto.c head/sys/opencrypto/deflate.c head/sys/pc98/pc98/machdep.c head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/locore64.S head/sys/powerpc/aim/trap.c head/sys/security/mac/mac_audit.c head/sys/security/mac/mac_cred.c head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_inet.c head/sys/security/mac/mac_net.c head/sys/security/mac/mac_pipe.c head/sys/security/mac/mac_posix_sem.c head/sys/security/mac/mac_posix_shm.c head/sys/security/mac/mac_priv.c head/sys/security/mac/mac_process.c head/sys/security/mac/mac_socket.c head/sys/security/mac/mac_system.c head/sys/security/mac/mac_sysv_msg.c head/sys/security/mac/mac_sysv_sem.c head/sys/security/mac/mac_sysv_shm.c head/sys/security/mac/mac_vfs.c head/sys/sys/mutex.h head/sys/sys/rwlock.h head/sys/sys/sx.h head/sys/tools/vnode_if.awk head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/amd64/amd64/exception.S Mon Nov 25 07:38:45 2013 (r258541) @@ -37,7 +37,6 @@ #include "opt_atpic.h" #include "opt_compat.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/amd64/amd64/machdep.c Mon Nov 25 07:38:45 2013 (r258541) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include "opt_perfmon.h" #include "opt_platform.h" #include "opt_sched.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/amd64/amd64/trap.c Mon Nov 25 07:38:45 2013 (r258541) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_isa.h" #include "opt_kdb.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/amd64/linux32/linux32_dummy.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/cam/ctl/ctl_backend_block.c Mon Nov 25 07:38:45 2013 (r258541) @@ -42,8 +42,6 @@ #include __FBSDID("$FreeBSD$"); -#include - #include #include #include Modified: head/sys/cddl/dev/dtrace/dtrace_test.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_test.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/cddl/dev/dtrace/dtrace_test.c Mon Nov 25 07:38:45 2013 (r258541) @@ -25,8 +25,6 @@ * $FreeBSD$ * */ -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/cddl/dev/lockstat/lockstat.c ============================================================================== --- head/sys/cddl/dev/lockstat/lockstat.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/cddl/dev/lockstat/lockstat.c Mon Nov 25 07:38:45 2013 (r258541) @@ -29,8 +29,6 @@ * Use is subject to license terms. */ -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/cddl/dev/sdt/sdt.c ============================================================================== --- head/sys/cddl/dev/sdt/sdt.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/cddl/dev/sdt/sdt.c Mon Nov 25 07:38:45 2013 (r258541) @@ -39,8 +39,6 @@ * unloaded; in particular, probes may not span multiple kernel modules. */ -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/compat/linux/linux_emul.c ============================================================================== --- head/sys/compat/linux/linux_emul.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_emul.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_fork.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_futex.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex. #endif #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_mib.c ============================================================================== --- head/sys/compat/linux/linux_mib.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_mib.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_misc.c Mon Nov 25 07:38:45 2013 (r258541) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_sysctl.c ============================================================================== --- head/sys/compat/linux/linux_sysctl.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_sysctl.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_time.c ============================================================================== --- head/sys/compat/linux/linux_time.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_time.c Mon Nov 25 07:38:45 2013 (r258541) @@ -36,7 +36,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c #endif #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_uid16.c Mon Nov 25 07:38:45 2013 (r258541) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/compat/linux/linux_util.c ============================================================================== --- head/sys/compat/linux/linux_util.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/compat/linux/linux_util.c Mon Nov 25 07:38:45 2013 (r258541) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/conf/options Mon Nov 25 07:38:45 2013 (r258541) @@ -126,7 +126,7 @@ GEOM_UZIP opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h -KDTRACE_HOOKS opt_kdtrace.h +KDTRACE_HOOKS opt_global.h KSTACK_MAX_PAGES KSTACK_PAGES KTRACE Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/dev/sfxge/common/efsys.h Mon Nov 25 07:38:45 2013 (r258541) @@ -270,7 +270,7 @@ typedef struct __efsys_identifier_s efsy /* PROBE */ -#ifndef KDTRACE_HOOKS +#ifndef DTRACE_PROBE #define EFSYS_PROBE(_name) @@ -295,7 +295,7 @@ typedef struct __efsys_identifier_s efsy _type3, _arg3, _type4, _arg4, _type5, _arg5, \ _type6, _arg6, _type7, _arg7) -#else /* KDTRACE_HOOKS */ +#else /* DTRACE_PROBE */ #define EFSYS_PROBE(_name) \ DTRACE_PROBE(_name) @@ -359,7 +359,7 @@ typedef struct __efsys_identifier_s efsy _type6, _arg6) #endif -#endif /* KDTRACE_HOOKS */ +#endif /* DTRACE_PROBE */ /* DMA */ Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/dev/xen/blkback/blkback.c Mon Nov 25 07:38:45 2013 (r258541) @@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$"); * a FreeBSD domain to other domains. */ -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfs/nfs_commonkrpc.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); * Socket operations for use by nfs */ -#include "opt_kdtrace.h" #include "opt_kgssapi.h" #include "opt_nfs.h" Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,8 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfsclient/nfs_clnode.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,8 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfsclient/nfs_clport.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" -#include "opt_kdtrace.h" #include Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfsclient/nfs_clsubs.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,8 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - /* * These functions support the macros and help fiddle mbuf chains for * the nfs op functions. They do things like create the rpc header and Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Nov 25 07:38:45 2013 (r258541) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); * vnode op calls for Sun NFS version 2, 3 and 4 */ -#include "opt_kdtrace.h" #include "opt_inet.h" #include Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/i386/i386/exception.s Mon Nov 25 07:38:45 2013 (r258541) @@ -37,7 +37,6 @@ #include "opt_apic.h" #include "opt_atpic.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_npx.h" #include Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/i386/i386/machdep.c Mon Nov 25 07:38:45 2013 (r258541) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include "opt_perfmon.h" #include "opt_platform.h" #include "opt_xbox.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/i386/i386/trap.c Mon Nov 25 07:38:45 2013 (r258541) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_isa.h" #include "opt_kdb.h" -#include "opt_kdtrace.h" #include "opt_npx.h" #include "opt_trap.h" Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/i386/linux/linux_dummy.c Mon Nov 25 07:38:45 2013 (r258541) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_clock.c Mon Nov 25 07:38:45 2013 (r258541) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kdb.h" #include "opt_device_polling.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_ntp.h" #include "opt_watchdog.h" Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_clocksource.c Mon Nov 25 07:38:45 2013 (r258541) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_device_polling.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_exec.c Mon Nov 25 07:38:45 2013 (r258541) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_vm.h" Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_exit.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_procdesc.h" Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_fork.c Mon Nov 25 07:38:45 2013 (r258541) @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_kstack_pages.h" #include "opt_procdesc.h" Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_lock.c Mon Nov 25 07:38:45 2013 (r258541) @@ -29,7 +29,6 @@ #include "opt_adaptive_lockmgrs.h" #include "opt_ddb.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include __FBSDID("$FreeBSD$"); Modified: head/sys/kern/kern_lockstat.c ============================================================================== --- head/sys/kern/kern_lockstat.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_lockstat.c Mon Nov 25 07:38:45 2013 (r258541) @@ -32,8 +32,6 @@ * */ -#include "opt_kdtrace.h" - #ifdef KDTRACE_HOOKS #include Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_malloc.c Mon Nov 25 07:38:45 2013 (r258541) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" -#include "opt_kdtrace.h" #include "opt_vm.h" #include Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_mutex.c Mon Nov 25 07:38:45 2013 (r258541) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_global.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_sched.h" #include @@ -249,8 +248,6 @@ __mtx_unlock_flags(volatile uintptr_t *c line); mtx_assert(m, MA_OWNED); - if (m->mtx_recurse == 0) - LOCKSTAT_PROFILE_RELEASE_LOCK(LS_MTX_UNLOCK_RELEASE, m); __mtx_unlock(m, curthread, opts, file, line); curthread->td_locks--; } Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_priv.c Mon Nov 25 07:38:45 2013 (r258541) @@ -28,8 +28,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_kdtrace.h" - #include __FBSDID("$FreeBSD$"); Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_proc.c Mon Nov 25 07:38:45 2013 (r258541) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_kstack_pages.h" #include "opt_stack.h" Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_racct.c Mon Nov 25 07:38:45 2013 (r258541) @@ -32,7 +32,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" #include "opt_sched.h" #include Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_rmlock.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_rwlock.c Mon Nov 25 07:38:45 2013 (r258541) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_no_adaptive_rwlocks.h" #include @@ -322,8 +321,6 @@ _rw_wunlock_cookie(volatile uintptr_t *c WITNESS_UNLOCK(&rw->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("WUNLOCK", &rw->lock_object, 0, rw->rw_recurse, file, line); - if (!rw_recursed(rw)) - LOCKSTAT_PROFILE_RELEASE_LOCK(LS_RW_WUNLOCK_RELEASE, rw); __rw_wunlock(rw, curthread, file, line); curthread->td_locks--; } Modified: head/sys/kern/kern_sdt.c ============================================================================== --- head/sys/kern/kern_sdt.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_sdt.c Mon Nov 25 07:38:45 2013 (r258541) @@ -25,8 +25,6 @@ * $FreeBSD$ */ -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_sig.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_core.h" #include "opt_procdesc.h" Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_sx.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ #include "opt_ddb.h" #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_no_adaptive_sx.h" #include @@ -109,7 +108,6 @@ PMC_SOFT_DECLARE( , , lock, failed); * Returns true if an exclusive lock is recursed. It assumes * curthread currently has an exclusive lock. */ -#define sx_recurse lock_object.lo_data #define sx_recursed(sx) ((sx)->sx_recurse != 0) static void assert_sx(const struct lock_object *lock, int what); @@ -365,7 +363,6 @@ _sx_sunlock(struct sx *sx, const char *f WITNESS_UNLOCK(&sx->lock_object, 0, file, line); LOCK_LOG_LOCK("SUNLOCK", &sx->lock_object, 0, 0, file, line); __sx_sunlock(sx, file, line); - LOCKSTAT_PROFILE_RELEASE_LOCK(LS_SX_SUNLOCK_RELEASE, sx); curthread->td_locks--; } @@ -381,8 +378,6 @@ _sx_xunlock(struct sx *sx, const char *f WITNESS_UNLOCK(&sx->lock_object, LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("XUNLOCK", &sx->lock_object, 0, sx->sx_recurse, file, line); - if (!sx_recursed(sx)) - LOCKSTAT_PROFILE_RELEASE_LOCK(LS_SX_XUNLOCK_RELEASE, sx); __sx_xunlock(sx, curthread, file, line); curthread->td_locks--; } Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_synch.c Mon Nov 25 07:38:45 2013 (r258541) @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_sched.h" Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_thread.c Mon Nov 25 07:38:45 2013 (r258541) @@ -27,7 +27,6 @@ */ #include "opt_witness.h" -#include "opt_kdtrace.h" #include "opt_hwpmc_hooks.h" #include Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/kern_timeout.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_callout_profiling.h" -#include "opt_kdtrace.h" #if defined(__arm__) #include "opt_timer.h" #endif Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/sched_4bsd.c Mon Nov 25 07:38:45 2013 (r258541) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/sched_ule.c Mon Nov 25 07:38:45 2013 (r258541) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" -#include "opt_kdtrace.h" #include "opt_sched.h" #include Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/subr_devstat.c Mon Nov 25 07:38:45 2013 (r258541) @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/subr_sleepqueue.c Mon Nov 25 07:38:45 2013 (r258541) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include "opt_sleepqueue_profiling.h" #include "opt_ddb.h" -#include "opt_kdtrace.h" #include "opt_sched.h" #include Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/subr_syscall.c Mon Nov 25 07:38:45 2013 (r258541) @@ -40,7 +40,6 @@ #include "opt_capsicum.h" #include "opt_ktrace.h" -#include "opt_kdtrace.h" __FBSDID("$FreeBSD$"); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/subr_trap.c Mon Nov 25 07:38:45 2013 (r258541) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include "opt_ktrace.h" -#include "opt_kdtrace.h" #include "opt_sched.h" #include Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/subr_turnstile.c Mon Nov 25 07:38:45 2013 (r258541) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" -#include "opt_kdtrace.h" #include "opt_turnstile_profiling.h" #include "opt_sched.h" Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/vfs_cache.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/vfs_lookup.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/kern/vfs_syscalls.c Mon Nov 25 07:38:45 2013 (r258541) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_capsicum.h" #include "opt_compat.h" -#include "opt_kdtrace.h" #include "opt_ktrace.h" #include Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/mips/mips/exception.S Mon Nov 25 07:38:45 2013 (r258541) @@ -55,7 +55,7 @@ */ #include "opt_ddb.h" -#include "opt_kdtrace.h" + #include #include #include Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/mips/mips/trap.c Mon Nov 25 07:38:45 2013 (r258541) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_global.h" #include "opt_ktrace.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/crypto/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -16,6 +16,6 @@ SRCS += skipjack.c bf_enc.c bf_ecb.c bf_ SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h -SRCS += opt_ddb.h opt_kdtrace.h +SRCS += opt_ddb.h SRCS += camellia.c camellia-api.c .include Modified: head/sys/modules/ctl/Makefile ============================================================================== --- head/sys/modules/ctl/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/ctl/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -22,7 +22,6 @@ SRCS+= bus_if.h SRCS+= device_if.h SRCS+= vnode_if.h SRCS+= opt_cam.h -SRCS+= opt_kdtrace.h #CFLAGS+=-DICL_KERNEL_PROXY Modified: head/sys/modules/dtrace/dtrace_test/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace_test/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/dtrace/dtrace_test/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -5,7 +5,6 @@ KMOD= dtrace_test SRCS= dtrace_test.c -SRCS+= opt_kdtrace.h SRCS+= vnode_if.h CFLAGS+= -I${.CURDIR}/../../.. Modified: head/sys/modules/dtrace/lockstat/Makefile ============================================================================== --- head/sys/modules/dtrace/lockstat/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/dtrace/lockstat/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -5,7 +5,7 @@ KMOD= lockstat SRCS= lockstat.c -SRCS+= vnode_if.h opt_kdtrace.h +SRCS+= vnode_if.h CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ Modified: head/sys/modules/dtrace/sdt/Makefile ============================================================================== --- head/sys/modules/dtrace/sdt/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/dtrace/sdt/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -4,7 +4,7 @@ KMOD= sdt SRCS= sdt.c -SRCS+= vnode_if.h opt_kdtrace.h +SRCS+= vnode_if.h CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ Modified: head/sys/modules/ip6_mroute_mod/Makefile ============================================================================== --- head/sys/modules/ip6_mroute_mod/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/ip6_mroute_mod/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -7,7 +7,7 @@ KMOD= ip6_mroute SRCS= ip6_mroute.c -SRCS+= opt_inet6.h opt_kdtrace.h opt_mrouting.h +SRCS+= opt_inet6.h opt_mrouting.h .if !defined(KERNBUILDDIR) opt_inet6.h: Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/linux/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -13,8 +13,8 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ - opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \ - vnode_if.h device_if.h bus_if.h assym.s + opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \ + device_if.h bus_if.h assym.s # XXX: for assym.s SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h Modified: head/sys/modules/nfscl/Makefile ============================================================================== --- head/sys/modules/nfscl/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/nfscl/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -17,7 +17,6 @@ SRCS= vnode_if.h \ opt_bootp.h \ opt_inet.h \ opt_inet6.h \ - opt_kdtrace.h \ opt_kgssapi.h \ opt_nfs.h \ opt_nfsroot.h \ Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/nfsclient/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -7,7 +7,7 @@ SRCS= vnode_if.h \ nfs_bio.c nfs_node.c nfs_subs.c nfs_nfsiod.c \ nfs_vfsops.c nfs_vnops.c nfs_krpc.c \ opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h -SRCS+= opt_inet6.h opt_kdtrace.h opt_kgssapi.h +SRCS+= opt_inet6.h opt_kgssapi.h .if !defined(KERNBUILDDIR) NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel Modified: head/sys/modules/nfscommon/Makefile ============================================================================== --- head/sys/modules/nfscommon/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/nfscommon/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -8,7 +8,6 @@ SRCS= vnode_if.h \ nfs_commonport.c \ nfs_commonsubs.c \ opt_inet6.h \ - opt_kdtrace.h \ opt_kgssapi.h \ opt_nfs.h \ opt_ufs.h Modified: head/sys/modules/send/Makefile ============================================================================== --- head/sys/modules/send/Makefile Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/modules/send/Makefile Mon Nov 25 07:38:45 2013 (r258541) @@ -2,6 +2,6 @@ .PATH: ${.CURDIR}/../../netinet6 KMOD= send -SRCS= send.c opt_kdtrace.h +SRCS= send.c .include Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/net/vnet.c Mon Nov 25 07:38:45 2013 (r258541) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_kdb.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/in_kdtrace.c Mon Nov 25 07:38:45 2013 (r258541) @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/ip_fastfwd.c Mon Nov 25 07:38:45 2013 (r258541) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipstealth.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/ip_input.c Mon Nov 25 07:38:45 2013 (r258541) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipstealth.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_route.h" #include Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/ip_output.c Mon Nov 25 07:38:45 2013 (r258541) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_mbuf_stress_test.h" #include "opt_mpath.h" #include "opt_route.h" Modified: head/sys/netinet/sctp_dtrace_declare.h ============================================================================== --- head/sys/netinet/sctp_dtrace_declare.h Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/sctp_dtrace_declare.h Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ #define _NETINET_SCTP_DTRACE_DECLARE_H_ -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet/sctp_dtrace_define.h ============================================================================== --- head/sys/netinet/sctp_dtrace_define.h Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/sctp_dtrace_define.h Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_DTRACE_DEFINE_H_ #define _NETINET_SCTP_DTRACE_DEFINE_H_ -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/tcp_input.c Mon Nov 25 07:38:45 2013 (r258541) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_tcpdebug.h" #include Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/tcp_output.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_tcpdebug.h" #include Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/tcp_subr.c Mon Nov 25 07:38:45 2013 (r258541) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_tcpdebug.h" #include Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet/udp_usrreq.c Mon Nov 25 07:38:45 2013 (r258541) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet6/ip6_input.c Mon Nov 25 07:38:45 2013 (r258541) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_ipfw.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include "opt_route.h" #include Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet6/ip6_mroute.c Mon Nov 25 07:38:45 2013 (r258541) @@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet6/nd6.c Mon Nov 25 07:38:45 2013 (r258541) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/netinet6/send.c ============================================================================== --- head/sys/netinet6/send.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet6/send.c Mon Nov 25 07:38:45 2013 (r258541) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/netinet6/udp6_usrreq.c Mon Nov 25 07:38:45 2013 (r258541) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_ipfw.h" #include "opt_ipsec.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/nfsclient/nfs_bio.c Mon Nov 25 07:38:45 2013 (r258541) @@ -35,8 +35,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_kdtrace.h" - #include #include #include Modified: head/sys/nfsclient/nfs_krpc.c ============================================================================== --- head/sys/nfsclient/nfs_krpc.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/nfsclient/nfs_krpc.c Mon Nov 25 07:38:45 2013 (r258541) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_inet6.h" -#include "opt_kdtrace.h" #include "opt_kgssapi.h" #include Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Mon Nov 25 07:35:01 2013 (r258540) +++ head/sys/nfsclient/nfs_subs.c Mon Nov 25 07:38:45 2013 (r258541) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); * copy data between mbuf chains and uio lists. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 10:58:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B95DD5E; Mon, 25 Nov 2013 10:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AC8C2E49; Mon, 25 Nov 2013 10:58:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPAw3nV099964; Mon, 25 Nov 2013 10:58:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPAw3IC099963; Mon, 25 Nov 2013 10:58:03 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311251058.rAPAw3IC099963@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 25 Nov 2013 10:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258545 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 10:58:03 -0000 Author: hselasky Date: Mon Nov 25 10:58:02 2013 New Revision: 258545 URL: http://svnweb.freebsd.org/changeset/base/258545 Log: Comply to the XHCI specification. Certain input context fields should always be zero. MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Nov 25 10:49:17 2013 (r258544) +++ head/sys/dev/usb/controller/xhci.c Mon Nov 25 10:58:02 2013 (r258545) @@ -2540,7 +2540,11 @@ xhci_configure_device(struct usb_device xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx2, temp); - temp = XHCI_SCTX_3_DEV_ADDR_SET(udev->address) | + /* + * These fields should be initialized to zero, according to + * XHCI section 6.2.2 - slot context: + */ + temp = XHCI_SCTX_3_DEV_ADDR_SET(0) | XHCI_SCTX_3_SLOT_STATE_SET(0); xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx3, temp); From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 11:01:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67A35EBF; Mon, 25 Nov 2013 11:01:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48DBB2E82; Mon, 25 Nov 2013 11:01:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPB1KiR002768; Mon, 25 Nov 2013 11:01:20 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPB1JTK002765; Mon, 25 Nov 2013 11:01:19 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201311251101.rAPB1JTK002765@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Mon, 25 Nov 2013 11:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258546 - head/sys/arm/rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 11:01:20 -0000 Author: ganbold (doc committer) Date: Mon Nov 25 11:01:19 2013 New Revision: 258546 URL: http://svnweb.freebsd.org/changeset/base/258546 Log: Add watchdog driver for rk3188. Approved by: ray@ Added: head/sys/arm/rockchip/rk30xx_wdog.c (contents, props changed) head/sys/arm/rockchip/rk30xx_wdog.h (contents, props changed) Modified: head/sys/arm/rockchip/files.rk30xx Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Mon Nov 25 10:58:02 2013 (r258545) +++ head/sys/arm/rockchip/files.rk30xx Mon Nov 25 11:01:19 2013 (r258546) @@ -17,5 +17,6 @@ arm/rockchip/common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard arm/rockchip/rk30xx_grf.c standard +arm/rockchip/rk30xx_wdog.c standard arm/rockchip/rk30xx_gpio.c optional gpio dev/usb/controller/dwc_otg_fdt.c optional dwcotg Added: head/sys/arm/rockchip/rk30xx_wdog.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/rockchip/rk30xx_wdog.c Mon Nov 25 11:01:19 2013 (r258546) @@ -0,0 +1,198 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#ifndef RK30_WDT_BASE +#define RK30_WDT_BASE 0x2004c000 +#define RK30_WDT_PSIZE 0x100 +#endif + +#define RK30_WDT_READ(_sc, _r) bus_read_4((_sc)->res, (_r)) +#define RK30_WDT_WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) + +#define WDOG_CTRL 0x00 +#define WDOG_CTRL_EN (1 << 0) +#define WDOG_CTRL_RSP_MODE (1 << 1) +#define WDOG_CTRL_RST_PULSE (4 << 2) +#define WDOG_CTRL_RST 0xa +#define WDOG_TORR 0x04 +#define WDOG_TORR_INTVL_SHIFT 0 +#define WDOG_CCVR 0x08 +#define WDOG_CRR 0x0c +#define WDOG_CRR_PWD 0x76 +#define WDOG_STAT 0x10 +#define WDOG_EOI 0x14 + +static struct rk30_wd_softc *rk30_wd_sc = NULL; + +struct rk30_wd_softc { + device_t dev; + struct resource *res; + struct mtx mtx; + int freq; +}; + +static void rk30_wd_watchdog_fn(void *private, u_int cmd, int *error); + +static int +rk30_wd_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "rockchip,rk30xx-wdt")) { + device_set_desc(dev, "Rockchip RK30XX Watchdog"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +rk30_wd_attach(device_t dev) +{ + struct rk30_wd_softc *sc; + int rid; + phandle_t node; + pcell_t cell; + + if (rk30_wd_sc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + + node = ofw_bus_get_node(sc->dev); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) > 0) + sc->freq = cell / 1000000; + else + return (ENXIO); + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + rk30_wd_sc = sc; + mtx_init(&sc->mtx, "RK30XX Watchdog", "rk30_wd", MTX_DEF); + EVENTHANDLER_REGISTER(watchdog_list, rk30_wd_watchdog_fn, sc, 0); + + return (0); +} + +static void +rk30_wd_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct rk30_wd_softc *sc; + uint64_t ms, m, max; + int i; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; + m = 0xffff / sc->freq; + max = 0x7fffffff / sc->freq + 1; + i = 0; + while (m < max && m < ms) { + m <<= 1; + i++; + } + if (m < max) { + RK30_WDT_WRITE(sc, WDOG_TORR, + i << WDOG_TORR_INTVL_SHIFT); + RK30_WDT_WRITE(sc, WDOG_CTRL, + WDOG_CTRL_EN | WDOG_CTRL_RSP_MODE | + WDOG_CTRL_RST_PULSE); + RK30_WDT_WRITE(sc, WDOG_CRR, WDOG_CRR_PWD); + *error = 0; + } else { + device_printf(sc->dev, "Can not be disabled\n"); + mtx_unlock(&sc->mtx); + RK30_WDT_WRITE(sc, WDOG_CTRL, WDOG_CTRL_RST); + return; + } + } + else + RK30_WDT_WRITE(sc, WDOG_CTRL, WDOG_CTRL_RST); + + mtx_unlock(&sc->mtx); +} + +void +rk30_wd_watchdog_reset() +{ + bus_space_handle_t bsh; + + bus_space_map(fdtbus_bs_tag, RK30_WDT_BASE, RK30_WDT_PSIZE, 0, &bsh); + bus_space_write_4(fdtbus_bs_tag, bsh, WDOG_TORR, 0); + bus_space_write_4(fdtbus_bs_tag, bsh, WDOG_CTRL, + WDOG_CTRL_EN | WDOG_CTRL_RSP_MODE | WDOG_CTRL_RST_PULSE); + + while (1); +} + +static device_method_t rk30_wd_methods[] = { + DEVMETHOD(device_probe, rk30_wd_probe), + DEVMETHOD(device_attach, rk30_wd_attach), + + DEVMETHOD_END +}; + +static driver_t rk30_wd_driver = { + "rk30_wd", + rk30_wd_methods, + sizeof(struct rk30_wd_softc), +}; +static devclass_t rk30_wd_devclass; + +DRIVER_MODULE(rk30_wd, simplebus, rk30_wd_driver, rk30_wd_devclass, 0, 0); Added: head/sys/arm/rockchip/rk30xx_wdog.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/rockchip/rk30xx_wdog.h Mon Nov 25 11:01:19 2013 (r258546) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2013 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ +#ifndef __RK30XX_WDOG_H__ +#define __RK30XX_WDOG_H__ + +void rk30_wd_watchdog_reset(void); + +#endif /*__RK30XX_WDOG_H__*/ + From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 11:02:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C47E7C; Mon, 25 Nov 2013 11:02:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42AF02E94; Mon, 25 Nov 2013 11:02:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPB2CbP002961; Mon, 25 Nov 2013 11:02:12 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPB2C9w002960; Mon, 25 Nov 2013 11:02:12 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201311251102.rAPB2C9w002960@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Mon, 25 Nov 2013 11:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258547 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 11:02:12 -0000 Author: ganbold (doc committer) Date: Mon Nov 25 11:02:11 2013 New Revision: 258547 URL: http://svnweb.freebsd.org/changeset/base/258547 Log: Add clock frequency for rk3188 watchdog. Whilst here, replace "clocks" to "clock-frequency". Approved by: ray@ Modified: head/sys/boot/fdt/dts/rk3188.dtsi Modified: head/sys/boot/fdt/dts/rk3188.dtsi ============================================================================== --- head/sys/boot/fdt/dts/rk3188.dtsi Mon Nov 25 11:01:19 2013 (r258546) +++ head/sys/boot/fdt/dts/rk3188.dtsi Mon Nov 25 11:02:11 2013 (r258547) @@ -80,7 +80,7 @@ compatible = "rockchip,rk3188-dw-apb-timer-osc"; reg = <0x20038000 0x20>; interrupts = <76>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -88,7 +88,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038020 0x20>; interrupts = <77>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -96,7 +96,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038060 0x20>; interrupts = <91>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -104,7 +104,7 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x20038080 0x20>; interrupts = <92>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; @@ -112,13 +112,14 @@ compatible = "rockchip,rk30xx-timer"; reg = <0x200380a0 0x20>; interrupts = <96>; - clocks = <24000000>; + clock-frequency = <24000000>; status = "disabled"; }; watchdog@2004c000 { compatible = "rockchip,rk30xx-wdt"; reg = <0x2004c000 0x100>; + clock-frequency = < 66000000 >; }; gpio0: gpio@2000a000 { @@ -233,7 +234,7 @@ interrupts = <55>; #address-cells = <1>; #size-cells = <0>; - clocks = <24000000>; /* TODO: verify freq */ + clock-frequency = <24000000>; /* TODO: verify freq */ status = "disabled"; }; @@ -243,7 +244,7 @@ interrupts = <56>; #address-cells = <1>; #size-cells = <0>; - clocks = <24000000>; /* TODO: verify freq */ + clock-frequency = <24000000>; /* TODO: verify freq */ status = "disabled"; }; }; From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 11:02:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 760A61EB; Mon, 25 Nov 2013 11:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 664252EA1; Mon, 25 Nov 2013 11:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPB2xrs003119; Mon, 25 Nov 2013 11:02:59 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPB2xbV003118; Mon, 25 Nov 2013 11:02:59 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201311251102.rAPB2xbV003118@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Mon, 25 Nov 2013 11:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258548 - head/sys/arm/rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 11:02:59 -0000 Author: ganbold (doc committer) Date: Mon Nov 25 11:02:58 2013 New Revision: 258548 URL: http://svnweb.freebsd.org/changeset/base/258548 Log: Enable reset mechanism for rk3188. Approved by: ray@ Modified: head/sys/arm/rockchip/rk30xx_machdep.c Modified: head/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_machdep.c Mon Nov 25 11:02:11 2013 (r258547) +++ head/sys/arm/rockchip/rk30xx_machdep.c Mon Nov 25 11:02:58 2013 (r258548) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include +#include + /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000 @@ -122,6 +124,7 @@ void cpu_reset() { - printf("No cpu_reset implementation!\n"); + rk30_wd_watchdog_reset(); + printf("Reset failed!\n"); while (1); } From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 11:15:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 835DA144; Mon, 25 Nov 2013 11:15:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 584C52167; Mon, 25 Nov 2013 11:15:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPBFqfh007135; Mon, 25 Nov 2013 11:15:52 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPBFqoJ007134; Mon, 25 Nov 2013 11:15:52 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311251115.rAPBFqoJ007134@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 25 Nov 2013 11:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258549 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 11:15:52 -0000 Author: dumbbell Date: Mon Nov 25 11:15:51 2013 New Revision: 258549 URL: http://svnweb.freebsd.org/changeset/base/258549 Log: drm: Dereference pointers given to qsort_r()'s cmp callback drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the array passed to qsort_r(), not the elements themselves. Before this fix, the use of qsort_r() shuffled the array, not sorted it, because the compare callback accessed random memory locations, not the expected elements. This bug triggered an infinite loop in KDE/xserver: 1. KDE has a kded module called "randrmonitor" which queries xserver for current monitors at startup and then listens to RandR notifications from xserver. 2. xserver handles the query from "randrmonitor" by polling the video device using the "drm_mode_getconnector()" ioctl. This ioctl returns a list of connectors and, for those with a connected monitor, the available modes. Each modes list is sorted by the kernel before returning. When xserver gets the connectors list, it sorts the modes lists again. In the case of this bug, when two modes are equal (in xserver's compare function PoV), their order is kept stable (ie. the kernel order is kept for those two modes). And because the list was shuffled by the kernel, the order of two equal modes was frequently changed in the final modes list in xserver. 3. xserver compares the returned connectors list with the list obtained earlier. In particular, it compares the sorted modes lists for each connector. If a property of a connector changes (eg. modes), xserver sends a "RRNotify_OutputChange" notification. Because of the change of order between equal modes, xserver sent a notification after each polling of the connectors. 4. "randrmonitor" receives a notification, triggered by its query. The notification doesn't contain the new connectors list, therefore, it asks for the new list using the same function: go back to step #2. MFC after: 3 days Modified: head/sys/dev/drm2/drm_linux_list_sort.c Modified: head/sys/dev/drm2/drm_linux_list_sort.c ============================================================================== --- head/sys/dev/drm2/drm_linux_list_sort.c Mon Nov 25 11:02:58 2013 (r258548) +++ head/sys/dev/drm2/drm_linux_list_sort.c Mon Nov 25 11:15:51 2013 (r258549) @@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c struct drm_list_sort_thunk *thunk; thunk = priv; - le1 = __DECONST(struct list_head *, d1); - le2 = __DECONST(struct list_head *, d2); + le1 = *(struct list_head **)d1; + le2 = *(struct list_head **)d2; return ((thunk->cmp)(thunk->priv, le1, le2)); } From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 11:31:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BF974AC; Mon, 25 Nov 2013 11:31:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE29224B; Mon, 25 Nov 2013 11:31:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPBVgP6013216; Mon, 25 Nov 2013 11:31:42 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPBVgpP013215; Mon, 25 Nov 2013 11:31:42 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201311251131.rAPBVgpP013215@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 25 Nov 2013 11:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258550 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 11:31:42 -0000 Author: bapt Date: Mon Nov 25 11:31:42 2013 New Revision: 258550 URL: http://svnweb.freebsd.org/changeset/base/258550 Log: Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Reported by: glebius MFC after: 3 days Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Mon Nov 25 11:15:51 2013 (r258549) +++ head/usr.sbin/pkg/pkg.c Mon Nov 25 11:31:42 2013 (r258550) @@ -740,12 +740,9 @@ cleanup: static int bootstrap_pkg(bool force) { - FILE *config; int fd_pkg, fd_sig; int ret; - char *site; char url[MAXPATHLEN]; - char conf[MAXPATHLEN]; char tmppkg[MAXPATHLEN]; char tmpsig[MAXPATHLEN]; const char *packagesite; @@ -754,7 +751,6 @@ bootstrap_pkg(bool force) fd_sig = -1; ret = -1; - config = NULL; if (config_string(PACKAGESITE, &packagesite) != 0) { warnx("No PACKAGESITE defined"); @@ -801,26 +797,6 @@ bootstrap_pkg(bool force) if ((ret = extract_pkg_static(fd_pkg, pkgstatic, MAXPATHLEN)) == 0) ret = install_pkg_static(pkgstatic, tmppkg, force); - snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf", - getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); - - if (access(conf, R_OK) == -1) { - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - - config = fopen(conf, "w+"); - if (config == NULL) - goto cleanup; - fprintf(config, "packagesite: %s\n", url); - fclose(config); - } - goto cleanup; fetchfail: From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 12:41:48 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B305739C; Mon, 25 Nov 2013 12:41:48 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0632699; Mon, 25 Nov 2013 12:41:47 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA20365; Mon, 25 Nov 2013 14:41:45 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VkvU1-000MIN-7d; Mon, 25 Nov 2013 14:41:45 +0200 Message-ID: <52934551.7050608@FreeBSD.org> Date: Mon, 25 Nov 2013 14:40:49 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Marcel Moolenaar , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258448 - head/sys/geom/part References: <201311212202.rALM2xAS078472@svn.freebsd.org> In-Reply-To: <201311212202.rALM2xAS078472@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 12:41:48 -0000 on 22/11/2013 00:02 Marcel Moolenaar said the following: > Author: marcel > Date: Thu Nov 21 22:02:59 2013 > New Revision: 258448 > URL: http://svnweb.freebsd.org/changeset/base/258448 > > Log: > Have the GPT probe return a lower priority when the MBR is not a PMBR > The purpose of the PMBR is to have the disk appear in use to GPT > unaware utilities (like fdisk). However, if the PMBR has been changed > by a GPT unaware utlity then we must assume that this was deliberate > (as it involved removal of the special slice) and we should not treat > the unmodified GPT-specific sectors as being valid. By lowering the > probe priority in that case, the MBR scheme will take precedence and > the kernel will end up using the MBR and not the GPT. We will still > use the GPT if the kernel does not support the MBR scheme. Thank you very much for this change! Finally I can get rid of my local patch from a while ago: http://thread.gmane.org/gmane.os.freebsd.devel.geom/3776/focus=3802 Your solution is clearly superior while providing the same end result. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 13:28:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43CC2E81; Mon, 25 Nov 2013 13:28:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33C58294E; Mon, 25 Nov 2013 13:28:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPDSfKA052962; Mon, 25 Nov 2013 13:28:41 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPDSfbc052961; Mon, 25 Nov 2013 13:28:41 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311251328.rAPDSfbc052961@svn.freebsd.org> From: Julio Merino Date: Mon, 25 Nov 2013 13:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258551 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 13:28:41 -0000 Author: jmmv Date: Mon Nov 25 13:28:40 2013 New Revision: 258551 URL: http://svnweb.freebsd.org/changeset/base/258551 Log: Install plain.test.mk. This was missed when this file was first imported. Its atf.test.mk counterpart is already being installed and these are necessary if we want "make" within the source tree (not via "buildworld") to work. Approved by: rpaulo (mentor) Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Mon Nov 25 11:31:42 2013 (r258550) +++ head/share/mk/Makefile Mon Nov 25 13:28:40 2013 (r258551) @@ -45,6 +45,7 @@ FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" FILES+= atf.test.mk +FILES+= plain.test.mk .endif .include From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 13:30:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0546FE3; Mon, 25 Nov 2013 13:30:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 914002964; Mon, 25 Nov 2013 13:30:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPDU7US053283; Mon, 25 Nov 2013 13:30:07 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPDU7R8053281; Mon, 25 Nov 2013 13:30:07 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311251330.rAPDU7R8053281@svn.freebsd.org> From: Julio Merino Date: Mon, 25 Nov 2013 13:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258552 - in head/share: examples/tests/tests/plain mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 13:30:07 -0000 Author: jmmv Date: Mon Nov 25 13:30:06 2013 New Revision: 258552 URL: http://svnweb.freebsd.org/changeset/base/258552 Log: Generate plain sh test programs from a source file. Instead of assuming that plain sh test programs exist in the source tree in their final form and are marked as executable, generate them from a list of sources. By default, just assume that the source file for a program P is P.sh but allow the caller to customize the inputs. Similarly, also allow the caller to apply sed(1) replacements on the output. These will both be useful in hooking existing test code from tools/regression/ into the test suite. Approved by: rpaulo (mentor) Added: - copied unchanged from r258526, head/share/examples/tests/tests/plain/cp_test Directory Properties: head/share/examples/tests/tests/plain/cp_test.sh (props changed) Deleted: head/share/examples/tests/tests/plain/cp_test Modified: head/share/mk/plain.test.mk Copied: head/share/examples/tests/tests/plain/cp_test.sh (from r258526, head/share/examples/tests/tests/plain/cp_test) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/tests/tests/plain/cp_test.sh Mon Nov 25 13:30:06 2013 (r258552, copy of r258526, head/share/examples/tests/tests/plain/cp_test) @@ -0,0 +1,84 @@ +# $FreeBSD$ +# +# Copyright 2013 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# +# INTRODUCTION +# +# This plain test program mimics the structure and contents of its +# ATF-based counterpart. It attempts to represent various test cases +# in different separate functions and just calls them all from main. +# +# In reality, plain test programs can be much simpler. All they have +# to do is return 0 on success and non-0 otherwise. +# + +set -e + +# Prints an error message and exits. +err() { + echo "${@}" 1>&2 + exit 1 +} + +# Auxiliary function to compare two files for equality. +verify_copy() { + if ! cmp -s "${1}" "${2}"; then + diff -u "${1}" "${2}" + err "${1} and ${2} differ, but they should be equal" + fi +} + +simple_test() { + echo 'File 1' >file1 + cp file1 file2 || err "cp failed" + verify_copy file1 file2 +} + +force_test() { + echo 'File 1' >file1 + echo 'File 2' >file2 + chmod 400 file2 + cp -f file1 file2 || err "cp failed" + verify_copy file1 file2 +} + +# If you have read the cp_test.sh counterpart in the atf/ directory, you +# may think that the sequencing of tests below and the exposed behavior +# to the user is very similar. But you'd be wrong. +# +# There are two major differences with this and the ATF version. The +# first is that the code below has no provisions to detect failures in +# one test and continue running the other tests: the first failure +# causes the whole test program to exit. The second is that this +# particular "main" has no arguments: without ATF, all test programs may +# expose a different command-line interface, and this is an issue for +# consistency purposes. +simple_test +force_test Modified: head/share/mk/plain.test.mk ============================================================================== --- head/share/mk/plain.test.mk Mon Nov 25 13:28:40 2013 (r258551) +++ head/share/mk/plain.test.mk Mon Nov 25 13:30:06 2013 (r258552) @@ -46,6 +46,16 @@ _TESTS+= ${PLAIN_TESTS_SH} .for _T in ${PLAIN_TESTS_SH} SCRIPTSDIR_${_T}= ${TESTSDIR} TEST_INTERFACE.${_T}= plain +CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +PLAIN_TESTS_SH_SED_${_T}?= # empty +PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} + cat ${.ALLSRC} | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .endfor .endif From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 15:01:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE22C2A2; Mon, 25 Nov 2013 15:01:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCBC32FE6; Mon, 25 Nov 2013 15:01:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPF1xUs085816; Mon, 25 Nov 2013 15:01:59 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPF1xqS085815; Mon, 25 Nov 2013 15:01:59 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311251501.rAPF1xqS085815@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 25 Nov 2013 15:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258553 - head/sys/dev/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:01:59 -0000 Author: dumbbell Date: Mon Nov 25 15:01:59 2013 New Revision: 258553 URL: http://svnweb.freebsd.org/changeset/base/258553 Log: drm: Fix build with gcc, broken with r258549 The code was easier to read without __DECONST and clang didn't report any error. I thought the cast was enough... MFC after: 3 days X-MFC-With: r258549 Modified: head/sys/dev/drm2/drm_linux_list_sort.c Modified: head/sys/dev/drm2/drm_linux_list_sort.c ============================================================================== --- head/sys/dev/drm2/drm_linux_list_sort.c Mon Nov 25 13:30:06 2013 (r258552) +++ head/sys/dev/drm2/drm_linux_list_sort.c Mon Nov 25 15:01:59 2013 (r258553) @@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c struct drm_list_sort_thunk *thunk; thunk = priv; - le1 = *(struct list_head **)d1; - le2 = *(struct list_head **)d2; + le1 = *(__DECONST(struct list_head **, d1)); + le2 = *(__DECONST(struct list_head **, d2)); return ((thunk->cmp)(thunk->priv, le1, le2)); } From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 15:03:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0382042A; Mon, 25 Nov 2013 15:03:08 +0000 (UTC) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BDDA62FF8; Mon, 25 Nov 2013 15:03:07 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Vkxgn-000NXC-QT; Mon, 25 Nov 2013 16:03:06 +0100 Message-ID: <529366A5.3020202@FreeBSD.org> Date: Mon, 25 Nov 2013 16:03:01 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r258553 - head/sys/dev/drm2 References: <201311251501.rAPF1xqS085815@svn.freebsd.org> In-Reply-To: <201311251501.rAPF1xqS085815@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7V6g29epc40eXfoGEonTHv8rHRDGifgbP" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:03:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7V6g29epc40eXfoGEonTHv8rHRDGifgbP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 25.11.2013 16:01, Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Mon Nov 25 15:01:59 2013 > New Revision: 258553 > URL: http://svnweb.freebsd.org/changeset/base/258553 >=20 > Log: > drm: Fix build with gcc, broken with r258549 > =20 > The code was easier to read without __DECONST and clang didn't report= > any error. I thought the cast was enough... > =20 > MFC after: 3 days > X-MFC-With: r258549 Reported by: Michael Butler --=20 Jean-S=C3=A9bastien P=C3=A9dron --7V6g29epc40eXfoGEonTHv8rHRDGifgbP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKTZqkACgkQa+xGJsFYOlNRAgCeJRi6+Yr+V6Hy4out4YoyOXd8 zpIAn0pxSc530FNi6k8SZ8azwtJbLeKO =iFit -----END PGP SIGNATURE----- --7V6g29epc40eXfoGEonTHv8rHRDGifgbP-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 16:19:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A607AEF; Mon, 25 Nov 2013 16:19:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FC832533; Mon, 25 Nov 2013 16:19:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPGJM6e011519; Mon, 25 Nov 2013 16:19:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPGJMnI011518; Mon, 25 Nov 2013 16:19:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251619.rAPGJMnI011518@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 16:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258562 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:19:22 -0000 Author: avg Date: Mon Nov 25 16:19:21 2013 New Revision: 258562 URL: http://svnweb.freebsd.org/changeset/base/258562 Log: MFV r258386: 4322 ZFS deadlock on dp_config_rwlock illumos/illumos-gate@c50d56f667f119d78fa3d94d6bef2c298ba556f6 This is a record-only commit as the the fix is already in FreeBSD as ir258294. Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 16:44:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896005FC; Mon, 25 Nov 2013 16:44:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7702E2745; Mon, 25 Nov 2013 16:44:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPGi4pB021046; Mon, 25 Nov 2013 16:44:04 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPGi2Sf021034; Mon, 25 Nov 2013 16:44:02 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311251644.rAPGi2Sf021034@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 16:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258564 - head/usr.sbin/rpcbind X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:44:04 -0000 Author: hrs Date: Mon Nov 25 16:44:02 2013 New Revision: 258564 URL: http://svnweb.freebsd.org/changeset/base/258564 Log: Replace Sun RPC license with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. Modified: head/usr.sbin/rpcbind/check_bound.c head/usr.sbin/rpcbind/pmap_svc.c head/usr.sbin/rpcbind/rpcb_stat.c head/usr.sbin/rpcbind/rpcb_svc.c head/usr.sbin/rpcbind/rpcb_svc_4.c head/usr.sbin/rpcbind/rpcb_svc_com.c head/usr.sbin/rpcbind/rpcbind.c head/usr.sbin/rpcbind/rpcbind.h head/usr.sbin/rpcbind/warmstart.c Modified: head/usr.sbin/rpcbind/check_bound.c ============================================================================== --- head/usr.sbin/rpcbind/check_bound.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/check_bound.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: check_bound.c,v 1.2 2000/06/22 08:09:26 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/pmap_svc.c ============================================================================== --- head/usr.sbin/rpcbind/pmap_svc.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/pmap_svc.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: pmap_svc.c,v 1.2 2000/10/20 11:49:40 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/rpcb_stat.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_stat.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcb_stat.c Mon Nov 25 16:44:02 2013 (r258564) @@ -2,33 +2,32 @@ * $NetBSD: rpcb_stat.c,v 1.2 2000/07/04 20:27:40 matt Exp $ * $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* #pragma ident "@(#)rpcb_stat.c 1.7 94/04/25 SMI" */ Modified: head/usr.sbin/rpcbind/rpcb_svc.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcb_svc.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: rpcb_svc.c,v 1.1 2000/06/02 23:15:41 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/rpcb_svc_4.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_4.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcb_svc_4.c Mon Nov 25 16:44:02 2013 (r258564) @@ -3,33 +3,32 @@ * $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: rpcb_svc_com.c,v 1.9 2002/11/08 00:16:39 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcbind.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: rpcbind.c,v 1.3 2002/11/08 00:16:40 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.h Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/rpcbind.h Mon Nov 25 16:44:02 2013 (r258564) @@ -1,33 +1,32 @@ /* $NetBSD: rpcbind.h,v 1.1 2000/06/03 00:47:21 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/usr.sbin/rpcbind/warmstart.c ============================================================================== --- head/usr.sbin/rpcbind/warmstart.c Mon Nov 25 16:31:31 2013 (r258563) +++ head/usr.sbin/rpcbind/warmstart.c Mon Nov 25 16:44:02 2013 (r258564) @@ -1,30 +1,29 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * warmstart.c From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 17:52:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1497D283; Mon, 25 Nov 2013 17:52:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00D5D2BDB; Mon, 25 Nov 2013 17:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPHqJqD046521; Mon, 25 Nov 2013 17:52:19 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPHqGnS046435; Mon, 25 Nov 2013 17:52:16 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311251752.rAPHqGnS046435@svn.freebsd.org> From: Peter Wemm Date: Mon, 25 Nov 2013 17:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258569 - in head: contrib/subversion contrib/subversion/subversion/include contrib/subversion/subversion/libsvn_client contrib/subversion/subversion/libsvn_fs_fs contrib/subversion/sub... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 17:52:20 -0000 Author: peter Date: Mon Nov 25 17:52:16 2013 New Revision: 258569 URL: http://svnweb.freebsd.org/changeset/base/258569 Log: Import svn-1.8.5. This contains a user-visible fix for svn:externals handling (there are no svn:externals in freebsd repo), and two security fixes for modules that we don't build for the apache http server stack. Modified: head/contrib/subversion/CHANGES head/contrib/subversion/Makefile.in head/contrib/subversion/build-outputs.mk head/contrib/subversion/build.conf head/contrib/subversion/configure head/contrib/subversion/configure.ac head/contrib/subversion/subversion/include/svn_version.h head/contrib/subversion/subversion/libsvn_client/externals.c head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h head/contrib/subversion/subversion/libsvn_subr/internal_statements.h head/contrib/subversion/subversion/libsvn_wc/diff.h head/contrib/subversion/subversion/libsvn_wc/diff_local.c head/contrib/subversion/subversion/libsvn_wc/wc-checks.h head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.h head/usr.bin/svn/svn_private_config.h Directory Properties: head/contrib/subversion/ (props changed) Modified: head/contrib/subversion/CHANGES ============================================================================== --- head/contrib/subversion/CHANGES Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/CHANGES Mon Nov 25 17:52:16 2013 (r258569) @@ -1,3 +1,33 @@ +Version 1.8.5 +(25 November 2013, from /branches/1.8.x) +http://svn.apache.org/repos/asf/subversion/tags/1.8.5 + + User-visible changes: + - Client-side bugfixes: + * fix externals that point at redirected locations (issues #4428, #4429) + * diff: fix assertion with move inside a copy (issue #4444) + + - Server-side bugfixes: + * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al) + * mod_dav_svn: canonicalize paths properly (r1542071) + * mod_authz_svn: fix crash of mod_authz_svn with invalid config (r1541432) + * hotcopy: fix hotcopy losing revprop files in packed repos (issue #4448) + + - Other tool improvements and bugfixes: + * mod_dontdothat: Fix the uri parser (r1542069 et al) + + Developer-visible changes: + - General: + * fix compilation with '--enable-optimize' with clang (r1534860) + * fix copmpilation with debug build of BDB on Windows (r1501656, r1501702) + * fix '--with-openssl' option when building on Windows (r1535139) + * add test to fail when built against broken ZLib (r1537193 et al) + + - Bindings: + * swig-rb: fix tests to run without installing on OS X (r1535161) + * ctypes-python: build with compiler selected via configure (r1536537) + + Version 1.8.4 (29 October 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.4 @@ -32,7 +62,7 @@ http://svn.apache.org/repos/asf/subversi * allow compiling against serf 1.3 and later on Windows (r1517123) - Bindings: - * javahl: canonicalize path for streaFileContent method (r1524869) + * javahl: canonicalize path for streamFileContent method (r1524869) Version 1.8.3 @@ -523,6 +553,36 @@ http://svn.apache.org/repos/asf/subversi * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.14 +(25 Nov 2013, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.14 + + User-visible changes: + - Client- and server-side bugfixes: + * fix assertion on urls of the form 'file://./' (r1516806) + + - Client-side bugfixes: + * upgrade: fix an assertion when used with pre-1.3 wcs (r1530849) + * ra_local: fix error with repository in Windows drive root (r1518184) + * fix crash on windows when piped command is interrupted (r1522892) + * fix externals that point at redirected locations (issues #4428, #4429) + * diff: fix incorrect calculation of changes in some cases (issue #4283) + * diff: fix errors with added/deleted targets (issues #4153, #4421) + + - Server-side bugfixes: + * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al) + * fix OOM on concurrent requests at threaded server start (r1527103 et al) + * fsfs: limit commit time of files with deep change histories (r1536790) + * mod_dav_svn: canonicalize paths properly (r1542071) + + - Other tool improvements and bugfixes: + * mod_dontdothat: Fix the uri parser (r1542069 et al) + + Developer-visible changes: + - Bindings: + * javahl: canonicalize path for streamFileContent method (r1524869) + + Version 1.7.13 (29 Aug 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.13 Modified: head/contrib/subversion/Makefile.in ============================================================================== --- head/contrib/subversion/Makefile.in Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/Makefile.in Mon Nov 25 17:52:16 2013 (r258569) @@ -108,6 +108,7 @@ PACKAGE_VERSION=@PACKAGE_VERSION@ CC = @CC@ CXX = @CXX@ +CPP = @CPP@ EXEEXT = @EXEEXT@ SHELL = @SHELL@ @@ -331,7 +332,7 @@ INSTALL_EXTRA_SWIG_RB=\ # export an env variable so that the tests can run without being installed TEST_SHLIB_VAR_SWIG_RB=\ if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \ - for d in $(SWIG_PY_DIR)/libsvn_swig_rb $(SWIG_PY_DIR)/../../../libsvn_*; do \ + for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \ if [ -n "$$DYLD_LIBRARY_PATH" ]; then \ @SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \ else \ @@ -871,7 +872,7 @@ install-swig-rb-doc: # ctypes-python make targets ctypes-python: local-all - $(SHELL) $(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)" + $(SHELL) $(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)" "$(CPP)" install-ctypes-python: ctypes-python cd $(CTYPES_PYTHON_SRC_DIR); \ Modified: head/contrib/subversion/build-outputs.mk ============================================================================== --- head/contrib/subversion/build-outputs.mk Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/build-outputs.mk Mon Nov 25 17:52:16 2013 (r258569) @@ -115,7 +115,7 @@ checksum_test_PATH = subversion/tests/li checksum_test_DEPS = subversion/tests/libsvn_subr/checksum-test.lo subversion/tests/libsvn_test-1.la subversion/libsvn_subr/libsvn_subr-1.la checksum_test_OBJECTS = checksum-test.lo subversion/tests/libsvn_subr/checksum-test$(EXEEXT): $(checksum_test_DEPS) - cd subversion/tests/libsvn_subr && $(LINK) $(checksum_test_LDFLAGS) -o checksum-test$(EXEEXT) $(checksum_test_OBJECTS) ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APR_LIBS) $(LIBS) + cd subversion/tests/libsvn_subr && $(LINK) $(checksum_test_LDFLAGS) -o checksum-test$(EXEEXT) $(checksum_test_OBJECTS) ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APR_LIBS) $(SVN_ZLIB_LIBS) $(LIBS) client_test_PATH = subversion/tests/libsvn_client client_test_DEPS = subversion/tests/libsvn_client/client-test.lo subversion/tests/libsvn_test-1.la subversion/libsvn_client/libsvn_client-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_repos/libsvn_repos-1.la subversion/libsvn_ra/libsvn_ra-1.la subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la @@ -2851,7 +2851,7 @@ subversion/tests/libsvn_wc/wc-test.lo: s subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h -subversion/tests/svn_test_main.lo: subversion/tests/svn_test_main.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/svn_private_config.h subversion/tests/svn_test.h +subversion/tests/svn_test_main.lo: subversion/tests/svn_test_main.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/svn_private_config.h subversion/tests/svn_test.h tools/client-side/svn-bench/help-cmd.lo: tools/client-side/svn-bench/help-cmd.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/svn_private_config.h tools/client-side/svn-bench/cl.h @@ -2881,7 +2881,7 @@ tools/diff/diff4.lo: tools/diff/diff4.c tools/server-side/fsfs-stats.lo: tools/server-side/fsfs-stats.c subversion/include/private/svn_cache.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_string_private.h subversion/include/private/svn_subr_private.h subversion/include/svn_cache_config.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_iter.h subversion/include/svn_pools.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h -tools/server-side/mod_dontdothat/mod_dontdothat.lo: tools/server-side/mod_dontdothat/mod_dontdothat.c subversion/include/mod_dav_svn.h subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_string.h subversion/include/svn_types.h +tools/server-side/mod_dontdothat/mod_dontdothat.lo: tools/server-side/mod_dontdothat/mod_dontdothat.c subversion/include/mod_dav_svn.h subversion/include/private/svn_debug.h subversion/include/private/svn_fspath.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_path.h subversion/include/svn_string.h subversion/include/svn_types.h if $(INSTALL_APACHE_MODS) ; then $(COMPILE_APACHE_MOD) $(canonicalized_srcdir)tools/server-side/mod_dontdothat/mod_dontdothat.c ; else echo "fake" > tools/server-side/mod_dontdothat/mod_dontdothat.lo ; fi tools/server-side/svn-populate-node-origins-index.lo: tools/server-side/svn-populate-node-origins-index.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h Modified: head/contrib/subversion/build.conf ============================================================================== --- head/contrib/subversion/build.conf Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/build.conf Mon Nov 25 17:52:16 2013 (r258569) @@ -766,7 +766,7 @@ type = exe path = subversion/tests/libsvn_subr sources = checksum-test.c install = test -libs = libsvn_test libsvn_subr apr +libs = libsvn_test libsvn_subr apr zlib [compat-test] description = Test compatibility functions Modified: head/contrib/subversion/configure ============================================================================== --- head/contrib/subversion/configure Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/configure Mon Nov 25 17:52:16 2013 (r258569) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.8.4. +# Generated by GNU Autoconf 2.69 for subversion 1.8.5. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.8.4' -PACKAGE_STRING='subversion 1.8.4' +PACKAGE_VERSION='1.8.5' +PACKAGE_STRING='subversion 1.8.5' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -1456,7 +1456,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.8.4 to adapt to many kinds of systems. +\`configure' configures subversion 1.8.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1522,7 +1522,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.8.4:";; + short | recursive ) echo "Configuration of subversion 1.8.5:";; esac cat <<\_ACEOF @@ -1736,7 +1736,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.8.4 +subversion configure 1.8.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2280,7 +2280,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.8.4, which was +It was created by subversion $as_me 1.8.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2660,8 +2660,8 @@ ac_configure="$SHELL $ac_aux_dir/configu -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.4" >&5 -$as_echo "$as_me: Configuring Subversion 1.8.4" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.5" >&5 +$as_echo "$as_me: Configuring Subversion 1.8.5" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -21174,43 +21174,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu - - _svn_xxflags__save="$CFLAGS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fwhole-program" >&5 -$as_echo_n "checking if $CC accepts -fwhole-program... " >&6; } - CFLAGS="-fwhole-program $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$_svn_xxflags__save" - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi fi if test -z "`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"; then @@ -21517,43 +21480,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu - - _svn_xxflags__save="$CXXFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -fwhole-program" >&5 -$as_echo_n "checking if $CXX accepts -fwhole-program... " >&6; } - CXXFLAGS="-fwhole-program $CXXFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="$_svn_xxflags__save" - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi fi elif test "$enable_optimization" = "no"; then @@ -25736,7 +25662,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.8.4, which was +This file was extended by subversion $as_me 1.8.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25802,7 +25728,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.8.4 +subversion config.status 1.8.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/subversion/configure.ac ============================================================================== --- head/contrib/subversion/configure.ac Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/configure.ac Mon Nov 25 17:52:16 2013 (r258569) @@ -1089,7 +1089,6 @@ if test "$enable_optimization" = "yes"; SVN_CFLAGS_ADD_IFELSE([-O])])])]) SVN_CFLAGS_ADD_IFELSE([-Wno-clobbered]) SVN_CFLAGS_ADD_IFELSE([-flto]) - SVN_CFLAGS_ADD_IFELSE([-fwhole-program]) fi fi if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then @@ -1106,7 +1105,6 @@ if test "$enable_optimization" = "yes"; SVN_CXXFLAGS_ADD_IFELSE([-O])])])]) SVN_CXXFLAGS_ADD_IFELSE([-Wno-clobbered]) SVN_CXXFLAGS_ADD_IFELSE([-flto]) - SVN_CXXFLAGS_ADD_IFELSE([-fwhole-program]) fi fi elif test "$enable_optimization" = "no"; then Modified: head/contrib/subversion/subversion/include/svn_version.h ============================================================================== --- head/contrib/subversion/subversion/include/svn_version.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/include/svn_version.h Mon Nov 25 17:52:16 2013 (r258569) @@ -72,7 +72,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 4 +#define SVN_VER_PATCH 5 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -95,7 +95,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1534716)" +#define SVN_VER_TAG " (r1542147)" /** Number tag: a string describing the version. @@ -121,7 +121,7 @@ extern "C" { * When rolling a tarball, we automatically replace it with what we * guess to be the correct revision number. */ -#define SVN_VER_REVISION 1534716 +#define SVN_VER_REVISION 1542147 /* Version strings composed from the above definitions. */ Modified: head/contrib/subversion/subversion/libsvn_client/externals.c ============================================================================== --- head/contrib/subversion/subversion/libsvn_client/externals.c Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_client/externals.c Mon Nov 25 17:52:16 2013 (r258569) @@ -737,7 +737,7 @@ handle_external_item_change(svn_client_c switch (ext_kind) { case svn_node_dir: - SVN_ERR(switch_dir_external(local_abspath, new_url, + SVN_ERR(switch_dir_external(local_abspath, new_loc->url, &(new_item->peg_revision), &(new_item->revision), parent_dir_abspath, Modified: head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c ============================================================================== --- head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c Mon Nov 25 17:52:16 2013 (r258569) @@ -11293,16 +11293,18 @@ hotcopy_body(void *baton, apr_pool_t *po SVN_ERR(hotcopy_remove_rev_files(dst_fs, rev, rev + max_files_per_dir, max_files_per_dir, iterpool)); - SVN_ERR(hotcopy_remove_revprop_files(dst_fs, rev, - rev + max_files_per_dir, - max_files_per_dir, iterpool)); + if (dst_ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT) + SVN_ERR(hotcopy_remove_revprop_files(dst_fs, rev, + rev + max_files_per_dir, + max_files_per_dir, + iterpool)); } /* Now that all revisions have moved into the pack, the original * rev dir can be removed. */ SVN_ERR(remove_folder(path_rev_shard(dst_fs, rev, iterpool), cancel_func, cancel_baton, iterpool)); - if (rev > 0) + if (rev > 0 && dst_ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT) SVN_ERR(remove_folder(path_revprops_shard(dst_fs, rev, iterpool), cancel_func, cancel_baton, iterpool)); } Modified: head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h Mon Nov 25 17:52:16 2013 (r258569) @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.4/subversion/libsvn_fs_fs/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_fs_fs/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: head/contrib/subversion/subversion/libsvn_subr/internal_statements.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_subr/internal_statements.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_subr/internal_statements.h Mon Nov 25 17:52:16 2013 (r258569) @@ -1,4 +1,4 @@ -/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.4/subversion/libsvn_subr/token-map.h. +/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_subr/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_INTERNAL_SAVEPOINT_SVN 0 Modified: head/contrib/subversion/subversion/libsvn_wc/diff.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_wc/diff.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_wc/diff.h Mon Nov 25 17:52:16 2013 (r258569) @@ -38,7 +38,9 @@ extern "C" { #endif /* __cplusplus */ -/* Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to +/* A function to diff locally added and locally copied files. + + Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to PROCESSOR with as parent baton PROCESSOR_PARENT_BATON. The node is expected to have status svn_wc__db_status_normal, or @@ -61,7 +63,9 @@ svn_wc__diff_local_only_file(svn_wc__db_ void *cancel_baton, apr_pool_t *scratch_pool); -/* Reports the directory LOCAL_ABSPATH and everything below it (limited by +/* A function to diff locally added and locally copied directories. + + Reports the directory LOCAL_ABSPATH and everything below it (limited by DEPTH) as added with relpath RELPATH to PROCESSOR with as parent baton PROCESSOR_PARENT_BATON. Modified: head/contrib/subversion/subversion/libsvn_wc/diff_local.c ============================================================================== --- head/contrib/subversion/subversion/libsvn_wc/diff_local.c Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_wc/diff_local.c Mon Nov 25 17:52:16 2013 (r258569) @@ -391,7 +391,7 @@ diff_status_callback(void *baton, } } - if (local_only) + if (local_only && (db_status != svn_wc__db_status_deleted)) { if (db_kind == svn_node_file) SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath, Modified: head/contrib/subversion/subversion/libsvn_wc/wc-checks.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_wc/wc-checks.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_wc/wc-checks.h Mon Nov 25 17:52:16 2013 (r258569) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 Modified: head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h Mon Nov 25 17:52:16 2013 (r258569) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 Modified: head/contrib/subversion/subversion/libsvn_wc/wc-queries.h ============================================================================== --- head/contrib/subversion/subversion/libsvn_wc/wc-queries.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/contrib/subversion/subversion/libsvn_wc/wc-queries.h Mon Nov 25 17:52:16 2013 (r258569) @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.4/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.5/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 Modified: head/usr.bin/svn/svn_private_config.h ============================================================================== --- head/usr.bin/svn/svn_private_config.h Mon Nov 25 17:45:20 2013 (r258568) +++ head/usr.bin/svn/svn_private_config.h Mon Nov 25 17:52:16 2013 (r258569) @@ -105,7 +105,7 @@ #define PACKAGE_NAME "subversion" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "subversion 1.8.4" +#define PACKAGE_STRING "subversion 1.8.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "subversion" @@ -114,7 +114,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.8.4" +#define PACKAGE_VERSION "1.8.5" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 18:11:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D634E27; Mon, 25 Nov 2013 18:11:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF2812D27; Mon, 25 Nov 2013 18:11:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIBuB8030498; Mon, 25 Nov 2013 18:11:56 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPIBtaK030251; Mon, 25 Nov 2013 18:11:55 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311251811.rAPIBtaK030251@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 18:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258570 - in head/release/doc: de_DE.ISO8859-1/readme en_US.ISO8859-1/readme ru_RU.KOI8-R/readme zh_CN.GB2312/readme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:11:57 -0000 Author: rodrigc Date: Mon Nov 25 18:11:55 2013 New Revision: 258570 URL: http://svnweb.freebsd.org/changeset/base/258570 Log: Change sysinstall.8 references to bsdinstall.8. Submitted by: skreuzer Modified: head/release/doc/de_DE.ISO8859-1/readme/article.xml head/release/doc/en_US.ISO8859-1/readme/article.xml head/release/doc/ru_RU.KOI8-R/readme/article.xml head/release/doc/zh_CN.GB2312/readme/article.xml Modified: head/release/doc/de_DE.ISO8859-1/readme/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 17:52:16 2013 (r258569) +++ head/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 18:11:55 2013 (r258570) @@ -390,13 +390,13 @@ gehört, steht immer am Anfang des Textes. - Auf den Plattformen, auf denen &man.sysinstall.8; zur + Auf den Plattformen, auf denen &man.bsdinstall.8; zur Verfügung steht (zur Zeit alpha, i386, ia64, pc98 und sparc64) finden Sie diese Dokumente während der Installation normalerweise unter dem Menüpunkt Dokumentation. Um nach der Installation des Systems dieses Menü zugreifen zu können, müssen Sie das - Programm &man.sysinstall.8; erneut aufrufen. + Programm &man.bsdinstall.8; erneut aufrufen. Sie sollten auf jeden Fall die Errata zur jeweiligen Modified: head/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 17:52:16 2013 (r258569) +++ head/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 18:11:55 2013 (r258570) @@ -324,11 +324,11 @@ - On platforms that support &man.sysinstall.8; (currently + On platforms that support &man.bsdinstall.8; (currently &arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the Documentation menu during installation. Once the system is installed, you can revisit this menu by re-running the - &man.sysinstall.8; utility. + &man.bsdinstall.8; utility. It is extremely important to read the errata for any Modified: head/release/doc/ru_RU.KOI8-R/readme/article.xml ============================================================================== --- head/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 17:52:16 2013 (r258569) +++ head/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 18:11:55 2013 (r258570) @@ -347,12 +347,12 @@ - îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.sysinstall.8; (× + îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.bsdinstall.8; (× ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ alpha, &i386;, ia64, pc98, É &sparc64;), ÜÔÉ ÄÏËÕÍÅÎÔÙ ÏÂÙÞÎÏ ÄÏÓÔÕÐÎÙ ÞÅÒÅÚ ÍÅÎÀ Documentation ×Ï ×ÒÅÍÑ ÕÓÔÁÎÏ×ËÉ. ëÁË ÔÏÌØËÏ ÓÉÓÔÅÍÁ ÂÕÄÅÔ ÕÓÔÁÎÏ×ÌÅÎÁ, ×Ù ÍÏÖÅÔÅ ÐÏ×ÔÏÒÎÏ ×ÏÊÔÉ × ÜÔÏ ÍÅÎÀ, ÐÏ×ÔÏÒÎÏ ÚÁÐÕÓÔÉ× - &man.sysinstall.8;. + &man.bsdinstall.8;. ëÒÁÊÎÅ ×ÁÖÎÏ ÐÒÏÞÅÓÔØ ÓÐÉÓÏË ÐÒÏÂÌÅÍ ÌÀÂÏÇÏ ÓÕÝÅÓÔ×ÕÀÝÅÇÏ Modified: head/release/doc/zh_CN.GB2312/readme/article.xml ============================================================================== --- head/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 17:52:16 2013 (r258569) +++ head/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 18:11:55 2013 (r258570) @@ -302,11 +302,11 @@ - ÔÚÖ§³Ö &man.sysinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ + ÔÚÖ§³Ö &man.bsdinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ &arch.amd64;¡¢ &arch.i386;¡¢ &arch.ia64;¡¢ &arch.pc98; ÒÔ¼° &arch.sparc64;)£¬ ÕâЩÎĵµÔÚ°²×°Ê±¶¼¿ÉÒÔͨ¹ý Documentation ²Ëµ¥·ÃÎÊ¡£ Ò»µ©ÏµÍ³ÒѾ­°²×°£¬Äú¿ÉÒÔͨ¹ýÖØÐÂÔËÐÐ - &man.sysinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ + &man.bsdinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ ÔÚ°²×°ÄúÄõ½µÄÈκη¢Ðаæ֮ǰÔĶÁ¿±ÎóÊǷdz£ÖØÒªµÄ£¬ From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 18:31:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA2B1906; Mon, 25 Nov 2013 18:31:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9C7E2E80; Mon, 25 Nov 2013 18:31:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIVDOM077929; Mon, 25 Nov 2013 18:31:13 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPIVD3i077928; Mon, 25 Nov 2013 18:31:13 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201311251831.rAPIVD3i077928@svn.freebsd.org> From: Ryan Stone Date: Mon, 25 Nov 2013 18:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258572 - head/lib/libpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:31:14 -0000 Author: rstone Date: Mon Nov 25 18:31:13 2013 New Revision: 258572 URL: http://svnweb.freebsd.org/changeset/base/258572 Log: pmc(3) does not document a dependency on but requires it, so include it explicitly from . MFC after: 1 month Modified: head/lib/libpmc/pmc.h Modified: head/lib/libpmc/pmc.h ============================================================================== --- head/lib/libpmc/pmc.h Mon Nov 25 18:28:34 2013 (r258571) +++ head/lib/libpmc/pmc.h Mon Nov 25 18:31:13 2013 (r258572) @@ -30,6 +30,7 @@ #define _PMC_H_ #include +#include #include /* From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 18:46:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67D79426; Mon, 25 Nov 2013 18:46:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6B52FAE; Mon, 25 Nov 2013 18:46:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIk9i5082151; Mon, 25 Nov 2013 18:46:09 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPIk9Qa082150; Mon, 25 Nov 2013 18:46:09 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311251846.rAPIk9Qa082150@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 25 Nov 2013 18:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258573 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:46:09 -0000 Author: pfg Date: Mon Nov 25 18:46:08 2013 New Revision: 258573 URL: http://svnweb.freebsd.org/changeset/base/258573 Log: MFV: removes strict-aliasing warnings from GCC in tcpdump. Reported by: tinderbox (gjb) Submitted by: glebius MFC after: 2 weeks Modified: head/contrib/tcpdump/extract.h Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/extract.h ============================================================================== --- head/contrib/tcpdump/extract.h Mon Nov 25 18:31:13 2013 (r258572) +++ head/contrib/tcpdump/extract.h Mon Nov 25 18:46:08 2013 (r258573) @@ -51,13 +51,25 @@ typedef struct { u_int32_t val; } __attribute__((packed)) unaligned_u_int32_t; -#define EXTRACT_16BITS(p) \ - ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val)) -#define EXTRACT_32BITS(p) \ - ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val)) -#define EXTRACT_64BITS(p) \ - ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 0)->val)) << 32 | \ - ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) << 0)) +static inline u_int16_t +EXTRACT_16BITS(const void *p) +{ + return ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val)); +} + +static inline u_int32_t +EXTRACT_32BITS(const void *p) +{ + return ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val)); +} + +static inline u_int64_t +EXTRACT_64BITS(const void *p) +{ + return ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 0)->val)) << 32 | \ + ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) << 0)); + +} #else /* HAVE___ATTRIBUTE__ */ /* @@ -88,13 +100,26 @@ typedef struct { * The processor natively handles unaligned loads, so we can just * cast the pointer and fetch through it. */ -#define EXTRACT_16BITS(p) \ - ((u_int16_t)ntohs(*(const u_int16_t *)(p))) -#define EXTRACT_32BITS(p) \ - ((u_int32_t)ntohl(*(const u_int32_t *)(p))) -#define EXTRACT_64BITS(p) \ - ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \ - ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0)) +static inline u_int16_t +EXTRACT_16BITS(const void *p) +{ + return ((u_int16_t)ntohs(*(const u_int16_t *)(p))); +} + +static inline u_int32_t +EXTRACT_32BITS(const void *p) +{ + return ((u_int32_t)ntohl(*(const u_int32_t *)(p))); +} + +static inline u_int64_t +EXTRACT_64BITS(const void *p) +{ + return ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \ + ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0)); + +} + #endif /* LBL_ALIGN */ #define EXTRACT_24BITS(p) \ From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 18:49:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52A4D59F; Mon, 25 Nov 2013 18:49:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 401C12FCB; Mon, 25 Nov 2013 18:49:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIncGc082567; Mon, 25 Nov 2013 18:49:38 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPInc38082566; Mon, 25 Nov 2013 18:49:38 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311251849.rAPInc38082566@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 18:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258574 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:49:38 -0000 Author: rodrigc Date: Mon Nov 25 18:49:37 2013 New Revision: 258574 URL: http://svnweb.freebsd.org/changeset/base/258574 Log: Only initialize some mutexes for the default VNET. In r208160, sctp_it_ctl was made a global variable, across all VNETs. However, sctp_init() is called for every VNET that is created. This results in the same global mutexes which are part of sctp_it_ctl being initialized. This can result in crashes if many jails are created. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Witness will warn about the same mutex being initialized. Fix the problem by only initializing these mutexes in the default VNET. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Nov 25 18:46:08 2013 (r258573) +++ head/sys/netinet/sctp_pcb.c Mon Nov 25 18:49:37 2013 (r258574) @@ -5864,8 +5864,14 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); + /* + * Only initialize non-VNET global mutexes for the + * default instance. + */ + if (IS_DEFAULT_VNET(curvnet)) { + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); + } sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 19:04:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2C02B5; Mon, 25 Nov 2013 19:04:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECF00212C; Mon, 25 Nov 2013 19:04:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPJ4eXM089524; Mon, 25 Nov 2013 19:04:40 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPJ4bRJ089498; Mon, 25 Nov 2013 19:04:37 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311251904.rAPJ4bRJ089498@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 19:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258578 - in head: include/rpc lib/libc/rpc sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 19:04:41 -0000 Author: hrs Date: Mon Nov 25 19:04:36 2013 New Revision: 258578 URL: http://svnweb.freebsd.org/changeset/base/258578 Log: Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. Modified: head/include/rpc/auth.h head/include/rpc/auth_des.h head/include/rpc/auth_kerb.h head/include/rpc/auth_unix.h head/include/rpc/clnt_soc.h head/include/rpc/des.h head/include/rpc/des_crypt.h head/include/rpc/nettype.h head/include/rpc/pmap_clnt.h head/include/rpc/pmap_prot.h head/include/rpc/pmap_rmt.h head/include/rpc/raw.h head/include/rpc/rpc.h head/include/rpc/rpc_com.h head/include/rpc/rpc_msg.h head/include/rpc/rpcb_clnt.h head/include/rpc/rpcb_prot.x head/include/rpc/rpcent.h head/include/rpc/svc.h head/include/rpc/svc_auth.h head/include/rpc/svc_dg.h head/include/rpc/svc_soc.h head/include/rpc/xdr.h head/lib/libc/rpc/DISCLAIMER head/lib/libc/rpc/auth_des.c head/lib/libc/rpc/auth_none.c head/lib/libc/rpc/auth_unix.c head/lib/libc/rpc/authdes_prot.c head/lib/libc/rpc/authunix_prot.c head/lib/libc/rpc/bindresvport.c head/lib/libc/rpc/clnt_bcast.c head/lib/libc/rpc/clnt_dg.c head/lib/libc/rpc/clnt_perror.c head/lib/libc/rpc/clnt_raw.c head/lib/libc/rpc/clnt_simple.c head/lib/libc/rpc/clnt_vc.c head/lib/libc/rpc/des_crypt.c head/lib/libc/rpc/des_soft.c head/lib/libc/rpc/getnetconfig.c head/lib/libc/rpc/getnetpath.c head/lib/libc/rpc/getpublickey.c head/lib/libc/rpc/getrpcent.c head/lib/libc/rpc/getrpcport.c head/lib/libc/rpc/key_call.c head/lib/libc/rpc/key_prot_xdr.c head/lib/libc/rpc/netname.c head/lib/libc/rpc/netnamer.c head/lib/libc/rpc/pmap_clnt.c head/lib/libc/rpc/pmap_getmaps.c head/lib/libc/rpc/pmap_getport.c head/lib/libc/rpc/pmap_prot.c head/lib/libc/rpc/pmap_prot2.c head/lib/libc/rpc/pmap_rmt.c head/lib/libc/rpc/rpc_callmsg.c head/lib/libc/rpc/rpc_com.h head/lib/libc/rpc/rpc_commondata.c head/lib/libc/rpc/rpc_dtablesize.c head/lib/libc/rpc/rpc_generic.c head/lib/libc/rpc/rpc_prot.c head/lib/libc/rpc/rpc_soc.c head/lib/libc/rpc/rpcb_prot.c head/lib/libc/rpc/rpcb_st_xdr.c head/lib/libc/rpc/rpcdname.c head/lib/libc/rpc/rtime.c head/lib/libc/rpc/svc.c head/lib/libc/rpc/svc_auth.c head/lib/libc/rpc/svc_auth_des.c head/lib/libc/rpc/svc_auth_unix.c head/lib/libc/rpc/svc_dg.c head/lib/libc/rpc/svc_generic.c head/lib/libc/rpc/svc_raw.c head/lib/libc/rpc/svc_run.c head/lib/libc/rpc/svc_simple.c head/lib/libc/rpc/svc_vc.c head/sys/rpc/auth.h head/sys/rpc/auth_none.c head/sys/rpc/auth_unix.c head/sys/rpc/authunix_prot.c head/sys/rpc/clnt_dg.c head/sys/rpc/clnt_vc.c head/sys/rpc/krpc.h head/sys/rpc/nettype.h head/sys/rpc/pmap_prot.h head/sys/rpc/rpc.h head/sys/rpc/rpc_callmsg.c head/sys/rpc/rpc_com.h head/sys/rpc/rpc_generic.c head/sys/rpc/rpc_msg.h head/sys/rpc/rpc_prot.c head/sys/rpc/rpcb_clnt.c head/sys/rpc/rpcb_prot.c head/sys/rpc/rpcb_prot.h head/sys/rpc/svc.c head/sys/rpc/svc.h head/sys/rpc/svc_auth.c head/sys/rpc/svc_auth.h head/sys/rpc/svc_auth_unix.c head/sys/rpc/svc_dg.c head/sys/rpc/svc_generic.c head/sys/rpc/svc_vc.c head/sys/rpc/types.h head/sys/rpc/xdr.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/auth.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: auth.h,v 1.15 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)auth.h 1.17 88/02/08 SMI * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC Modified: head/include/rpc/auth_des.h ============================================================================== --- head/include/rpc/auth_des.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/auth_des.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC * from: @(#)auth_des.h 1.14 94/04/25 SMI Modified: head/include/rpc/auth_kerb.h ============================================================================== --- head/include/rpc/auth_kerb.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/auth_kerb.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,31 +1,30 @@ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * auth_kerb.h, Protocol for Kerberos style authentication for RPC Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/auth_unix.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,30 +1,29 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)auth_unix.h 1.8 88/02/08 SMI * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC Modified: head/include/rpc/clnt_soc.h ============================================================================== --- head/include/rpc/clnt_soc.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/clnt_soc.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,33 +1,32 @@ /* $NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/des.h ============================================================================== --- head/include/rpc/des.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/des.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Generic DES driver interface Modified: head/include/rpc/des_crypt.h ============================================================================== --- head/include/rpc/des_crypt.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/des_crypt.h Mon Nov 25 19:04:36 2013 (r258578) @@ -5,33 +5,32 @@ * des_crypt.h, des library routine interface * Copyright (C) 1986, Sun Microsystems, Inc. */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/nettype.h ============================================================================== --- head/include/rpc/nettype.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/nettype.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,33 +1,32 @@ /* $NetBSD: nettype.h,v 1.2 2000/07/06 03:17:19 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/pmap_clnt.h ============================================================================== --- head/include/rpc/pmap_clnt.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/pmap_clnt.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC Modified: head/include/rpc/pmap_prot.h ============================================================================== --- head/include/rpc/pmap_prot.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/pmap_prot.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)pmap_prot.h 1.14 88/02/08 SMI * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC Modified: head/include/rpc/pmap_rmt.h ============================================================================== --- head/include/rpc/pmap_rmt.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/pmap_rmt.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: pmap_rmt.h,v 1.7 1998/02/11 23:01:23 lukem Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC Modified: head/include/rpc/raw.h ============================================================================== --- head/include/rpc/raw.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/raw.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,33 +1,32 @@ /* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/rpc.h ============================================================================== --- head/include/rpc/rpc.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/rpc.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)rpc.h 1.9 88/02/08 SMI * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC Modified: head/include/rpc/rpc_com.h ============================================================================== --- head/include/rpc/rpc_com.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/rpc_com.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,33 +1,32 @@ /* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/rpc_msg.h ============================================================================== --- head/include/rpc/rpc_msg.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/rpc_msg.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ /* $NetBSD: rpc_msg.h,v 1.11 2000/06/02 22:57:56 fvdl Exp $ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)rpc_msg.h 1.7 86/07/16 SMI * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC Modified: head/include/rpc/rpcb_clnt.h ============================================================================== --- head/include/rpc/rpcb_clnt.h Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/rpcb_clnt.h Mon Nov 25 19:04:36 2013 (r258578) @@ -1,33 +1,32 @@ /* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. Modified: head/include/rpc/rpcb_prot.x ============================================================================== --- head/include/rpc/rpcb_prot.x Mon Nov 25 19:04:10 2013 (r258577) +++ head/include/rpc/rpcb_prot.x Mon Nov 25 19:04:36 2013 (r258578) @@ -1,32 +1,31 @@ -%/* +%/*- % * $FreeBSD$ % * -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user. -% * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -% * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 19:04:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A24C3A4; Mon, 25 Nov 2013 19:04:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 281E42131; Mon, 25 Nov 2013 19:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPJ4ros089594; Mon, 25 Nov 2013 19:04:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPJ4pSn089582; Mon, 25 Nov 2013 19:04:51 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311251904.rAPJ4pSn089582@svn.freebsd.org> From: Neel Natu Date: Mon, 25 Nov 2013 19:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258579 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 19:04:53 -0000 Author: neel Date: Mon Nov 25 19:04:51 2013 New Revision: 258579 URL: http://svnweb.freebsd.org/changeset/base/258579 Log: Add HPET device emulation to bhyve. bhyve supports a single timer block with 8 timers. The timers are all 32-bit and capable of being operated in periodic mode. All timers support interrupt delivery using MSI. Timers 0 and 1 also support legacy interrupt routing. At the moment the timers are not connected to any ioapic pins but that will be addressed in a subsequent commit. This change is based on a patch from Tycho Nightingale (tycho.nightingale@pluribusnetworks.com). Added: head/sys/amd64/vmm/io/vhpet.c (contents, props changed) head/sys/amd64/vmm/io/vhpet.h (contents, props changed) Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h head/sys/amd64/include/vmm.h head/sys/amd64/include/vmm_dev.h head/sys/amd64/vmm/io/vioapic.h head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c head/sys/modules/vmm/Makefile head/usr.sbin/bhyve/acpi.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Mon Nov 25 19:04:36 2013 (r258578) +++ head/lib/libvmmapi/vmmapi.c Mon Nov 25 19:04:51 2013 (r258579) @@ -825,3 +825,16 @@ vm_get_gpa_pmap(struct vmctx *ctx, uint6 return (error); } + +int +vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities) +{ + int error; + struct vm_hpet_cap cap; + + bzero(&cap, sizeof(struct vm_hpet_cap)); + error = ioctl(ctx->fd, VM_GET_HPET_CAPABILITIES, &cap); + if (capabilities != NULL) + *capabilities = cap.capabilities; + return (error); +} Modified: head/lib/libvmmapi/vmmapi.h ============================================================================== --- head/lib/libvmmapi/vmmapi.h Mon Nov 25 19:04:36 2013 (r258578) +++ head/lib/libvmmapi/vmmapi.h Mon Nov 25 19:04:51 2013 (r258579) @@ -96,6 +96,8 @@ const char *vm_get_stat_desc(struct vmct int vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *s); int vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state s); +int vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities); + /* Reset vcpu register state */ int vcpu_reset(struct vmctx *ctx, int vcpu); Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Mon Nov 25 19:04:36 2013 (r258578) +++ head/sys/amd64/include/vmm.h Mon Nov 25 19:04:51 2013 (r258579) @@ -38,6 +38,7 @@ struct vm_memory_segment; struct seg_desc; struct vm_exit; struct vm_run; +struct vhpet; struct vioapic; struct vlapic; struct vmspace; @@ -118,6 +119,7 @@ void vm_nmi_clear(struct vm *vm, int vcp uint64_t *vm_guest_msrs(struct vm *vm, int cpu); struct vlapic *vm_lapic(struct vm *vm, int cpu); struct vioapic *vm_ioapic(struct vm *vm); +struct vhpet *vm_hpet(struct vm *vm); int vm_get_capability(struct vm *vm, int vcpu, int type, int *val); int vm_set_capability(struct vm *vm, int vcpu, int type, int val); int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state); Modified: head/sys/amd64/include/vmm_dev.h ============================================================================== --- head/sys/amd64/include/vmm_dev.h Mon Nov 25 19:04:36 2013 (r258578) +++ head/sys/amd64/include/vmm_dev.h Mon Nov 25 19:04:51 2013 (r258579) @@ -146,6 +146,10 @@ struct vm_gpa_pte { int ptenum; }; +struct vm_hpet_cap { + uint32_t capabilities; /* lower 32 bits of HPET capabilities */ +}; + enum { /* general routines */ IOCNUM_ABIVERS = 0, @@ -186,6 +190,7 @@ enum { /* kernel device state */ IOCNUM_SET_X2APIC_STATE = 60, IOCNUM_GET_X2APIC_STATE = 61, + IOCNUM_GET_HPET_CAPABILITIES = 62, }; #define VM_RUN \ @@ -236,6 +241,8 @@ enum { _IOW('v', IOCNUM_SET_X2APIC_STATE, struct vm_x2apic) #define VM_GET_X2APIC_STATE \ _IOWR('v', IOCNUM_GET_X2APIC_STATE, struct vm_x2apic) +#define VM_GET_HPET_CAPABILITIES \ + _IOR('v', IOCNUM_GET_HPET_CAPABILITIES, struct vm_hpet_cap) #define VM_GET_GPA_PMAP \ _IOWR('v', IOCNUM_GET_GPA_PMAP, struct vm_gpa_pte) #endif Added: head/sys/amd64/vmm/io/vhpet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/vmm/io/vhpet.c Mon Nov 25 19:04:51 2013 (r258579) @@ -0,0 +1,774 @@ +/*- + * Copyright (c) 2013 Tycho Nightingale + * Copyright (c) 2013 Neel Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "vmm_lapic.h" +#include "vioapic.h" +#include "vhpet.h" + +#include "vmm_ktr.h" + +static MALLOC_DEFINE(M_VHPET, "vhpet", "bhyve virtual hpet"); + +#define HPET_FREQ 10000000 /* 10.0 Mhz */ +#define FS_PER_S 1000000000000000ul + +/* Timer N Configuration and Capabilities Register */ +#define HPET_TCAP_RO_MASK (HPET_TCAP_INT_ROUTE | \ + HPET_TCAP_FSB_INT_DEL | \ + HPET_TCAP_SIZE | \ + HPET_TCAP_PER_INT) +/* + * HPET requires at least 3 timers and up to 32 timers per block. + */ +#define VHPET_NUM_TIMERS 8 +CTASSERT(VHPET_NUM_TIMERS >= 3 && VHPET_NUM_TIMERS <= 32); + +struct vhpet_callout_arg { + struct vhpet *vhpet; + int timer_num; +}; + +struct vhpet { + struct vm *vm; + struct mtx mtx; + sbintime_t freq_sbt; + + uint64_t config; /* Configuration */ + uint64_t isr; /* Interrupt Status */ + uint32_t counter; /* HPET Counter */ + sbintime_t counter_sbt; + + struct { + uint64_t cap_config; /* Configuration */ + uint64_t msireg; /* FSB interrupt routing */ + uint32_t compval; /* Comparator */ + uint32_t comprate; + struct callout callout; + struct vhpet_callout_arg arg; + } timer[VHPET_NUM_TIMERS]; +}; + +#define VHPET_LOCK(vhp) mtx_lock(&((vhp)->mtx)) +#define VHPET_UNLOCK(vhp) mtx_unlock(&((vhp)->mtx)) + +static uint64_t +vhpet_capabilities(void) +{ + uint64_t cap = 0; + + cap |= 0x8086 << 16; /* vendor id */ + cap |= HPET_CAP_LEG_RT; /* legacy routing capable */ + cap |= (VHPET_NUM_TIMERS - 1) << 8; /* number of timers */ + cap |= 1; /* revision */ + cap &= ~HPET_CAP_COUNT_SIZE; /* 32-bit timer */ + + cap &= 0xffffffff; + cap |= (FS_PER_S / HPET_FREQ) << 32; /* tick period in fs */ + + return (cap); +} + +static __inline bool +vhpet_counter_enabled(struct vhpet *vhpet) +{ + + return ((vhpet->config & HPET_CNF_ENABLE) ? true : false); +} + +static __inline bool +vhpet_timer_msi_enabled(struct vhpet *vhpet, int n) +{ + const uint64_t msi_enable = HPET_TCAP_FSB_INT_DEL | HPET_TCNF_FSB_EN; + + /* + * LegacyReplacement Route configuration takes precedence over MSI + * for timers 0 and 1. + */ + if (n == 0 || n == 1) { + if (vhpet->config & HPET_CNF_LEG_RT) + return (false); + } + + if ((vhpet->timer[n].cap_config & msi_enable) == msi_enable) + return (true); + else + return (false); +} + +static __inline int +vhpet_timer_ioapic_pin(struct vhpet *vhpet, int n) +{ + /* + * If the timer is configured to use MSI then treat it as if the + * timer is not connected to the ioapic. + */ + if (vhpet_timer_msi_enabled(vhpet, n)) + return (0); + + if (vhpet->config & HPET_CNF_LEG_RT) { + /* + * In "legacy routing" timers 0 and 1 are connected to + * ioapic pins 2 and 8 respectively. + */ + switch (n) { + case 0: + return (2); + case 1: + return (8); + } + } + + return ((vhpet->timer[n].cap_config & HPET_TCNF_INT_ROUTE) >> 9); +} + +static uint32_t +vhpet_counter(struct vhpet *vhpet, bool latch) +{ + uint32_t val; + sbintime_t cur_sbt, delta_sbt; + + val = vhpet->counter; + if (vhpet_counter_enabled(vhpet)) { + cur_sbt = sbinuptime(); + delta_sbt = cur_sbt - vhpet->counter_sbt; + KASSERT(delta_sbt >= 0, + ("vhpet counter went backwards: %#lx to %#lx", + vhpet->counter_sbt, cur_sbt)); + val += delta_sbt / vhpet->freq_sbt; + + /* + * Keep track of the last value of the main counter that + * was read by the guest. + */ + if (latch) { + vhpet->counter = val; + vhpet->counter_sbt = cur_sbt; + } + } + + return (val); +} + +static void +vhpet_timer_clear_isr(struct vhpet *vhpet, int n) +{ + int pin; + + if (vhpet->isr & (1 << n)) { + pin = vhpet_timer_ioapic_pin(vhpet, n); + KASSERT(pin != 0, ("vhpet timer %d irq incorrectly routed", n)); + vioapic_deassert_irq(vhpet->vm, pin); + vhpet->isr &= ~(1 << n); + } +} + +static __inline bool +vhpet_periodic_timer(struct vhpet *vhpet, int n) +{ + + return ((vhpet->timer[n].cap_config & HPET_TCNF_TYPE) != 0); +} + +static __inline bool +vhpet_timer_interrupt_enabled(struct vhpet *vhpet, int n) +{ + + return ((vhpet->timer[n].cap_config & HPET_TCNF_INT_ENB) != 0); +} + +static __inline bool +vhpet_timer_edge_trig(struct vhpet *vhpet, int n) +{ + + KASSERT(!vhpet_timer_msi_enabled(vhpet, n), ("vhpet_timer_edge_trig: " + "timer %d is using MSI", n)); + + /* The legacy replacement interrupts are always edge triggered */ + if (vhpet->config & HPET_CNF_LEG_RT) { + if (n == 0 || n == 1) + return (true); + } + + if ((vhpet->timer[n].cap_config & HPET_TCNF_INT_TYPE) == 0) + return (true); + else + return (false); +} + +static void +vhpet_timer_interrupt(struct vhpet *vhpet, int n) +{ + int apicid, vector, vcpuid, pin; + cpuset_t dmask; + + /* If interrupts are not enabled for this timer then just return. */ + if (!vhpet_timer_interrupt_enabled(vhpet, n)) + return; + + /* + * If a level triggered interrupt is already asserted then just return. + */ + if ((vhpet->isr & (1 << n)) != 0) { + VM_CTR1(vhpet->vm, "hpet t%d intr is already asserted", n); + return; + } + + if (vhpet_timer_msi_enabled(vhpet, n)) { + /* + * XXX should have an API 'vlapic_deliver_msi(vm, addr, data)' + * - assuming physical delivery mode + * - no need to interpret contents of 'msireg' here + */ + vector = vhpet->timer[n].msireg & 0xff; + apicid = (vhpet->timer[n].msireg >> (32 + 12)) & 0xff; + if (apicid != 0xff) { + /* unicast */ + vcpuid = vm_apicid2vcpuid(vhpet->vm, apicid); + lapic_set_intr(vhpet->vm, vcpuid, vector); + } else { + /* broadcast */ + dmask = vm_active_cpus(vhpet->vm); + while ((vcpuid = CPU_FFS(&dmask)) != 0) { + vcpuid--; + CPU_CLR(vcpuid, &dmask); + lapic_set_intr(vhpet->vm, vcpuid, vector); + } + } + return; + } + + pin = vhpet_timer_ioapic_pin(vhpet, n); + if (pin == 0) { + VM_CTR1(vhpet->vm, "hpet t%d intr is not routed to ioapic", n); + return; + } + + if (vhpet_timer_edge_trig(vhpet, n)) { + vioapic_pulse_irq(vhpet->vm, pin); + } else { + vhpet->isr |= 1 << n; + vioapic_assert_irq(vhpet->vm, pin); + } +} + +static void +vhpet_adjust_compval(struct vhpet *vhpet, int n, uint32_t counter) +{ + uint32_t compval, comprate, compnext; + + KASSERT(vhpet->timer[n].comprate != 0, ("hpet t%d is not periodic", n)); + + compval = vhpet->timer[n].compval; + comprate = vhpet->timer[n].comprate; + + /* + * Calculate the comparator value to be used for the next periodic + * interrupt. + * + * This function is commonly called from the callout handler. + * In this scenario the 'counter' is ahead of 'compval'. To find + * the next value to program into the accumulator we divide the + * number space between 'compval' and 'counter' into 'comprate' + * sized units. The 'compval' is rounded up such that is "ahead" + * of 'counter'. + */ + compnext = compval + ((counter - compval) / comprate + 1) * comprate; + + vhpet->timer[n].compval = compnext; +} + +static void +vhpet_handler(void *a) +{ + int n; + uint32_t counter; + sbintime_t sbt; + struct vhpet *vhpet; + struct callout *callout; + struct vhpet_callout_arg *arg; + + arg = a; + vhpet = arg->vhpet; + n = arg->timer_num; + callout = &vhpet->timer[n].callout; + + VM_CTR1(vhpet->vm, "hpet t%d fired", n); + + VHPET_LOCK(vhpet); + + if (callout_pending(callout)) /* callout was reset */ + goto done; + + if (!callout_active(callout)) /* callout was stopped */ + goto done; + + callout_deactivate(callout); + + if (!vhpet_counter_enabled(vhpet)) + panic("vhpet(%p) callout with counter disabled", vhpet); + + counter = vhpet_counter(vhpet, false); + + /* Update the accumulator for periodic timers */ + if (vhpet->timer[n].comprate != 0) + vhpet_adjust_compval(vhpet, n, counter); + + sbt = (vhpet->timer[n].compval - counter) * vhpet->freq_sbt; + callout_reset_sbt(callout, sbt, 0, vhpet_handler, arg, 0); + vhpet_timer_interrupt(vhpet, n); +done: + VHPET_UNLOCK(vhpet); + return; +} + +static void +vhpet_stop_timer(struct vhpet *vhpet, int n) +{ + + callout_stop(&vhpet->timer[n].callout); + vhpet_timer_clear_isr(vhpet, n); +} + +static void +vhpet_start_timer(struct vhpet *vhpet, int n) +{ + uint32_t counter, delta, delta2; + sbintime_t sbt; + + counter = vhpet_counter(vhpet, false); + + if (vhpet->timer[n].comprate != 0) + vhpet_adjust_compval(vhpet, n, counter); + + delta = vhpet->timer[n].compval - counter; + + /* + * In one-shot mode the guest will typically read the main counter + * before programming the comparator. We can use this heuristic to + * figure out whether the expiration time is in the past. If this + * is the case we schedule the callout to fire immediately. + */ + if (!vhpet_periodic_timer(vhpet, n)) { + delta2 = vhpet->timer[n].compval - vhpet->counter; + if (delta > delta2) { + VM_CTR3(vhpet->vm, "hpet t%d comparator value is in " + "the past: %u/%u/%u", counter, + vhpet->timer[n].compval, vhpet->counter); + delta = 0; + } + } + + sbt = delta * vhpet->freq_sbt; + callout_reset_sbt(&vhpet->timer[n].callout, sbt, 0, vhpet_handler, + &vhpet->timer[n].arg, 0); +} + +static void +vhpet_start_counting(struct vhpet *vhpet) +{ + int i; + + vhpet->counter_sbt = sbinuptime(); + for (i = 0; i < VHPET_NUM_TIMERS; i++) + vhpet_start_timer(vhpet, i); +} + +static void +vhpet_stop_counting(struct vhpet *vhpet) +{ + int i; + + for (i = 0; i < VHPET_NUM_TIMERS; i++) + vhpet_stop_timer(vhpet, i); +} + +static __inline void +update_register(uint64_t *regptr, uint64_t data, uint64_t mask) +{ + + *regptr &= ~mask; + *regptr |= (data & mask); +} + +static void +vhpet_timer_update_config(struct vhpet *vhpet, int n, uint64_t data, + uint64_t mask) +{ + bool clear_isr; + int old_pin, new_pin; + uint32_t allowed_irqs; + uint64_t oldval, newval; + + if (vhpet_timer_msi_enabled(vhpet, n) || + vhpet_timer_edge_trig(vhpet, n)) { + if (vhpet->isr & (1 << n)) + panic("vhpet timer %d isr should not be asserted", n); + } + old_pin = vhpet_timer_ioapic_pin(vhpet, n); + oldval = vhpet->timer[n].cap_config; + + newval = oldval; + update_register(&newval, data, mask); + newval &= ~(HPET_TCAP_RO_MASK | HPET_TCNF_32MODE); + newval |= oldval & HPET_TCAP_RO_MASK; + + if (newval == oldval) + return; + + vhpet->timer[n].cap_config = newval; + VM_CTR2(vhpet->vm, "hpet t%d cap_config set to 0x%016x", n, newval); + + /* + * Validate the interrupt routing in the HPET_TCNF_INT_ROUTE field. + * If it does not match the bits set in HPET_TCAP_INT_ROUTE then set + * it to the default value of 0. + */ + allowed_irqs = vhpet->timer[n].cap_config >> 32; + new_pin = vhpet_timer_ioapic_pin(vhpet, n); + if (new_pin != 0 && (allowed_irqs & (1 << new_pin)) == 0) { + VM_CTR3(vhpet->vm, "hpet t%d configured invalid irq %d, " + "allowed_irqs 0x%08x", n, new_pin, allowed_irqs); + new_pin = 0; + vhpet->timer[n].cap_config &= ~HPET_TCNF_INT_ROUTE; + } + + if (!vhpet_periodic_timer(vhpet, n)) + vhpet->timer[n].comprate = 0; + + /* + * If the timer's ISR bit is set then clear it in the following cases: + * - interrupt is disabled + * - interrupt type is changed from level to edge or fsb. + * - interrupt routing is changed + * + * This is to ensure that this timer's level triggered interrupt does + * not remain asserted forever. + */ + if (vhpet->isr & (1 << n)) { + KASSERT(old_pin != 0, ("timer %d isr asserted to ioapic pin %d", + n, old_pin)); + if (!vhpet_timer_interrupt_enabled(vhpet, n)) + clear_isr = true; + else if (vhpet_timer_msi_enabled(vhpet, n)) + clear_isr = true; + else if (vhpet_timer_edge_trig(vhpet, n)) + clear_isr = true; + else if (vhpet_timer_ioapic_pin(vhpet, n) != old_pin) + clear_isr = true; + else + clear_isr = false; + + if (clear_isr) { + VM_CTR1(vhpet->vm, "hpet t%d isr cleared due to " + "configuration change", n); + vioapic_deassert_irq(vhpet->vm, old_pin); + vhpet->isr &= ~(1 << n); + } + } +} + +int +vhpet_mmio_write(void *vm, int vcpuid, uint64_t gpa, uint64_t val, int size, + void *arg) +{ + struct vhpet *vhpet; + uint64_t data, mask, oldval, val64; + uint32_t isr_clear_mask, old_compval, old_comprate; + int i, offset; + + vhpet = vm_hpet(vm); + offset = gpa - VHPET_BASE; + + VHPET_LOCK(vhpet); + + /* Accesses to the HPET should be 4 or 8 bytes wide */ + switch (size) { + case 8: + mask = 0xffffffffffffffff; + data = val; + break; + case 4: + mask = 0xffffffff; + data = val; + if ((offset & 0x4) != 0) { + mask <<= 32; + data <<= 32; + } + break; + default: + VM_CTR2(vhpet->vm, "hpet invalid mmio write: " + "offset 0x%08x, size %d", offset, size); + goto done; + } + + /* Access to the HPET should be naturally aligned to its width */ + if (offset & (size - 1)) { + VM_CTR2(vhpet->vm, "hpet invalid mmio write: " + "offset 0x%08x, size %d", offset, size); + goto done; + } + + if (offset == HPET_CONFIG || offset == HPET_CONFIG + 4) { + oldval = vhpet->config; + update_register(&vhpet->config, data, mask); + if ((oldval ^ vhpet->config) & HPET_CNF_ENABLE) { + if (vhpet_counter_enabled(vhpet)) { + vhpet_start_counting(vhpet); + VM_CTR0(vhpet->vm, "hpet enabled"); + } else { + vhpet_stop_counting(vhpet); + VM_CTR0(vhpet->vm, "hpet disabled"); + } + } + goto done; + } + + if (offset == HPET_ISR || offset == HPET_ISR + 4) { + isr_clear_mask = vhpet->isr & data; + for (i = 0; i < VHPET_NUM_TIMERS; i++) { + if ((isr_clear_mask & (1 << i)) != 0) { + VM_CTR1(vhpet->vm, "hpet t%d isr cleared", i); + vhpet_timer_clear_isr(vhpet, i); + } + } + goto done; + } + + if (offset == HPET_MAIN_COUNTER || offset == HPET_MAIN_COUNTER + 4) { + /* Zero-extend the counter to 64-bits before updating it */ + val64 = vhpet->counter; + update_register(&val64, data, mask); + vhpet->counter = val64; + if (vhpet_counter_enabled(vhpet)) + vhpet_start_counting(vhpet); + goto done; + } + + for (i = 0; i < VHPET_NUM_TIMERS; i++) { + if (offset == HPET_TIMER_CAP_CNF(i) || + offset == HPET_TIMER_CAP_CNF(i) + 4) { + vhpet_timer_update_config(vhpet, i, data, mask); + break; + } + + if (offset == HPET_TIMER_COMPARATOR(i) || + offset == HPET_TIMER_COMPARATOR(i) + 4) { + old_compval = vhpet->timer[i].compval; + old_comprate = vhpet->timer[i].comprate; + if (vhpet_periodic_timer(vhpet, i)) { + /* + * In periodic mode writes to the comparator + * change the 'compval' register only if the + * HPET_TCNF_VAL_SET bit is set in the config + * register. + */ + val64 = vhpet->timer[i].comprate; + update_register(&val64, data, mask); + vhpet->timer[i].comprate = val64; + if ((vhpet->timer[i].cap_config & + HPET_TCNF_VAL_SET) != 0) { + vhpet->timer[i].compval = val64; + } + } else { + KASSERT(vhpet->timer[i].comprate == 0, + ("vhpet one-shot timer %d has invalid " + "rate %u", i, vhpet->timer[i].comprate)); + val64 = vhpet->timer[i].compval; + update_register(&val64, data, mask); + vhpet->timer[i].compval = val64; + } + vhpet->timer[i].cap_config &= ~HPET_TCNF_VAL_SET; + + if (vhpet->timer[i].compval != old_compval || + vhpet->timer[i].comprate != old_comprate) { + if (vhpet_counter_enabled(vhpet)) + vhpet_start_timer(vhpet, i); + } + break; + } + + if (offset == HPET_TIMER_FSB_VAL(i) || + offset == HPET_TIMER_FSB_ADDR(i)) { + update_register(&vhpet->timer[i].msireg, data, mask); + break; + } + } +done: + VHPET_UNLOCK(vhpet); + return (0); +} + +int +vhpet_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *rval, int size, + void *arg) +{ + int i, offset; + struct vhpet *vhpet; + uint64_t data; + + vhpet = vm_hpet(vm); + offset = gpa - VHPET_BASE; + + VHPET_LOCK(vhpet); + + /* Accesses to the HPET should be 4 or 8 bytes wide */ + if (size != 4 && size != 8) { + VM_CTR2(vhpet->vm, "hpet invalid mmio read: " + "offset 0x%08x, size %d", offset, size); + data = 0; + goto done; + } + + /* Access to the HPET should be naturally aligned to its width */ + if (offset & (size - 1)) { + VM_CTR2(vhpet->vm, "hpet invalid mmio read: " + "offset 0x%08x, size %d", offset, size); + data = 0; + goto done; + } + + if (offset == HPET_CAPABILITIES || offset == HPET_CAPABILITIES + 4) { + data = vhpet_capabilities(); + goto done; + } + + if (offset == HPET_CONFIG || offset == HPET_CONFIG + 4) { + data = vhpet->config; + goto done; + } + + if (offset == HPET_ISR || offset == HPET_ISR + 4) { + data = vhpet->isr; + goto done; + } + + if (offset == HPET_MAIN_COUNTER || offset == HPET_MAIN_COUNTER + 4) { + data = vhpet_counter(vhpet, true); + goto done; + } + + for (i = 0; i < VHPET_NUM_TIMERS; i++) { + if (offset == HPET_TIMER_CAP_CNF(i) || + offset == HPET_TIMER_CAP_CNF(i) + 4) { + data = vhpet->timer[i].cap_config; + break; + } + + if (offset == HPET_TIMER_COMPARATOR(i) || + offset == HPET_TIMER_COMPARATOR(i) + 4) { + data = vhpet->timer[i].compval; + break; + } + + if (offset == HPET_TIMER_FSB_VAL(i) || + offset == HPET_TIMER_FSB_ADDR(i)) { + data = vhpet->timer[i].msireg; + break; + } + } + + if (i >= VHPET_NUM_TIMERS) + data = 0; +done: + VHPET_UNLOCK(vhpet); + + if (size == 4) { + if (offset & 0x4) + data >>= 32; + } + *rval = data; + return (0); +} + +struct vhpet * +vhpet_init(struct vm *vm) +{ + int i; + struct vhpet *vhpet; + struct vhpet_callout_arg *arg; + struct bintime bt; + + vhpet = malloc(sizeof(struct vhpet), M_VHPET, M_WAITOK | M_ZERO); + vhpet->vm = vm; + mtx_init(&vhpet->mtx, "vhpet lock", NULL, MTX_DEF); + + FREQ2BT(HPET_FREQ, &bt); + vhpet->freq_sbt = bttosbt(bt); + + /* + * Initialize HPET timer hardware state. + */ + for (i = 0; i < VHPET_NUM_TIMERS; i++) { + vhpet->timer[i].cap_config = 0UL << 32 | + HPET_TCAP_FSB_INT_DEL | HPET_TCAP_PER_INT; + vhpet->timer[i].compval = 0xffffffff; + callout_init(&vhpet->timer[i].callout, 1); + + arg = &vhpet->timer[i].arg; + arg->vhpet = vhpet; + arg->timer_num = i; + } + + return (vhpet); +} + +void +vhpet_cleanup(struct vhpet *vhpet) +{ + int i; + + for (i = 0; i < VHPET_NUM_TIMERS; i++) + callout_drain(&vhpet->timer[i].callout); + + free(vhpet, M_VHPET); +} + +int +vhpet_getcap(struct vm_hpet_cap *cap) +{ + + cap->capabilities = vhpet_capabilities(); + return (0); +} Added: head/sys/amd64/vmm/io/vhpet.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/vmm/io/vhpet.h Mon Nov 25 19:04:51 2013 (r258579) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2013 Tycho Nightingale + * Copyright (c) 2013 Neel Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _VHPET_H_ +#define _VHPET_H_ + +#define VHPET_BASE 0xfed00000 +#define VHPET_SIZE 1024 + +struct vhpet *vhpet_init(struct vm *vm); +void vhpet_cleanup(struct vhpet *vhpet); +int vhpet_mmio_write(void *vm, int vcpuid, uint64_t gpa, uint64_t val, + int size, void *arg); +int vhpet_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *val, + int size, void *arg); +int vhpet_getcap(struct vm_hpet_cap *cap); + +#endif /* _VHPET_H_ */ Modified: head/sys/amd64/vmm/io/vioapic.h ============================================================================== --- head/sys/amd64/vmm/io/vioapic.h Mon Nov 25 19:04:36 2013 (r258578) +++ head/sys/amd64/vmm/io/vioapic.h Mon Nov 25 19:04:51 2013 (r258579) @@ -30,9 +30,6 @@ #ifndef _VIOAPIC_H_ #define _VIOAPIC_H_ -struct vm; -struct vioapic; - #define VIOAPIC_BASE 0xFEC00000 #define VIOAPIC_SIZE 4096 Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Mon Nov 25 19:04:36 2013 (r258578) +++ head/sys/amd64/vmm/vmm.c Mon Nov 25 19:04:51 2013 (r258579) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include "vmm_host.h" #include "vmm_mem.h" #include "vmm_util.h" +#include "vhpet.h" #include "vioapic.h" #include "vlapic.h" #include "vmm_msr.h" @@ -108,6 +109,7 @@ struct mem_seg { struct vm { void *cookie; /* processor-specific data */ void *iommu; /* iommu-specific data */ + struct vhpet *vhpet; /* virtual HPET */ struct vioapic *vioapic; /* virtual ioapic */ struct vmspace *vmspace; /* guest's address space */ struct vcpu vcpu[VM_MAXCPU]; @@ -304,6 +306,7 @@ vm_create(const char *name, struct vm ** strcpy(vm->name, name); vm->cookie = VMINIT(vm, vmspace_pmap(vmspace)); vm->vioapic = vioapic_init(vm); + vm->vhpet = vhpet_init(vm); for (i = 0; i < VM_MAXCPU; i++) { vcpu_init(vm, i); @@ -337,6 +340,9 @@ vm_destroy(struct vm *vm) if (vm->iommu != NULL) iommu_destroy_domain(vm->iommu); + vhpet_cleanup(vm->vhpet); + vioapic_cleanup(vm->vioapic); + for (i = 0; i < vm->num_mem_segs; i++) vm_free_mem_seg(vm, &vm->mem_segs[i]); @@ -345,8 +351,6 @@ vm_destroy(struct vm *vm) for (i = 0; i < VM_MAXCPU; i++) vcpu_cleanup(&vm->vcpu[i]); - vioapic_cleanup(vm->vioapic); - VMSPACE_FREE(vm->vmspace); VMCLEANUP(vm->cookie); @@ -967,13 +971,16 @@ vm_handle_inst_emul(struct vm *vm, int v if (vmm_decode_instruction(vm, vcpuid, gla, vie) != 0) return (EFAULT); - /* return to userland unless this is a local apic access */ + /* return to userland unless this is an in-kernel emulated device */ if (gpa >= DEFAULT_APIC_BASE && gpa < DEFAULT_APIC_BASE + PAGE_SIZE) { mread = lapic_mmio_read; mwrite = lapic_mmio_write; } else if (gpa >= VIOAPIC_BASE && gpa < VIOAPIC_BASE + VIOAPIC_SIZE) { mread = vioapic_mmio_read; mwrite = vioapic_mmio_write; + } else if (gpa >= VHPET_BASE && gpa < VHPET_BASE + VHPET_SIZE) { + mread = vhpet_mmio_read; + mwrite = vhpet_mmio_write; } else { *retu = TRUE; return (0); @@ -1169,6 +1176,13 @@ vm_ioapic(struct vm *vm) return (vm->vioapic); } +struct vhpet * +vm_hpet(struct vm *vm) +{ + + return (vm->vhpet); +} + boolean_t vmm_is_pptdev(int bus, int slot, int func) { Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Mon Nov 25 19:04:36 2013 (r258578) +++ head/sys/amd64/vmm/vmm_dev.c Mon Nov 25 19:04:51 2013 (r258579) @@ -47,14 +47,15 @@ __FBSDID("$FreeBSD$"); #include #include - #include +#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 19:07:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C025D781; Mon, 25 Nov 2013 19:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF9532179; Mon, 25 Nov 2013 19:07:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPJ7idb090081; Mon, 25 Nov 2013 19:07:44 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPJ7iss090080; Mon, 25 Nov 2013 19:07:44 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311251907.rAPJ7iss090080@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 19:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258580 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 19:07:44 -0000 Author: hrs Date: Mon Nov 25 19:07:44 2013 New Revision: 258580 URL: http://svnweb.freebsd.org/changeset/base/258580 Log: Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. Modified: head/sys/rpc/rpcb_clnt.h Modified: head/sys/rpc/rpcb_clnt.h ============================================================================== --- head/sys/rpc/rpcb_clnt.h Mon Nov 25 19:04:51 2013 (r258579) +++ head/sys/rpc/rpcb_clnt.h Mon Nov 25 19:07:44 2013 (r258580) @@ -1,33 +1,32 @@ /* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ /* $FreeBSD$ */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. +/*- + * Copyright (c) 2009, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 19:08:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BA9B8C5; Mon, 25 Nov 2013 19:08:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58D5D2182; Mon, 25 Nov 2013 19:08:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPJ8dJc090346; Mon, 25 Nov 2013 19:08:39 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPJ8cPi090309; Mon, 25 Nov 2013 19:08:38 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311251908.rAPJ8cPi090309@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 19:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258581 - in head: include/rpc lib/libc/rpc sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 19:08:39 -0000 Author: hrs Date: Mon Nov 25 19:08:38 2013 New Revision: 258581 URL: http://svnweb.freebsd.org/changeset/base/258581 Log: Replace Sun Industry Standards Source License for Sun RPC code with a 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Modified: head/include/rpc/clnt.h head/lib/libc/rpc/clnt_generic.c head/lib/libc/rpc/rpcb_clnt.c head/sys/rpc/clnt.h Modified: head/include/rpc/clnt.h ============================================================================== --- head/include/rpc/clnt.h Mon Nov 25 19:07:44 2013 (r258580) +++ head/include/rpc/clnt.h Mon Nov 25 19:08:38 2013 (r258581) @@ -1,49 +1,31 @@ /* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. - * - * All Rights Reserved. - * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)clnt.h 1.31 94/04/29 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC @@ -52,9 +34,6 @@ /* * clnt.h - Client side remote procedure call interface. - * - * Copyright (c) 1986-1991,1994-1999 by Sun Microsystems, Inc. - * All rights reserved. */ #ifndef _RPC_CLNT_H_ Modified: head/lib/libc/rpc/clnt_generic.c ============================================================================== --- head/lib/libc/rpc/clnt_generic.c Mon Nov 25 19:07:44 2013 (r258580) +++ head/lib/libc/rpc/clnt_generic.c Mon Nov 25 19:08:38 2013 (r258581) @@ -1,49 +1,31 @@ /* $NetBSD: clnt_generic.c,v 1.18 2000/07/06 03:10:34 christos Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. - * - * All Rights Reserved. - * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* #ident "@(#)clnt_generic.c 1.40 99/04/21 SMI" */ Modified: head/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- head/lib/libc/rpc/rpcb_clnt.c Mon Nov 25 19:07:44 2013 (r258580) +++ head/lib/libc/rpc/rpcb_clnt.c Mon Nov 25 19:08:38 2013 (r258581) @@ -1,52 +1,31 @@ /* $NetBSD: rpcb_clnt.c,v 1.6 2000/07/16 06:41:43 itojun Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. * - * All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Copyright (c) 1986-1991 by Sun Microsystems Inc. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ /* #ident "@(#)rpcb_clnt.c 1.27 94/04/24 SMI" */ @@ -61,8 +40,6 @@ __FBSDID("$FreeBSD$"); /* * rpcb_clnt.c * interface to rpcbind rpc service. - * - * Copyright (C) 1988, Sun Microsystems, Inc. */ #include "namespace.h" Modified: head/sys/rpc/clnt.h ============================================================================== --- head/sys/rpc/clnt.h Mon Nov 25 19:07:44 2013 (r258580) +++ head/sys/rpc/clnt.h Mon Nov 25 19:08:38 2013 (r258581) @@ -1,49 +1,31 @@ /* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */ -/* - * The contents of this file are subject to the Sun Standards - * License Version 1.0 the (the "License";) You may not use - * this file except in compliance with the License. You may - * obtain a copy of the License at lib/libc/rpc/LICENSE - * - * Software distributed under the License is distributed on - * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either - * express or implied. See the License for the specific - * language governing rights and limitations under the License. - * - * The Original Code is Copyright 1998 by Sun Microsystems, Inc - * - * The Initial Developer of the Original Code is: Sun - * Microsystems, Inc. - * - * All Rights Reserved. - * - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. * * from: @(#)clnt.h 1.31 94/04/29 SMI * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 19:24:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B30C12D8; Mon, 25 Nov 2013 19:24:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 891E62287; Mon, 25 Nov 2013 19:24:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPJOFXA097267; Mon, 25 Nov 2013 19:24:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPJOFiV097266; Mon, 25 Nov 2013 19:24:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311251924.rAPJOFiV097266@svn.freebsd.org> From: Hiroki Sato Date: Mon, 25 Nov 2013 19:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258582 - head/lib/libc/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 19:24:15 -0000 Author: hrs Date: Mon Nov 25 19:24:15 2013 New Revision: 258582 URL: http://svnweb.freebsd.org/changeset/base/258582 Log: There is no file under SISSL after license replacement in r258581. Deleted: head/lib/libc/rpc/LICENSE From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:03:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D057E891; Mon, 25 Nov 2013 20:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD8F425AF; Mon, 25 Nov 2013 20:03:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPK3vYu014418; Mon, 25 Nov 2013 20:03:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPK3vj3014417; Mon, 25 Nov 2013 20:03:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311252003.rAPK3vj3014417@svn.freebsd.org> From: Eitan Adler Date: Mon, 25 Nov 2013 20:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258585 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:03:57 -0000 Author: eadler Date: Mon Nov 25 20:03:57 2013 New Revision: 258585 URL: http://svnweb.freebsd.org/changeset/base/258585 Log: Add missing cards now supported by iwn. Modified: head/share/man/man4/iwn.4 Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Mon Nov 25 20:01:34 2013 (r258584) +++ head/share/man/man4/iwn.4 Mon Nov 25 20:03:57 2013 (r258585) @@ -87,9 +87,18 @@ driver provides support for: .It Intel Centrino Advanced-N 6230 .It Intel Centrino Advanced-N + WiMAX 6250 .It Intel Centrino Ultimate-N 6300 +.It Intel Centrino Wireless-N 100 .It Intel Centrino Wireless-N 130 .It Intel Centrino Wireless-N 1000 .It Intel Centrino Wireless-N 1030 +.It Intel Centrino Wireless-N 2200 +.It Intel Centrino Wireless-N 2230 +.It Intel Centrino Wireless-N 4965 +.It Intel Centrino Wireless-N 5100 +.It Intel Centrino Wireless-N 6150 +.It Intel Centrino Wireless-N 6200 +.It Intel Centrino Wireless-N 6250 +.It Intel Centrino Wireless-N 6250 .It Intel Centrino Wireless-N + WiMAX 6150 .It Intel Ultimate N WiFi Link 5300 .It Intel Wireless WiFi Link 4965 From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:17:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E440D9C; Mon, 25 Nov 2013 20:17:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B76C2673; Mon, 25 Nov 2013 20:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKHwjA018837; Mon, 25 Nov 2013 20:17:58 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKHtBa018813; Mon, 25 Nov 2013 20:17:55 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311252017.rAPKHtBa018813@svn.freebsd.org> From: Peter Wemm Date: Mon, 25 Nov 2013 20:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258587 - in head/lib: libc libc/iconv libc_nonshared X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:17:58 -0000 Author: peter Date: Mon Nov 25 20:17:55 2013 New Revision: 258587 URL: http://svnweb.freebsd.org/changeset/base/258587 Log: Move the iconv wrapper source from libc_nonshared to libc/iconv so that it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Discussed with: kib (and partly stolen from his patch) Added: head/lib/libc/iconv/__iconv.c - copied unchanged from r258569, head/lib/libc_nonshared/__iconv.c head/lib/libc/iconv/__iconv_free_list.c - copied unchanged from r258569, head/lib/libc_nonshared/__iconv_free_list.c head/lib/libc/iconv/__iconv_get_list.c - copied unchanged from r258569, head/lib/libc_nonshared/__iconv_get_list.c head/lib/libc/iconv/bsd_iconv.c - copied unchanged from r258569, head/lib/libc/iconv/iconv.c head/lib/libc/iconv/iconv_canonicalize.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv_canonicalize.c head/lib/libc/iconv/iconv_close.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv_close.c head/lib/libc/iconv/iconv_open.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv_open.c head/lib/libc/iconv/iconv_open_into.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv_open_into.c head/lib/libc/iconv/iconv_set_relocation_prefix.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv_set_relocation_prefix.c head/lib/libc/iconv/iconvctl.c - copied unchanged from r258569, head/lib/libc_nonshared/iconvctl.c head/lib/libc/iconv/iconvlist.c - copied unchanged from r258569, head/lib/libc_nonshared/iconvlist.c head/lib/libc_nonshared/Makefile.iconv - copied, changed from r258569, head/lib/libc_nonshared/Makefile Replaced: head/lib/libc/iconv/iconv.c - copied unchanged from r258569, head/lib/libc_nonshared/iconv.c Deleted: head/lib/libc_nonshared/__iconv.c head/lib/libc_nonshared/__iconv_free_list.c head/lib/libc_nonshared/__iconv_get_list.c head/lib/libc_nonshared/iconv.c head/lib/libc_nonshared/iconv_canonicalize.c head/lib/libc_nonshared/iconv_close.c head/lib/libc_nonshared/iconv_open.c head/lib/libc_nonshared/iconv_open_into.c head/lib/libc_nonshared/iconv_set_relocation_prefix.c head/lib/libc_nonshared/iconvctl.c head/lib/libc_nonshared/iconvlist.c Modified: head/lib/libc/Makefile head/lib/libc/iconv/Makefile.inc head/lib/libc_nonshared/Makefile Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Mon Nov 25 20:05:23 2013 (r258586) +++ head/lib/libc/Makefile Mon Nov 25 20:17:55 2013 (r258587) @@ -50,6 +50,9 @@ LDADD+= -lgcc LDADD+= -lssp_nonshared .endif +# Extras that live in either libc.a or libc_nonshared.a +LIBC_NONSHARED_SRCS= + # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= @@ -114,6 +117,8 @@ CFLAGS+= -DNS_CACHING CFLAGS+=-D_FREEFALL_CONFIG .endif +STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} + VERSION_DEF=${.CURDIR}/Versions.def SYMBOL_MAPS=${SYM_MAPS} CFLAGS+= -DSYMBOL_VERSIONING Modified: head/lib/libc/iconv/Makefile.inc ============================================================================== --- head/lib/libc/iconv/Makefile.inc Mon Nov 25 20:05:23 2013 (r258586) +++ head/lib/libc/iconv/Makefile.inc Mon Nov 25 20:17:55 2013 (r258587) @@ -14,5 +14,9 @@ SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \ citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \ citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \ - citrus_prop.c citrus_stdenc.c iconv.c iconv_compat.c + citrus_prop.c citrus_stdenc.c bsd_iconv.c iconv_compat.c SYM_MAPS+= ${.CURDIR}/iconv/Symbol.map + +.if ${MK_ICONV} == yes +.include "${.CURDIR}/../libc_nonshared/Makefile.iconv" +.endif Copied: head/lib/libc/iconv/__iconv.c (from r258569, head/lib/libc_nonshared/__iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/__iconv.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/__iconv.c) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +__iconv(iconv_t a, const char **b, size_t *c, char **d, + size_t *e, __uint32_t f, size_t *g) +{ + return __bsd___iconv(a, b, c, d, e, f, g); +} Copied: head/lib/libc/iconv/__iconv_free_list.c (from r258569, head/lib/libc_nonshared/__iconv_free_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/__iconv_free_list.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/__iconv_free_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +__iconv_free_list(char **a, size_t b) +{ + __bsd___iconv_free_list(a, b); +} Copied: head/lib/libc/iconv/__iconv_get_list.c (from r258569, head/lib/libc_nonshared/__iconv_get_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/__iconv_get_list.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/__iconv_get_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +__iconv_get_list(char ***a, size_t *b, __iconv_bool c) +{ + return __bsd___iconv_get_list(a, b, c); +} Copied: head/lib/libc/iconv/bsd_iconv.c (from r258569, head/lib/libc/iconv/iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/bsd_iconv.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc/iconv/iconv.c) @@ -0,0 +1,318 @@ +/* $FreeBSD$ */ +/* $NetBSD: iconv.c,v 1.11 2009/03/03 16:22:33 explorer Exp $ */ + +/*- + * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2009, 2010 Gabor Kovesdan , + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "citrus_types.h" +#include "citrus_module.h" +#include "citrus_esdb.h" +#include "citrus_hash.h" +#include "citrus_iconv.h" + +#include "iconv-internal.h" + +#define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) + +static iconv_t +__bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) +{ + const char *out_slashes; + char *out_noslashes; + int ret; + + /* + * Remove anything following a //, as these are options (like + * //ignore, //translate, etc) and we just don't handle them. + * This is for compatibility with software that uses these + * blindly. + */ + out_slashes = strstr(out, "//"); + if (out_slashes != NULL) { + out_noslashes = strndup(out, out_slashes - out); + if (out_noslashes == NULL) { + errno = ENOMEM; + return ((iconv_t)-1); + } + ret = _citrus_iconv_open(&handle, in, out_noslashes); + free(out_noslashes); + } else { + ret = _citrus_iconv_open(&handle, in, out); + } + + if (ret) { + errno = ret == ENOENT ? EINVAL : ret; + return ((iconv_t)-1); + } + + handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_hooks = NULL; + + return ((iconv_t)(void *)handle); +} + +iconv_t +__bsd_iconv_open(const char *out, const char *in) +{ + + return (__bsd___iconv_open(out, in, NULL)); +} + +int +__bsd_iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) +{ + struct _citrus_iconv *handle; + + handle = (struct _citrus_iconv *)ptr; + return ((__bsd___iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); +} + +int +__bsd_iconv_close(iconv_t handle) +{ + + if (ISBADF(handle)) { + errno = EBADF; + return (-1); + } + + _citrus_iconv_close((struct _citrus_iconv *)(void *)handle); + + return (0); +} + +size_t +__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, 0, &ret); + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +size_t +__bsd___iconv(iconv_t handle, const char **in, size_t *szin, char **out, + size_t *szout, uint32_t flags, size_t *invalids) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, flags, &ret); + if (invalids) + *invalids = ret; + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +int +__bsd___iconv_get_list(char ***rlist, size_t *rsz, bool sorted) +{ + int ret; + + ret = _citrus_esdb_get_list(rlist, rsz, sorted); + if (ret) { + errno = ret; + return (-1); + } + + return (0); +} + +void +__bsd___iconv_free_list(char **list, size_t sz) +{ + + _citrus_esdb_free_list(list, sz); +} + +/* + * GNU-compatibile non-standard interfaces. + */ +static int +qsort_helper(const void *first, const void *second) +{ + const char * const *s1; + const char * const *s2; + + s1 = first; + s2 = second; + return (strcmp(*s1, *s2)); +} + +void +__bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, + void *), void *data) +{ + char **list, **names; + const char * const *np; + char *curitem, *curkey, *slashpos; + size_t sz; + unsigned int i, j; + + i = 0; + + if (__bsd___iconv_get_list(&list, &sz, true)) + list = NULL; + qsort((void *)list, sz, sizeof(char *), qsort_helper); + while (i < sz) { + j = 0; + slashpos = strchr(list[i], '/'); + curkey = (char *)malloc(slashpos - list[i] + 2); + names = (char **)malloc(sz * sizeof(char *)); + if ((curkey == NULL) || (names == NULL)) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curkey, list[i], slashpos - list[i] + 1); + names[j++] = strdup(curkey); + for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { + slashpos = strchr(list[i], '/'); + curitem = (char *)malloc(strlen(slashpos) + 1); + if (curitem == NULL) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1); + if (strcmp(curkey, curitem) == 0) { + continue; + } + names[j++] = strdup(curitem); + } + np = (const char * const *)names; + do_one(j, np, data); + free(names); + } + + __bsd___iconv_free_list(list, sz); +} + +__inline const char * +__bsd_iconv_canonicalize(const char *name) +{ + + return (_citrus_iconv_canonicalize(name)); +} + +int +__bsd_iconvctl(iconv_t cd, int request, void *argument) +{ + struct _citrus_iconv *cv; + struct iconv_hooks *hooks; + const char *convname; + char src[PATH_MAX], *dst; + int *i; + + cv = (struct _citrus_iconv *)(void *)cd; + hooks = (struct iconv_hooks *)argument; + i = (int *)argument; + + if (ISBADF(cd)) { + errno = EBADF; + return (-1); + } + + switch (request) { + case ICONV_TRIVIALP: + convname = cv->cv_shared->ci_convname; + dst = strchr(convname, '/'); + + strlcpy(src, convname, dst - convname + 1); + dst++; + if ((convname == NULL) || (src == NULL) || (dst == NULL)) + return (-1); + *i = strcmp(src, dst) == 0 ? 1 : 0; + return (0); + case ICONV_GET_TRANSLITERATE: + *i = 1; + return (0); + case ICONV_SET_TRANSLITERATE: + return ((*i == 1) ? 0 : -1); + case ICONV_GET_DISCARD_ILSEQ: + *i = cv->cv_shared->ci_discard_ilseq ? 1 : 0; + return (0); + case ICONV_SET_DISCARD_ILSEQ: + cv->cv_shared->ci_discard_ilseq = *i; + return (0); + case ICONV_SET_HOOKS: + cv->cv_shared->ci_hooks = hooks; + return (0); + case ICONV_SET_FALLBACKS: + errno = EOPNOTSUPP; + return (-1); + case ICONV_GET_ILSEQ_INVALID: + *i = cv->cv_shared->ci_ilseq_invalid ? 1 : 0; + return (0); + case ICONV_SET_ILSEQ_INVALID: + cv->cv_shared->ci_ilseq_invalid = *i; + return (0); + default: + errno = EINVAL; + return (-1); + } +} + +void +__bsd_iconv_set_relocation_prefix(const char *orig_prefix __unused, + const char *curr_prefix __unused) +{ + +} Copied: head/lib/libc/iconv/iconv.c (from r258569, head/lib/libc_nonshared/iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv.c) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +iconv(iconv_t a, const char ** __restrict b, + size_t * __restrict c, char ** __restrict d, + size_t * __restrict e) +{ + return __bsd_iconv(a, b, c, d, e); +} Copied: head/lib/libc/iconv/iconv_canonicalize.c (from r258569, head/lib/libc_nonshared/iconv_canonicalize.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv_canonicalize.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv_canonicalize.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +const char * +iconv_canonicalize(const char *a) +{ + return __bsd_iconv_canonicalize(a); +} Copied: head/lib/libc/iconv/iconv_close.c (from r258569, head/lib/libc_nonshared/iconv_close.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv_close.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv_close.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_close(iconv_t a) +{ + return __bsd_iconv_close(a); +} Copied: head/lib/libc/iconv/iconv_open.c (from r258569, head/lib/libc_nonshared/iconv_open.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv_open.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv_open.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +iconv_t +iconv_open(const char *a, const char *b) +{ + return __bsd_iconv_open(a, b); +} Copied: head/lib/libc/iconv/iconv_open_into.c (from r258569, head/lib/libc_nonshared/iconv_open_into.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv_open_into.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv_open_into.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_open_into(const char *a, const char *b, iconv_allocation_t *c) +{ + return __bsd_iconv_open_into(a, b, c); +} Copied: head/lib/libc/iconv/iconv_set_relocation_prefix.c (from r258569, head/lib/libc_nonshared/iconv_set_relocation_prefix.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconv_set_relocation_prefix.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconv_set_relocation_prefix.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconv_set_relocation_prefix(const char *a, const char *b) +{ + return __bsd_iconv_set_relocation_prefix(a, b); +} Copied: head/lib/libc/iconv/iconvctl.c (from r258569, head/lib/libc_nonshared/iconvctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconvctl.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconvctl.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconvctl(iconv_t a, int b, void *c) +{ + return __bsd_iconvctl(a, b, c); +} Copied: head/lib/libc/iconv/iconvlist.c (from r258569, head/lib/libc_nonshared/iconvlist.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/iconv/iconvlist.c Mon Nov 25 20:17:55 2013 (r258587, copy of r258569, head/lib/libc_nonshared/iconvlist.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconvlist(int (*a) (unsigned int, const char * const *, void *), void *b) +{ + return __bsd_iconvlist(a, b); +} Modified: head/lib/libc_nonshared/Makefile ============================================================================== --- head/lib/libc_nonshared/Makefile Mon Nov 25 20:05:23 2013 (r258586) +++ head/lib/libc_nonshared/Makefile Mon Nov 25 20:17:55 2013 (r258587) @@ -12,16 +12,17 @@ CFLAGS+=${PICFLAG} -DPIC -fvisibility=hi LIB= c_nonshared +LIBC_NONSHARED_SRCS= + # So that an empty .a file doesn't cause errors. SRCS= __stub.c .if ${MK_ICONV} == "yes" -SRCS+= __iconv.c __iconv_free_list.c __iconv_get_list.c \ - iconv.c iconv_canonicalize.c iconv_close.c \ - iconv_open.c iconv_open_into.c \ - iconv_set_relocation_prefix.c iconvctl.c iconvlist.c +.PATH: ${.CURDIR}/../libc/iconv +.include "Makefile.iconv" CFLAGS+=-I${.CURDIR}/../libc/iconv .endif -.include +SRCS+= ${LIBC_NONSHARED_SRCS} +.include Copied and modified: head/lib/libc_nonshared/Makefile.iconv (from r258569, head/lib/libc_nonshared/Makefile) ============================================================================== --- head/lib/libc_nonshared/Makefile Mon Nov 25 17:52:16 2013 (r258569, copy source) +++ head/lib/libc_nonshared/Makefile.iconv Mon Nov 25 20:17:55 2013 (r258587) @@ -1,27 +1,9 @@ # $FreeBSD$ -# We're actually creating a libc_noshared.a that is PIC along side libc.so.* -# It is used exclusively with libc.so.* - there is no need for any other -# compile modes. -# bsd.lib.mk doesn't have an easy way to express that. -NO_PROFILE?= -.include -NO_PIC= -# -fpic on some platforms, -fPIC on others. -CFLAGS+=${PICFLAG} -DPIC -fvisibility=hidden - -LIB= c_nonshared - -# So that an empty .a file doesn't cause errors. -SRCS= __stub.c - .if ${MK_ICONV} == "yes" -SRCS+= __iconv.c __iconv_free_list.c __iconv_get_list.c \ +LIBC_NONSHARED_SRCS+= \ + __iconv.c __iconv_free_list.c __iconv_get_list.c \ iconv.c iconv_canonicalize.c iconv_close.c \ iconv_open.c iconv_open_into.c \ iconv_set_relocation_prefix.c iconvctl.c iconvlist.c -CFLAGS+=-I${.CURDIR}/../libc/iconv .endif - -.include - From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:20:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B043139; Mon, 25 Nov 2013 20:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20C9326CC; Mon, 25 Nov 2013 20:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKKYDw021363; Mon, 25 Nov 2013 20:20:35 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKKYsH021362; Mon, 25 Nov 2013 20:20:34 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311252020.rAPKKYsH021362@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 20:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258588 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:20:35 -0000 Author: rodrigc Date: Mon Nov 25 20:20:34 2013 New Revision: 258588 URL: http://svnweb.freebsd.org/changeset/base/258588 Log: In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);". This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit(). Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(), but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions. In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c, IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN and IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER Consequently, if VIMAGE is enabled, and jails are created and destroyed, the system sometimes crashes, because we are trying to use a deleted lock. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL, so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit(). Modified: head/sys/netpfil/ipfw/ip_fw_nat.c Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Mon Nov 25 20:17:55 2013 (r258587) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Mon Nov 25 20:20:34 2013 (r258588) @@ -676,7 +676,7 @@ static moduledata_t ipfw_nat_mod = { }; /* Define startup order. */ -#define IPFW_NAT_SI_SUB_FIREWALL SI_SUB_PROTO_IFATTACHDOMAIN +#define IPFW_NAT_SI_SUB_FIREWALL (SI_SUB_PROTO_IFATTACHDOMAIN + 1) #define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 255) #define IPFW_NAT_MODULE_ORDER (IPFW_NAT_MODEVENT_ORDER + 1) #define IPFW_NAT_VNET_ORDER (IPFW_NAT_MODEVENT_ORDER + 2) From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:28:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8135B331; Mon, 25 Nov 2013 20:28:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 711CC2721; Mon, 25 Nov 2013 20:28:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKSe25022372; Mon, 25 Nov 2013 20:28:40 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKSe5I022371; Mon, 25 Nov 2013 20:28:40 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311252028.rAPKSe5I022371@svn.freebsd.org> From: Devin Teske Date: Mon, 25 Nov 2013 20:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258589 - head/usr.sbin/bsdconfig/console X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:28:40 -0000 Author: dteske Date: Mon Nov 25 20:28:39 2013 New Revision: 258589 URL: http://svnweb.freebsd.org/changeset/base/258589 Log: Add missing `$' before variable name `pgm'. Unnoticed unless running parallel concurrent copies of `bsdconfig syscons_ttys'. Modified: head/usr.sbin/bsdconfig/console/ttys Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Mon Nov 25 20:20:34 2013 (r258588) +++ head/usr.sbin/bsdconfig/console/ttys Mon Nov 25 20:28:39 2013 (r258589) @@ -113,7 +113,7 @@ ttys_set_type() # # Create new temporary file to write our ttys(5) update with new types. # - local tmpfile="$( mktemp -t "pgm" )" + local tmpfile="$( mktemp -t "$pgm" )" [ "$tmpfile" ] || return $FAILURE # From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:29:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A950F478; Mon, 25 Nov 2013 20:29:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98CC1272A; Mon, 25 Nov 2013 20:29:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKTQ9W022503; Mon, 25 Nov 2013 20:29:26 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKTQKa022502; Mon, 25 Nov 2013 20:29:26 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311252029.rAPKTQKa022502@svn.freebsd.org> From: Devin Teske Date: Mon, 25 Nov 2013 20:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258590 - head/usr.sbin/bsdconfig/includes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:29:26 -0000 Author: dteske Date: Mon Nov 25 20:29:26 2013 New Revision: 258590 URL: http://svnweb.freebsd.org/changeset/base/258590 Log: Add missing newline to printf format string. Modified: head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Mon Nov 25 20:28:39 2013 (r258589) +++ head/usr.sbin/bsdconfig/includes/includes Mon Nov 25 20:29:26 2013 (r258590) @@ -147,10 +147,10 @@ for include in "$@"; do # See if they've just omitted the `*.subr' suffix [ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr" if [ ! -f "$include" ]; then - printf "$msg_no_such_file_or_directory" "$0" "$include" + printf "$msg_no_such_file_or_directory\n" "$0" "$include" exit $FAILURE elif [ ! -r "$include" ]; then - printf "$msg_permission_denied" "$0" "$include" + printf "$msg_permission_denied\n" "$0" "$include" exit $FAILURE fi show_include "$include" || f_die From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:33:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DC997A4; Mon, 25 Nov 2013 20:33:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE01278B; Mon, 25 Nov 2013 20:33:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKXXqe025253; Mon, 25 Nov 2013 20:33:33 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKXXww025252; Mon, 25 Nov 2013 20:33:33 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311252033.rAPKXXww025252@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 20:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258591 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:33:34 -0000 Author: rodrigc Date: Mon Nov 25 20:33:33 2013 New Revision: 258591 URL: http://svnweb.freebsd.org/changeset/base/258591 Log: In vnet_route_uninit(), free some memory that is allocated in vnet_route_init(). To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html This doesn't eliminate all the "Freed UMA keg was not empty" warning messages on the console, but it helps. Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Nov 25 20:29:26 2013 (r258590) +++ head/sys/net/route.c Mon Nov 25 20:33:33 2013 (r258591) @@ -255,6 +255,9 @@ vnet_route_uninit(const void *unused __u dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset); } } + + free(V_rt_tables, M_RTABLE); + uma_zdestroy(V_rtzone); } VNET_SYSUNINIT(vnet_route_uninit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, vnet_route_uninit, 0); From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:37:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F3729A6; Mon, 25 Nov 2013 20:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D43827CB; Mon, 25 Nov 2013 20:37:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKbt1M025800; Mon, 25 Nov 2013 20:37:55 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKbsaY025791; Mon, 25 Nov 2013 20:37:54 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311252037.rAPKbsaY025791@svn.freebsd.org> From: Devin Teske Date: Mon, 25 Nov 2013 20:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258592 - in head/usr.sbin/bsdconfig: console/include include mouse/include networking/include startup/include usermgmt/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:37:55 -0000 Author: dteske Date: Mon Nov 25 20:37:53 2013 New Revision: 258592 URL: http://svnweb.freebsd.org/changeset/base/258592 Log: Sort messages. Modified: head/usr.sbin/bsdconfig/console/include/messages.subr head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/mouse/include/messages.subr head/usr.sbin/bsdconfig/networking/include/messages.subr head/usr.sbin/bsdconfig/startup/include/messages.subr head/usr.sbin/bsdconfig/usermgmt/include/messages.subr Modified: head/usr.sbin/bsdconfig/console/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/console/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/console/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -51,8 +51,8 @@ msg_cancel="Cancel" msg_central_european_iso="Central European ISO" msg_central_european_iso_desc="Central European ISO keymap" msg_choose_alternate_keyboard_map="Choose an alternate keyboard map" -msg_choose_alternate_screenmap="Choose an alternate screenmap" msg_choose_alternate_screen_font="Choose an alternate screen font" +msg_choose_alternate_screenmap="Choose an alternate screenmap" msg_choose_console_terminal_type="Choose console terminal type" msg_configure_screen_saver="Configure the screen saver" msg_console_menu_text="The system console driver for FreeBSD has a number of configuration\noptions which may be set according to your preference.\n\nWhen you are done setting configuration options, select Cancel." @@ -74,9 +74,9 @@ msg_enter_timeout_period="Enter time-out msg_estonian_cp850="Estonian CP850" msg_estonian_cp850_desc="Estonian Code Page 850 keymap" msg_estonian_iso="Estonian ISO" -msg_estonian_iso_desc="Estonian ISO keymap" msg_estonian_iso_15="Estonian ISO 15" msg_estonian_iso_15_desc="Estonian ISO 8859-15 keymap" +msg_estonian_iso_desc="Estonian ISO keymap" msg_exit="Exit" msg_exit_this_menu="Exit this menu" msg_fade="Fade" @@ -97,8 +97,6 @@ msg_french_iso_accent_desc="French ISO k msg_french_iso_desc="French ISO keymap" msg_french_iso_macbook="French ISO/Macbook" msg_french_iso_macbook_desc="French ISO keymap on macbook" -msg_green="Green" -msg_green_desc="\"Green\" power saving mode (if supported by monitor)" msg_german_cp850="German CP850" msg_german_cp850_desc="German Code Page 850 keymap" msg_german_iso="German ISO" @@ -109,10 +107,14 @@ msg_greek_104="Greek 104" msg_greek_104_desc="Greek ISO keymap (104 keys)" msg_greek_elot="Greek ELOT" msg_greek_elot_desc="Greek ISO keymap (ELOT 1000)" +msg_green="Green" +msg_green_desc="\"Green\" power saving mode (if supported by monitor)" msg_hungarian_101="Hungarian 101" msg_hungarian_101_desc="Hungarian ISO keymap (101 key)" msg_hungarian_102="Hungarian 102" msg_hungarian_102_desc="Hungarian ISO keymap (102 key)" +msg_ibm_1251="IBM 1251" +msg_ibm_1251_desc="Cyrillic, MS Windows encoding" msg_ibm_437="IBM 437" msg_ibm_437_desc="English and others, VGA default" msg_ibm_437_vga_default="IBM437 (VGA default)" @@ -124,12 +126,12 @@ msg_ibm_866="IBM 866" msg_ibm_866_desc="Russian, IBM encoding (use with KOI8-R screenmap)" msg_ibm_866u="IBM 866u" msg_ibm_866u_desc="Ukrainian, IBM encoding (use with KOI8-U screenmap)" -msg_ibm_1251="IBM 1251" -msg_ibm_1251_desc="Cyrillic, MS Windows encoding" msg_icelandic="Icelandic" msg_icelandic_accent="Icelandic (accent)" msg_icelandic_accent_desc="Icelandic ISO keymap (accent keys)" msg_icelandic_desc="Icelandic ISO keymap" +msg_iso_8859_15="ISO 8859-15" +msg_iso_8859_15_desc="Europe, ISO encoding" msg_iso_8859_1="ISO 8859-1" msg_iso_8859_1_desc="Western Europe, ISO encoding" msg_iso_8859_1_to_ibm437="ISO 8859-1 to IBM437" @@ -144,8 +146,6 @@ msg_iso_8859_7_to_ibm437="ISO 8859-7 to msg_iso_8859_7_to_ibm437_desc="Greek ISO 8859-1 to IBM 437 screenmap" msg_iso_8859_8="ISO 8859-8" msg_iso_8859_8_desc="Hebrew, ISO encoding" -msg_iso_8859_15="ISO 8859-15" -msg_iso_8859_15_desc="Europe, ISO encoding" msg_italian="Italian" msg_italian_desc="Italian ISO keymap" msg_japanese_106="Japanese 106" @@ -153,9 +153,9 @@ msg_japanese_106_desc="Japanese 106 keym msg_keymap="Keymap" msg_keymap_menu_text="The system console driver for FreeBSD defaults to a standard\n\"US\" keyboard map. Users may wish to choose one of the\nother keymaps below." msg_koi8_r="KOI8-R" -msg_koi8_u="KOI8-U" msg_koi8_r_to_ibm866="KOI8-R to IBM866" msg_koi8_r_to_ibm866_desc="Russian KOI8-R to IBM 866 screenmap" +msg_koi8_u="KOI8-U" msg_koi8_u_to_ibm866u="KOI8-U to IBM866u" msg_koi8_u_to_ibm866u_desc="Ukrainian KOI8-U to IBM 866u screenmap" msg_latin_american="Latin American" @@ -224,8 +224,8 @@ msg_swiss_german_iso_accent_desc="Swiss msg_swiss_german_iso_desc="Swiss German ISO keymap" msg_system_console_configuration="System Console Configuration" msg_system_console_font="System Console Font" -msg_system_console_keymap="System Console Keymap" msg_system_console_keyboard_repeat_rate="System Console Keyboard Repeat Rate" +msg_system_console_keymap="System Console Keymap" msg_system_console_screen_saver="System Console Screen Saver" msg_system_console_screenmap="System Console Screenmap" msg_system_console_terminal_type="System Console Terminal Type" Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -170,8 +170,8 @@ msg_install_from_an_http_server="Install msg_install_from_the_existing_filesystem="Install from the existing filesystem" msg_install_over_nfs="Install over NFS" msg_installed="Installed" -msg_installed_lc="installed" msg_installed_desc="Leave package as-is, installed" +msg_installed_lc="installed" msg_invalid_gateway_ipv4_address_specified="Invalid gateway IPv4 address specified" msg_invalid_hostname_value="Invalid hostname value" msg_invalid_ipv4_address="Invalid IPv4 address" @@ -261,7 +261,6 @@ msg_ok="OK" msg_options="Options" msg_options_editor="Options Editor" msg_other="other" -msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." msg_package_is_needed_by_other_installed_packages="Warning: Package %s is needed by\n %d other installed package%s." msg_package_not_installed_cannot_delete="Warning: package %s not installed\n No package can be deleted." msg_package_temp="Package Temp" @@ -273,6 +272,7 @@ msg_parallel_desc="Applications dealing msg_pear_desc="Software related to the Pear PHP framework." msg_perl5_desc="Utilities/modules for the PERL5 language." msg_permission_denied="%s: %s: Permission denied" +msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." msg_pkg_install_apparently_did_not_like_the_package="pkg-install(8) apparently did not like the %s package." msg_plan9_desc="Software from the Plan9 operating system." msg_please_check_the_url_and_try_again="No such directory: %s\nplease check the URL and try again.\n" @@ -375,9 +375,9 @@ msg_unable_to_get_file_from_selected_med msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path. FTP media not initialized." msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" -msg_unable_to_pkg_rquery_package_dependencies="Unable to pkg-rquery(8) package dependencies!" -msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" msg_unable_to_open="Unable to open %s" +msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" +msg_unable_to_pkg_rquery_package_dependencies="Unable to pkg-rquery(8) package dependencies!" msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." msg_uninstall="Uninstall" msg_uninstall_desc="Mark this package for deletion" Modified: head/usr.sbin/bsdconfig/mouse/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/mouse/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/mouse/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -58,14 +58,14 @@ msg_microsoft="Microsoft" msg_microsoft_desc="Microsoft protocol (serial)" msg_mm_series="MM Series" msg_mm_series_desc="MM Series protocol (serial)" -msg_mouseman="MouseMan" -msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)" -msg_mousesystems="MouseSystems" -msg_mousesystems_desc="MouseSystems protocol (serial)" msg_mouse_daemon_is_disabled="The mouse daemon is disabled." msg_mouse_disable="Mouse Disable" msg_mouse_enable="Mouse Enable" msg_mouse_flags="Mouse Flags" +msg_mouseman="MouseMan" +msg_mouseman_desc="Logitech MouseMan/TrackMan models (serial)" +msg_mousesystems="MouseSystems" +msg_mousesystems_desc="MouseSystems protocol (serial)" msg_now_move_the_mouse="Now move the mouse and see if it works.\n(Note that buttons don't have any effect for now.)\n\n Is the mouse cursor moving?\n" msg_ok="OK" msg_please_configure_your_mouse="Please configure your mouse" Modified: head/usr.sbin/bsdconfig/networking/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/networking/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -59,15 +59,15 @@ msg_ipv4_addr_octet_contains_invalid_cha msg_ipv4_addr_octet_exceeds_max_value="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) exceeds the maximum of 255.\n\nInvalid IP Address: %s" msg_ipv4_addr_octet_is_null="ERROR! One or more individual octets within the IPv4 address\n(separated by dots) are null and/or missing.\n\nInvalid IP Address: %s" msg_ipv4_addr_octet_missing_or_extra="ERROR! The IPv4 address entered has either too few (less than\nfour) or too many (more than four) octets, separated by dots.\n\nInvalid IP Address: %s" -msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s" -msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s" msg_ipv4_mask_field_contains_invalid_chars="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid characters.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_exceeds_max_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) exceeds the maximum of 255.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_invalid_value="ERROR! One or more individual fields within the subnet mask\n(separated by dots) contains one or more invalid integers.\nFields must be one of 0/128/192/224/240/248/252/254/255.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_is_null="ERROR! One or more individual fields within the subnet mask\n(separated by dots) are null and/or missing.\n\nInvalid Subnet Mask: %s" msg_ipv4_mask_field_missing_or_extra="ERROR! The subnet mask entered has either too few or too many\nfields.\n\nInvalid Subnet Mask: %s" +msg_ipv6_addr_segment_contains_invalid_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) contains one or more invalid characters.\nSegments must contain only combinations of the characters 0-9,\nA-F, or a-f.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_segment_contains_too_many_chars="ERROR! One or more individual segments within the IP address\n(separated by colons) exceeds the length of 4 hex-digits.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_too_few_or_extra_segments="ERROR! The IP address entered has either too few (less than 3), too\nmany (more than 8), or not enough segments, separated by colons.\n\nInvalid IPv6 Address: %s" +msg_ipv6_addr_too_many_null_segments="ERROR! Too many/incorrect null segments. A single null\nsegment is allowed within the IP address (separated by\ncolons) but not allowed at the beginning or end (unless\na double-null segment; i.e., \"::*\" or \"*::\").\n\nInvalid IPv6 Address: %s" msg_netmask="netmask" msg_network_configuration="%s Network Configuration:\nChoose Save/Exit when finished or Cancel." msg_network_interfaces="Network Interfaces" Modified: head/usr.sbin/bsdconfig/startup/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/startup/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -39,8 +39,8 @@ msg_all_desc="Select all directives" msg_all_help="Select all displayed rc.conf(5) configuration directives" msg_apm="APM" msg_apm_desc="Auto-power management services (typically laptops)" -msg_are_you_sure_you_want_to_delete="Are you sure you want to delete the \`%s' directive\nfrom the rc.conf(5) collection of system configuration files?" msg_are_you_sure_you_want_delete_the_following="Are you sure you want to delete the following directives\nfrom the rc.conf(5) collection of system configuration files?" +msg_are_you_sure_you_want_to_delete="Are you sure you want to delete the \`%s' directive\nfrom the rc.conf(5) collection of system configuration files?" msg_cancel="Cancel" msg_choose_view_details="Choose View Details" msg_creating_menu_list="Creating menu list...\nThis may take a while." @@ -67,8 +67,8 @@ msg_exit_this_menu="Exit this menu" msg_info="Info" msg_lpd="lpd" msg_lpd_desc="This host has a printer and wants to run lpd." -msg_miscellaneous_startup_services="Miscellaneous Startup Services" msg_miscellaneous_menu_text="This menu allows you to configure various aspects of your system's\nstartup configuration. Use [SPACE] or [ENTER] to select items, and\n[TAB] to move to the buttons. Select Exit to leave this menu." +msg_miscellaneous_startup_services="Miscellaneous Startup Services" msg_named="named" msg_named_desc="Run a local name server on this host" msg_named_flags="named flags" Modified: head/usr.sbin/bsdconfig/usermgmt/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/include/messages.subr Mon Nov 25 20:33:33 2013 (r258591) +++ head/usr.sbin/bsdconfig/usermgmt/include/messages.subr Mon Nov 25 20:37:53 2013 (r258592) @@ -32,9 +32,9 @@ hline_arrows_space_tab_enter="Use arrows hline_arrows_tab_enter="Press arrows, TAB or ENTER" hline_num_arrows_tab_enter="Use numbers, arrows, TAB or ENTER" hline_num_tab_enter="Use numbers, TAB or ENTER" +msg_account_does_not_expire="Account does not expire" msg_account_expires_in_how_many_days="Account expires in how many days?" msg_account_expires_on="Account Expires on" -msg_account_does_not_expire="Account does not expire" msg_add="Add" msg_add_group="Add Group" msg_add_login="Add Login" @@ -65,9 +65,9 @@ msg_group="Group" msg_group_added="Group Added" msg_group_already_used="%s: Group is already used." msg_group_deleted="Group Deleted" -msg_group_is_empty="Group is empty." msg_group_id="Group ID" msg_group_id_leave_empty_for_default="Group ID (Leave empty for default)" +msg_group_is_empty="Group is empty." msg_group_members="Group Members" msg_group_must_start_with_letter="Group must start with a letter." msg_group_not_found="%s: Group not found." @@ -89,21 +89,21 @@ msg_login_not_found="Login not found." msg_login_updated="Login Updated" msg_member_of_groups="Member of Groups" msg_n_a="N/A" -msg_number_of_seconds_since_epoch="Number of seconds since the Epoch\n(1 = %s)\nNULL or zero to disable:" msg_no="No" +msg_number_of_seconds_since_epoch="Number of seconds since the Epoch\n(1 = %s)\nNULL or zero to disable:" msg_ok="OK" msg_password="Password" +msg_password_does_not_expire="Password does not expire" msg_password_expires_in_how_many_days="Password expires in how many days?" msg_password_expires_on="Password Expires on" msg_passwords_do_not_match="Passwords do not match." -msg_password_does_not_expire="Password does not expire" msg_reenter_group_password="Re-enter Group Password" msg_reenter_password="Re-enter Password" msg_save="Save" msg_save_exit_or_cancel="Choose Save/Exit when finished or Cancel." -msg_separated_by_commas="Separated by commas" msg_select_group_members_from_list="Select Group Members from a list" msg_select_login_shell="Select Login Shell" +msg_separated_by_commas="Separated by commas" msg_shell="Shell" msg_unknown_user_management_menu_selection="Unknown user management menu selection" msg_use_default_values_for_all_account_details="Use default values for all account details?" From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 20:45:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA1FC9F; Mon, 25 Nov 2013 20:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6F42837; Mon, 25 Nov 2013 20:45:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKjVMW028906; Mon, 25 Nov 2013 20:45:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKjVPY028905; Mon, 25 Nov 2013 20:45:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311252045.rAPKjVPY028905@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 25 Nov 2013 20:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258594 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:45:31 -0000 Author: pjd Date: Mon Nov 25 20:45:30 2013 New Revision: 258594 URL: http://svnweb.freebsd.org/changeset/base/258594 Log: Fix double free(). Reported by: Coverity Coverity CID: 1130048 Modified: head/lib/libnv/nvpair.c Modified: head/lib/libnv/nvpair.c ============================================================================== --- head/lib/libnv/nvpair.c Mon Nov 25 20:39:09 2013 (r258593) +++ head/lib/libnv/nvpair.c Mon Nov 25 20:45:30 2013 (r258594) @@ -683,10 +683,8 @@ nvpair_unpack(int flags, const unsigned if (ptr == NULL) goto failed; tmp = realloc(nvp, sizeof(*nvp) + strlen(nvp->nvp_name) + 1); - if (tmp == NULL) { - free(nvp); + if (tmp == NULL) goto failed; - } nvp = tmp; /* Update nvp_name after realloc(). */ nvp->nvp_name = (char *)(nvp + 1); From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 21:17:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC3504DC; Mon, 25 Nov 2013 21:17:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B9F32A01; Mon, 25 Nov 2013 21:17:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPLHEsM039886; Mon, 25 Nov 2013 21:17:14 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPLHEAY039885; Mon, 25 Nov 2013 21:17:14 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311252117.rAPLHEAY039885@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 25 Nov 2013 21:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258597 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 21:17:14 -0000 Author: pjd Date: Mon Nov 25 21:17:14 2013 New Revision: 258597 URL: http://svnweb.freebsd.org/changeset/base/258597 Log: When append-only, immutable or read-only flag is set don't allow for hard links creation. This matches UFS behaviour. Reported by: Oleg Ginzburg MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 21:12:56 2013 (r258596) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 21:17:14 2013 (r258597) @@ -4317,6 +4317,11 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch szp = VTOZ(svp); ZFS_VERIFY_ZP(szp); + if (szp->z_pflags & (ZFS_APPENDONLY | ZFS_IMMUTABLE | ZFS_READONLY)) { + ZFS_EXIT(zfsvfs); + return (SET_ERROR(EPERM)); + } + /* * We check z_zfsvfs rather than v_vfsp here, because snapshots and the * ctldir appear to have the same v_vfsp. From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 22:20:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15460FA6; Mon, 25 Nov 2013 22:20:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 03D112E2B; Mon, 25 Nov 2013 22:20:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMKcmn061301; Mon, 25 Nov 2013 22:20:38 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMKYeG061276; Mon, 25 Nov 2013 22:20:34 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311252220.rAPMKYeG061276@svn.freebsd.org> From: Peter Wemm Date: Mon, 25 Nov 2013 22:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258602 - in head/contrib/apr-util: . crypto dbd dbm include memcache misc test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:20:39 -0000 Author: peter Date: Mon Nov 25 22:20:34 2013 New Revision: 258602 URL: http://svnweb.freebsd.org/changeset/base/258602 Log: Import apr-util-1.5.3 from vendor branch (rr258600) This is a minor bug fix release. Deleted: head/contrib/apr-util/test/testssl.c Modified: head/contrib/apr-util/CHANGES head/contrib/apr-util/apr-util.spec head/contrib/apr-util/configure head/contrib/apr-util/crypto/apr_crypto.c head/contrib/apr-util/dbd/apr_dbd.c head/contrib/apr-util/dbd/apr_dbd_odbc.c head/contrib/apr-util/dbm/apr_dbm.c head/contrib/apr-util/include/apr_buckets.h head/contrib/apr-util/include/apr_dbd.h head/contrib/apr-util/include/apr_hooks.h head/contrib/apr-util/include/apr_optional_hooks.h head/contrib/apr-util/include/apr_queue.h head/contrib/apr-util/include/apr_reslist.h head/contrib/apr-util/include/apu.hw head/contrib/apr-util/include/apu_version.h head/contrib/apr-util/libaprutil.rc head/contrib/apr-util/memcache/apr_memcache.c head/contrib/apr-util/misc/apu_dso.c head/contrib/apr-util/test/abts.c head/contrib/apr-util/test/testpass.c Directory Properties: head/contrib/apr-util/ (props changed) Modified: head/contrib/apr-util/CHANGES ============================================================================== --- head/contrib/apr-util/CHANGES Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/CHANGES Mon Nov 25 22:20:34 2013 (r258602) @@ -1,4 +1,23 @@ -*- coding: utf-8 -*- +Changes with APR-util 1.5.3 + + *) Cygwin: Use correct file extension when loading APR DSOs. PR 55587. + [Carlo Bramini ] + + *) Add experimental cmake-based build system for Windows. Refer to + README.cmake for more information. [Jeff Trawick, Tom Donovan] + + *) Fix warnings in odbc driver on 64bit systems. + PR 55197 [Tom Donovan] + + *) Add support to apr_memcache for unix domain sockets. PR 54573 [Remi + Gacogne ] + + *) Add support for Berkeley DB 6.0. [Rainer Jung] + + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] + Changes with APR-util 1.5.2 *) Windows: Add command line makefiles. [Gregg Smith] Modified: head/contrib/apr-util/apr-util.spec ============================================================================== --- head/contrib/apr-util/apr-util.spec Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/apr-util.spec Mon Nov 25 22:20:34 2013 (r258602) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.5.2 +Version: 1.5.3 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: head/contrib/apr-util/configure ============================================================================== --- head/contrib/apr-util/configure Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/configure Mon Nov 25 22:20:34 2013 (r258602) @@ -1440,7 +1440,7 @@ Optional Packages: --with-ldap-lib=path path to ldap lib file --with-ldap=library ldap library to use --with-dbm=DBM choose the DBM type to use. - DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X} + DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X,db6X} for some X=0,...,9 --with-gdbm=DIR enable GDBM support --with-ndbm=PATH Find the NDBM header and library in `PATH/include' @@ -11218,8 +11218,10 @@ fi fi - test ${apu_has_ldap} != "1" && as_fn_error $? "could not find an LDAP library" "$LINENO" 5 - test ${apu_has_ldap} == "1" && + if test ${apu_has_ldap} != "1"; then + as_fn_error $? "could not find an LDAP library" "$LINENO" 5 + else + if test "x$LDADD_ldap" = "x"; then test "x$silent" != "xyes" && echo " setting LDADD_ldap to \"$LDADD_ldap_found\"" LDADD_ldap="$LDADD_ldap_found" @@ -11240,6 +11242,7 @@ fi done fi + fi as_ac_Lib=`$as_echo "ac_cv_lib_$apu_liblber_name''_ber_init" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_init in -l$apu_liblber_name" >&5 $as_echo_n "checking for ber_init in -l$apu_liblber_name... " >&6; } @@ -11617,6 +11620,7 @@ fi dbm_list="$dbm_list, db$db_version" db_version=`expr $db_version + 1` done + dbm_list="$dbm_list, db60" # Check whether --with-dbm was given. @@ -15708,7 +15712,7 @@ fi as_fn_error $? "Berkeley db3 not found" "$LINENO" 5 fi ;; - db[45][0-9]) + db[456][0-9]) db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'` db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'` @@ -16113,7 +16117,7 @@ fi as_fn_error $? "Berkeley db$db_major not found" "$LINENO" 5 fi ;; - db[45]) + db[456]) db_major=`echo "$requested" | sed -e 's/db//'` # Start version search at version x.9 db_minor=9 @@ -18561,11 +18565,11 @@ fi eval "apu_use_$requested=1" apu_default_dbm=$requested ;; - db185 | db[12345]) + db185 | db[123456]) apu_use_db=1 apu_default_dbm=$requested ;; - db[45][0-9]) + db[456][0-9]) apu_use_db=1 apu_default_dbm=`echo $requested | sed -e 's/.$//'` ;; Modified: head/contrib/apr-util/crypto/apr_crypto.c ============================================================================== --- head/contrib/apr-util/crypto/apr_crypto.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/crypto/apr_crypto.c Mon Nov 25 22:20:34 2013 (r258602) @@ -100,7 +100,9 @@ APU_DECLARE(apr_status_t) apr_crypto_ini } /* Top level pool scope, need process-scope lifetime */ - for (parent = pool; parent; parent = apr_pool_parent_get(pool)) + for (parent = apr_pool_parent_get(pool); + parent && parent != pool; + parent = apr_pool_parent_get(pool)) pool = parent; #if APU_DSO_BUILD /* deprecate in 2.0 - permit implicit initialization */ @@ -176,7 +178,7 @@ APU_DECLARE(apr_status_t) apr_crypto_get #if defined(NETWARE) apr_snprintf(modname, sizeof(modname), "crypto%s.nlm", name); -#elif defined(WIN32) +#elif defined(WIN32) || defined(__CYGWIN__) apr_snprintf(modname, sizeof(modname), "apr_crypto_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", name); #else Modified: head/contrib/apr-util/dbd/apr_dbd.c ============================================================================== --- head/contrib/apr-util/dbd/apr_dbd.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/dbd/apr_dbd.c Mon Nov 25 22:20:34 2013 (r258602) @@ -102,8 +102,10 @@ APU_DECLARE(apr_status_t) apr_dbd_init(a } /* Top level pool scope, need process-scope lifetime */ - for (parent = pool; parent; parent = apr_pool_parent_get(pool)) - pool = parent; + for (parent = apr_pool_parent_get(pool); + parent && parent != pool; + parent = apr_pool_parent_get(pool)) + pool = parent; #if APU_DSO_BUILD /* deprecate in 2.0 - permit implicit initialization */ apu_dso_init(pool); @@ -184,7 +186,7 @@ APU_DECLARE(apr_status_t) apr_dbd_get_dr #if defined(NETWARE) apr_snprintf(modname, sizeof(modname), "dbd%s.nlm", name); -#elif defined(WIN32) +#elif defined(WIN32) || defined(__CYGWIN__) apr_snprintf(modname, sizeof(modname), "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", name); #else @@ -204,7 +206,7 @@ APU_DECLARE(apr_status_t) apr_dbd_get_dr } apu_dso_mutex_unlock(); -#else /* not builtin and !APR_HAS_DSO => not implemented */ +#else /* not builtin and !APU_DSO_BUILD => not implemented */ rv = APR_ENOTIMPL; #endif Modified: head/contrib/apr-util/dbd/apr_dbd_odbc.c ============================================================================== --- head/contrib/apr-util/dbd/apr_dbd_odbc.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/dbd/apr_dbd_odbc.c Mon Nov 25 22:20:34 2013 (r258602) @@ -114,9 +114,9 @@ struct apr_dbd_t char lastError[MAX_ERROR_STRING]; int defaultBufferSize; /* used for CLOBs in text mode, * and when fld size is indeterminate */ - int transaction_mode; - int dboptions; /* driver options re SQLGetData */ - int default_transaction_mode; + intptr_t transaction_mode; + intptr_t dboptions; /* driver options re SQLGetData */ + intptr_t default_transaction_mode; int can_commit; /* controls end_trans behavior */ }; @@ -359,7 +359,7 @@ static SQLRETURN odbc_set_result_column( SQLHANDLE stmt) { SQLRETURN rc; - int maxsize, textsize, realsize, type, isunsigned = 1; + intptr_t maxsize, textsize, realsize, type, isunsigned = 1; /* discover the sql type */ rc = SQLColAttribute(stmt, icol + 1, SQL_DESC_UNSIGNED, NULL, 0, NULL, @@ -409,7 +409,7 @@ static SQLRETURN odbc_set_result_column( type = SQL_C_CHAR; } - res->coltypes[icol] = type; + res->coltypes[icol] = (SQLSMALLINT)type; /* size if retrieved as text */ rc = SQLColAttribute(stmt, icol + 1, SQL_DESC_DISPLAY_SIZE, NULL, 0, @@ -441,12 +441,12 @@ static SQLRETURN odbc_set_result_column( res->colptrs[icol] = NULL; res->colstate[icol] = COL_AVAIL; - res->colsizes[icol] = maxsize; + res->colsizes[icol] = (SQLINTEGER)maxsize; rc = SQL_SUCCESS; } else { res->colptrs[icol] = apr_pcalloc(res->pool, maxsize); - res->colsizes[icol] = maxsize; + res->colsizes[icol] = (SQLINTEGER)maxsize; if (res->apr_dbd->dboptions & SQL_GD_BOUND) { /* we are allowed to call SQLGetData if we need to */ rc = SQLBindCol(stmt, icol + 1, res->coltypes[icol], @@ -747,7 +747,7 @@ static void *odbc_get(const apr_dbd_row_ SQLRETURN rc; SQLLEN indicator; int state = row->res->colstate[col]; - int options = row->res->apr_dbd->dboptions; + intptr_t options = row->res->apr_dbd->dboptions; switch (state) { case (COL_UNAVAIL): @@ -817,13 +817,13 @@ static apr_status_t odbc_parse_params(ap int *connect, SQLCHAR **datasource, SQLCHAR **user, SQLCHAR **password, int *defaultBufferSize, int *nattrs, - int **attrs, int **attrvals) + int **attrs, intptr_t **attrvals) { char *seps, *last, *next, *name[MAX_PARAMS], *val[MAX_PARAMS]; int nparams = 0, i, j; *attrs = apr_pcalloc(pool, MAX_PARAMS * sizeof(char *)); - *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(int)); + *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(intptr_t)); *nattrs = 0; seps = DEFAULTSEPS; name[nparams] = apr_strtok(apr_pstrdup(pool, params), seps, &last); @@ -1062,7 +1062,8 @@ static apr_dbd_t *odbc_open(apr_pool_t * SQLHANDLE err_h = NULL; SQLCHAR *datasource = (SQLCHAR *)"", *user = (SQLCHAR *)"", *password = (SQLCHAR *)""; - int nattrs = 0, *attrs = NULL, *attrvals = NULL, connect = 0; + int nattrs = 0, *attrs = NULL, connect = 0; + intptr_t *attrvals = NULL; err_step = "SQLAllocHandle (SQL_HANDLE_DBC)"; err_htype = SQL_HANDLE_ENV; @@ -1116,10 +1117,10 @@ static apr_dbd_t *odbc_open(apr_pool_t * handle->default_transaction_mode = 0; handle->can_commit = APR_DBD_TRANSACTION_IGNORE_ERRORS; SQLGetInfo(hdbc, SQL_DEFAULT_TXN_ISOLATION, - &(handle->default_transaction_mode), sizeof(int), NULL); + &(handle->default_transaction_mode), sizeof(intptr_t), NULL); handle->transaction_mode = handle->default_transaction_mode; SQLGetInfo(hdbc, SQL_GETDATA_EXTENSIONS ,&(handle->dboptions), - sizeof(int), NULL); + sizeof(intptr_t), NULL); apr_pool_cleanup_register(pool, handle, odbc_close_cleanup, apr_pool_cleanup_null); return handle; } Modified: head/contrib/apr-util/dbm/apr_dbm.c ============================================================================== --- head/contrib/apr-util/dbm/apr_dbm.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/dbm/apr_dbm.c Mon Nov 25 22:20:34 2013 (r258602) @@ -129,8 +129,10 @@ static apr_status_t dbm_open_type(apr_db apr_pool_t *parent; /* Top level pool scope, need process-scope lifetime */ - for (parent = pool; parent; parent = apr_pool_parent_get(pool)) - pool = parent; + for (parent = apr_pool_parent_get(pool); + parent && parent != pool; + parent = apr_pool_parent_get(pool)) + pool = parent; /* deprecate in 2.0 - permit implicit initialization */ apu_dso_init(pool); @@ -162,7 +164,7 @@ static apr_status_t dbm_open_type(apr_db #if defined(NETWARE) apr_snprintf(modname, sizeof(modname), "dbm%s.nlm", type); -#elif defined(WIN32) +#elif defined(WIN32) || defined (__CYGWIN__) apr_snprintf(modname, sizeof(modname), "apr_dbm_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", type); #else Modified: head/contrib/apr-util/include/apr_buckets.h ============================================================================== --- head/contrib/apr-util/include/apr_buckets.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_buckets.h Mon Nov 25 22:20:34 2013 (r258602) @@ -351,9 +351,9 @@ typedef apr_status_t (*apr_brigade_flush #define APR_BRIGADE_LAST(b) APR_RING_LAST(&(b)->list) /** - * Insert a list of buckets at the front of a brigade + * Insert a single bucket at the front of a brigade * @param b The brigade to add to - * @param e The first bucket in a list of buckets to insert + * @param e The bucket to insert */ #define APR_BRIGADE_INSERT_HEAD(b, e) do { \ apr_bucket *ap__b = (e); \ @@ -362,9 +362,9 @@ typedef apr_status_t (*apr_brigade_flush } while (0) /** - * Insert a list of buckets at the end of a brigade + * Insert a single bucket at the end of a brigade * @param b The brigade to add to - * @param e The first bucket in a list of buckets to insert + * @param e The bucket to insert */ #define APR_BRIGADE_INSERT_TAIL(b, e) do { \ apr_bucket *ap__b = (e); \ @@ -393,9 +393,9 @@ typedef apr_status_t (*apr_brigade_flush } while (0) /** - * Insert a list of buckets before a specified bucket + * Insert a single bucket before a specified bucket * @param a The bucket to insert before - * @param b The buckets to insert + * @param b The bucket to insert */ #define APR_BUCKET_INSERT_BEFORE(a, b) do { \ apr_bucket *ap__a = (a), *ap__b = (b); \ @@ -404,9 +404,9 @@ typedef apr_status_t (*apr_brigade_flush } while (0) /** - * Insert a list of buckets after a specified bucket + * Insert a single bucket after a specified bucket * @param a The bucket to insert after - * @param b The buckets to insert + * @param b The bucket to insert */ #define APR_BUCKET_INSERT_AFTER(a, b) do { \ apr_bucket *ap__a = (a), *ap__b = (b); \ Modified: head/contrib/apr-util/include/apr_dbd.h ============================================================================== --- head/contrib/apr-util/include/apr_dbd.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_dbd.h Mon Nov 25 22:20:34 2013 (r258602) @@ -107,10 +107,10 @@ APU_DECLARE(apr_status_t) apr_dbd_get_dr /** apr_dbd_open_ex: open a connection to a backend * + * @param driver - driver struct. * @param pool - working pool * @param params - arguments to driver (implementation-dependent) * @param handle - pointer to handle to return - * @param driver - driver struct. * @param error - descriptive error. * @return APR_SUCCESS for success * @return APR_EGENERAL if driver exists but connection failed @@ -147,10 +147,10 @@ APU_DECLARE(apr_status_t) apr_dbd_open_e /** apr_dbd_open: open a connection to a backend * + * @param driver - driver struct. * @param pool - working pool * @param params - arguments to driver (implementation-dependent) * @param handle - pointer to handle to return - * @param driver - driver struct. * @return APR_SUCCESS for success * @return APR_EGENERAL if driver exists but connection failed * @see apr_dbd_open_ex @@ -161,8 +161,8 @@ APU_DECLARE(apr_status_t) apr_dbd_open(c /** apr_dbd_close: close a connection to a backend * - * @param handle - handle to close * @param driver - driver struct. + * @param handle - handle to close * @return APR_SUCCESS for success or error status */ APU_DECLARE(apr_status_t) apr_dbd_close(const apr_dbd_driver_t *driver, Modified: head/contrib/apr-util/include/apr_hooks.h ============================================================================== --- head/contrib/apr-util/include/apr_hooks.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_hooks.h Mon Nov 25 22:20:34 2013 (r258602) @@ -313,24 +313,24 @@ APU_DECLARE_DATA extern apr_pool_t *apr_ /** * A global variable to determine if debugging information about the - * hooks functions should be printed + * hooks functions should be printed. */ APU_DECLARE_DATA extern int apr_hook_debug_enabled; /** - * The name of the module that is currently registering a function + * The name of the module that is currently registering a function. */ APU_DECLARE_DATA extern const char *apr_hook_debug_current; /** - * Register a hook function to be sorted + * Register a hook function to be sorted. * @param szHookName The name of the Hook the function is registered for * @param aHooks The array which stores all of the functions for this hook */ APU_DECLARE(void) apr_hook_sort_register(const char *szHookName, apr_array_header_t **aHooks); /** - * Sort all of the registerd functions for a given hook + * Sort all of the registered functions for a given hook. */ APU_DECLARE(void) apr_hook_sort_all(void); Modified: head/contrib/apr-util/include/apr_optional_hooks.h ============================================================================== --- head/contrib/apr-util/include/apr_optional_hooks.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_optional_hooks.h Mon Nov 25 22:20:34 2013 (r258602) @@ -33,11 +33,11 @@ extern "C" { * @{ */ /** - * Function to implemnt the APR_OPTIONAL_HOOK Macro + * Function to implement the APR_OPTIONAL_HOOK Macro * @internal * @see APR_OPTIONAL_HOOK * - * @param name The name of the hook + * @param szName The name of the hook * @param pfn A pointer to a function that will be called * @param aszPre a NULL-terminated array of strings that name modules whose hooks should precede this one * @param aszSucc a NULL-terminated array of strings that name modules whose hooks should succeed this one Modified: head/contrib/apr-util/include/apr_queue.h ============================================================================== --- head/contrib/apr-util/include/apr_queue.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_queue.h Mon Nov 25 22:20:34 2013 (r258602) @@ -22,7 +22,7 @@ * @brief Thread Safe FIFO bounded queue * @note Since most implementations of the queue are backed by a condition * variable implementation, it isn't available on systems without threads. - * Although condition variables are some times available without threads. + * Although condition variables are sometimes available without threads. */ #include "apu.h" Modified: head/contrib/apr-util/include/apr_reslist.h ============================================================================== --- head/contrib/apr-util/include/apr_reslist.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apr_reslist.h Mon Nov 25 22:20:34 2013 (r258602) @@ -44,7 +44,7 @@ typedef struct apr_reslist_t apr_reslist /* Generic constructor called by resource list when it needs to create a * resource. * @param resource opaque resource - * @param param flags + * @param params flags * @param pool Pool */ typedef apr_status_t (*apr_reslist_constructor)(void **resource, void *params, @@ -53,7 +53,7 @@ typedef apr_status_t (*apr_reslist_const /* Generic destructor called by resource list when it needs to destroy a * resource. * @param resource opaque resource - * @param param flags + * @param params flags * @param pool Pool */ typedef apr_status_t (*apr_reslist_destructor)(void *resource, void *params, @@ -111,12 +111,17 @@ APU_DECLARE(apr_status_t) apr_reslist_de * Retrieve a resource from the list, creating a new one if necessary. * If we have met our maximum number of resources, we will block * until one becomes available. + * @param reslist The resource list. + * @param resource An address where the pointer to the resource + * will be stored. */ APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist, void **resource); /** * Return a resource back to the list of available resources. + * @param reslist The resource list. + * @param resource The resource to return to the list. */ APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist, void *resource); @@ -140,6 +145,8 @@ APU_DECLARE(apr_uint32_t) apr_reslist_ac * Invalidate a resource in the pool - e.g. a database connection * that returns a "lost connection" error and can't be restored. * Use this instead of apr_reslist_release if the resource is bad. + * @param reslist The resource list. + * @param resource The resource to invalidate. */ APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist, void *resource); Modified: head/contrib/apr-util/include/apu.hw ============================================================================== --- head/contrib/apr-util/include/apu.hw Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apu.hw Mon Nov 25 22:20:34 2013 (r258602) @@ -42,6 +42,12 @@ * conventions at compile time. */ +/* Make sure we have our platform identifier macro defined we ask for later. + */ +#if defined(_WIN32) && !defined(WIN32) +#define WIN32 1 +#endif + #if defined(DOXYGEN) || !defined(WIN32) /** * The public APR-UTIL functions are declared with APU_DECLARE(), so they may Modified: head/contrib/apr-util/include/apu_version.h ============================================================================== --- head/contrib/apr-util/include/apu_version.h Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/include/apu_version.h Mon Nov 25 22:20:34 2013 (r258602) @@ -38,6 +38,9 @@ */ +#define APU_COPYRIGHT "Copyright (c) 2013 The Apache Software " \ + "Foundation or its licensors, as applicable." + /* The numeric compile-time version constants. These constants are the * authoritative version numbers for APU. */ @@ -59,7 +62,7 @@ * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APU_PATCH_VERSION 2 +#define APU_PATCH_VERSION 3 /** * The symbol APU_IS_DEV_VERSION is only defined for internal, @@ -71,7 +74,9 @@ #if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN) /** Internal: string form of the "is dev" flag */ +#ifndef APU_IS_DEV_STRING #define APU_IS_DEV_STRING "-dev" +#endif #else #define APU_IS_DEV_STRING "" #endif Modified: head/contrib/apr-util/libaprutil.rc ============================================================================== --- head/contrib/apr-util/libaprutil.rc Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/libaprutil.rc Mon Nov 25 22:20:34 2013 (r258602) @@ -1,8 +1,5 @@ #include "apu_version.h" -#define APU_COPYRIGHT "Copyright (c) 2011 The Apache Software " \ - "Foundation or its licensors, as applicable." - #define APU_LICENSE \ "Licensed to the Apache Software Foundation (ASF) under one or more " \ "contributor license agreements. See the NOTICE file distributed with " \ Modified: head/contrib/apr-util/memcache/apr_memcache.c ============================================================================== --- head/contrib/apr-util/memcache/apr_memcache.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/memcache/apr_memcache.c Mon Nov 25 22:20:34 2013 (r258602) @@ -181,7 +181,7 @@ apr_memcache_find_server_hash_default(vo #if APR_HAS_THREADS apr_thread_mutex_lock(ms->lock); #endif - /* Try the the dead server, every 5 seconds */ + /* Try the dead server, every 5 seconds */ if (curtime - ms->btime > apr_time_from_sec(5)) { ms->btime = curtime; if (mc_version_ping(ms) == APR_SUCCESS) { @@ -289,8 +289,13 @@ static apr_status_t conn_connect(apr_mem { apr_status_t rv = APR_SUCCESS; apr_sockaddr_t *sa; +#if APR_HAVE_SOCKADDR_UN + apr_int32_t family = conn->ms->host[0] != '/' ? APR_INET : APR_UNIX; +#else + apr_int32_t family = APR_INET; +#endif - rv = apr_sockaddr_info_get(&sa, conn->ms->host, APR_INET, conn->ms->port, 0, conn->p); + rv = apr_sockaddr_info_get(&sa, conn->ms->host, family, conn->ms->port, 0, conn->p); if (rv != APR_SUCCESS) { return rv; } @@ -322,6 +327,11 @@ mc_conn_construct(void **conn_, void *pa apr_pool_t *np; apr_pool_t *tp; apr_memcache_server_t *ms = params; +#if APR_HAVE_SOCKADDR_UN + apr_int32_t family = ms->host[0] != '/' ? APR_INET : APR_UNIX; +#else + apr_int32_t family = APR_INET; +#endif rv = apr_pool_create(&np, pool); if (rv != APR_SUCCESS) { @@ -339,7 +349,7 @@ mc_conn_construct(void **conn_, void *pa conn->p = np; conn->tp = tp; - rv = apr_socket_create(&conn->sock, APR_INET, SOCK_STREAM, 0, np); + rv = apr_socket_create(&conn->sock, family, SOCK_STREAM, 0, np); if (rv != APR_SUCCESS) { apr_pool_destroy(np); Modified: head/contrib/apr-util/misc/apu_dso.c ============================================================================== --- head/contrib/apr-util/misc/apu_dso.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/misc/apu_dso.c Mon Nov 25 22:20:34 2013 (r258602) @@ -75,7 +75,6 @@ static apr_status_t apu_dso_term(void *p apr_status_t apu_dso_init(apr_pool_t *pool) { apr_status_t ret = APR_SUCCESS; - apr_pool_t *global; apr_pool_t *parent; if (apr_atomic_inc32(&initialised)) { @@ -88,17 +87,19 @@ apr_status_t apu_dso_init(apr_pool_t *po } /* Top level pool scope, need process-scope lifetime */ - for (parent = global = pool; parent; parent = apr_pool_parent_get(global)) - global = parent; + for (parent = apr_pool_parent_get(pool); + parent && parent != pool; + parent = apr_pool_parent_get(pool)) + pool = parent; - dsos = apr_hash_make(global); + dsos = apr_hash_make(pool); #if APR_HAS_THREADS - ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, global); + ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool); /* This already registers a pool cleanup */ #endif - apr_pool_cleanup_register(global, NULL, apu_dso_term, + apr_pool_cleanup_register(pool, NULL, apu_dso_term, apr_pool_cleanup_null); apr_atomic_dec32(&in_init); Modified: head/contrib/apr-util/test/abts.c ============================================================================== --- head/contrib/apr-util/test/abts.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/test/abts.c Mon Nov 25 22:20:34 2013 (r258602) @@ -106,6 +106,9 @@ abts_suite *abts_add_suite(abts_suite *s /* suite_name_full may be an absolute path depending on __FILE__ * expansion */ suite_name = strrchr(suite_name_full, '/'); + if (!suite_name) { + suite_name = strrchr(suite_name_full, '\\'); + } if (suite_name) { suite_name++; } else { @@ -247,7 +250,8 @@ void abts_int_nequal(abts_case *tc, cons tc->failed = TRUE; if (verbose) { - fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual); + fprintf(stderr, "Line %d: expected something other than <%d>, but saw <%d>\n", + lineno, expected, actual); fflush(stderr); } } @@ -279,7 +283,8 @@ void abts_str_nequal(abts_case *tc, cons tc->failed = TRUE; if (verbose) { - fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual); + fprintf(stderr, "Line %d: expected something other than <%s>, but saw <%s>\n", + lineno, expected, actual); fflush(stderr); } } Modified: head/contrib/apr-util/test/testpass.c ============================================================================== --- head/contrib/apr-util/test/testpass.c Mon Nov 25 22:16:27 2013 (r258601) +++ head/contrib/apr-util/test/testpass.c Mon Nov 25 22:20:34 2013 (r258602) @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 22:55:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DA74BDF; Mon, 25 Nov 2013 22:55:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4AE200F; Mon, 25 Nov 2013 22:55:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMt7Iv073774; Mon, 25 Nov 2013 22:55:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMt64a073772; Mon, 25 Nov 2013 22:55:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311252255.rAPMt64a073772@svn.freebsd.org> From: Adrian Chadd Date: Mon, 25 Nov 2013 22:55:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258605 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:55:07 -0000 Author: adrian Date: Mon Nov 25 22:55:06 2013 New Revision: 258605 URL: http://svnweb.freebsd.org/changeset/base/258605 Log: Convert over the TCP probes to use mtod() rather than directly dereferencing m->m_data. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Nov 25 22:37:36 2013 (r258604) +++ head/sys/netinet/tcp_input.c Mon Nov 25 22:55:06 2013 (r258605) @@ -1393,7 +1393,7 @@ relocked: } #endif - TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later @@ -1405,7 +1405,7 @@ relocked: return; dropwithreset: - TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); if (ti_locked == TI_WLOCKED) { INP_INFO_WUNLOCK(&V_tcbinfo); @@ -1429,7 +1429,7 @@ dropwithreset: dropunlock: if (m != NULL) - TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th); if (ti_locked == TI_WLOCKED) { INP_INFO_WUNLOCK(&V_tcbinfo); @@ -1928,8 +1928,8 @@ tcp_do_segment(struct mbuf *m, struct tc goto dropwithreset; } if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { - TCP_PROBE5(connect_refused, NULL, tp, m->m_data, tp, - th); + TCP_PROBE5(connect_refused, NULL, tp, + mtod(m, const char *), tp, th); tp = tcp_drop(tp, ECONNREFUSED); } if (thflags & TH_RST) @@ -1982,7 +1982,7 @@ tcp_do_segment(struct mbuf *m, struct tc } else { tcp_state_change(tp, TCPS_ESTABLISHED); TCP_PROBE5(connect_established, NULL, tp, - m->m_data, tp, th); + mtod(m, const char *), tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); @@ -2387,8 +2387,8 @@ tcp_do_segment(struct mbuf *m, struct tc tp->t_flags &= ~TF_NEEDFIN; } else { tcp_state_change(tp, TCPS_ESTABLISHED); - TCP_PROBE5(accept_established, NULL, tp, m->m_data, tp, - th); + TCP_PROBE5(accept_established, NULL, tp, + mtod(m, const char *), tp, th); cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Nov 25 22:37:36 2013 (r258604) +++ head/sys/netinet/tcp_subr.c Mon Nov 25 22:55:06 2013 (r258605) @@ -720,9 +720,10 @@ tcp_respond(struct tcpcb *tp, void *ipge tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); #endif if (flags & TH_RST) - TCP_PROBE5(accept_refused, NULL, NULL, m->m_data, tp, nth); + TCP_PROBE5(accept_refused, NULL, NULL, mtod(m, const char *), + tp, nth); - TCP_PROBE5(send, NULL, tp, m->m_data, tp, nth); + TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth); #ifdef INET6 if (isipv6) (void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp); From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 22:55:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62EBED1B; Mon, 25 Nov 2013 22:55:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5272F2036; Mon, 25 Nov 2013 22:55:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMtm2X073874; Mon, 25 Nov 2013 22:55:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMtmqi073873; Mon, 25 Nov 2013 22:55:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311252255.rAPMtmqi073873@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 25 Nov 2013 22:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258606 - head/usr.sbin/iostat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:55:48 -0000 Author: pluknet Date: Mon Nov 25 22:55:47 2013 New Revision: 258606 URL: http://svnweb.freebsd.org/changeset/base/258606 Log: iostat: fix extracting TTY statistics from core. MFC after: 1 week Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Mon Nov 25 22:55:06 2013 (r258605) +++ head/usr.sbin/iostat/iostat.c Mon Nov 25 22:55:47 2013 (r258606) @@ -117,10 +117,10 @@ #include struct nlist namelist[] = { -#define X_TK_NIN 0 - { "_tk_nin" }, -#define X_TK_NOUT 1 - { "_tk_nout" }, +#define X_TTY_NIN 0 + { "_tty_nin" }, +#define X_TTY_NOUT 1 + { "_tty_nout" }, #define X_BOOTTIME 2 { "_boottime" }, #define X_END 2 @@ -448,9 +448,9 @@ main(int argc, char **argv) long double etime; if (Tflag > 0) { - if ((readvar(kd, "kern.tty_nin", X_TK_NIN, &cur.tk_nin, + if ((readvar(kd, "kern.tty_nin", X_TTY_NIN, &cur.tk_nin, sizeof(cur.tk_nin)) != 0) - || (readvar(kd, "kern.tty_nout", X_TK_NOUT, + || (readvar(kd, "kern.tty_nout", X_TTY_NOUT, &cur.tk_nout, sizeof(cur.tk_nout))!= 0)) { Tflag = 0; warnx("disabling TTY statistics"); From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 23:19:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FEE4687; Mon, 25 Nov 2013 23:19:58 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CF592170; Mon, 25 Nov 2013 23:19:57 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id en1so6262823wid.3 for ; Mon, 25 Nov 2013 15:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=F3xkQgL2SJrkOcwhRz0fLNoVBtnygjw5gHp7snMcMls=; b=tSYbfJk7HUmOM6R84jU4l//iQNR5BMkGhKkYTmCitS4xUBCNWGmcUIZQZQB8uMiKN+ Falcn/dL5+fOeimGwPVArgey83xkggL32veEjKROToFdz+aimvexOdhLomJoafaNrT66 q9rH4Gh8cMZAniWryimfByeOpOy65+T1ew9mJzOH6z5CpeChf9pmWKq+EqMxlrE0ktdB yo0XHSP+FGpk2+3L0Tk6PNyoS/KZZ5zuFUGLEUOEDW6jZiG92iZ79XwgmCgn/Fu1JtUc aqp45bTC4JNWswrHATSuUw4LK/B6OVzTlvUZLSaqTCI/DBJCMCG7JPwECAXrK5F8UYa1 ZjRA== MIME-Version: 1.0 X-Received: by 10.194.175.66 with SMTP id by2mr3301567wjc.59.1385421595971; Mon, 25 Nov 2013 15:19:55 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.217.0.143 with HTTP; Mon, 25 Nov 2013 15:19:55 -0800 (PST) In-Reply-To: <201311252255.rAPMtmqi073873@svn.freebsd.org> References: <201311252255.rAPMtmqi073873@svn.freebsd.org> Date: Tue, 26 Nov 2013 03:19:55 +0400 X-Google-Sender-Auth: iZxADzD_aa9PHqTRhrY4e_w0Yr4 Message-ID: Subject: Re: svn commit: r258606 - head/usr.sbin/iostat From: Sergey Kandaurov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 23:19:58 -0000 On 26 November 2013 02:55, Sergey Kandaurov wrote: > Author: pluknet > Date: Mon Nov 25 22:55:47 2013 > New Revision: 258606 > URL: http://svnweb.freebsd.org/changeset/base/258606 > > Log: > iostat: fix extracting TTY statistics from core. This is imho still incomplete. devstat(3) abuses(?) monotonic clock to give iostat time difference for calculating live avg. statistics since system boot (1st step). For vmcore it would make sense to build it upon time_second. [Currently it uses same thing for both.] -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 23:31:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75D408A9; Mon, 25 Nov 2013 23:31:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65443220E; Mon, 25 Nov 2013 23:31:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPNV14c089945; Mon, 25 Nov 2013 23:31:01 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPNV19d089941; Mon, 25 Nov 2013 23:31:01 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311252331.rAPNV19d089941@svn.freebsd.org> From: Neel Natu Date: Mon, 25 Nov 2013 23:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258609 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 23:31:01 -0000 Author: neel Date: Mon Nov 25 23:31:00 2013 New Revision: 258609 URL: http://svnweb.freebsd.org/changeset/base/258609 Log: Fix discrepancy between the IOAPIC ID advertised by firmware tables and the actual value read by the guest from the device. The IOAPIC ID is now set to zero in both MPtable/ACPI tables as well as in the ioapic device emulation. Pointed out by: grehan@ Modified: head/usr.sbin/bhyve/acpi.c head/usr.sbin/bhyve/mptbl.c Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Mon Nov 25 22:58:12 2013 (r258608) +++ head/usr.sbin/bhyve/acpi.c Mon Nov 25 23:31:00 2013 (r258609) @@ -263,7 +263,7 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, "[0001]\t\tSubtable Type : 01\n"); EFPRINTF(fp, "[0001]\t\tLength : 0C\n"); /* iasl expects a hex value for the i/o apic id */ - EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", basl_ncpu); + EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", 0); EFPRINTF(fp, "[0001]\t\tReserved : 00\n"); EFPRINTF(fp, "[0004]\t\tAddress : fec00000\n"); EFPRINTF(fp, "[0004]\t\tInterrupt : 00000000\n"); Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Mon Nov 25 22:58:12 2013 (r258608) +++ head/usr.sbin/bhyve/mptbl.c Mon Nov 25 23:31:00 2013 (r258609) @@ -279,12 +279,12 @@ mptable_build(struct vmctx *ctx, int ncp mpch->entry_count += MPE_NUM_BUSES; mpei = (io_apic_entry_ptr)curraddr; - mpt_build_ioapic_entries(mpei, ncpu + 1); + mpt_build_ioapic_entries(mpei, 0); curraddr += sizeof(*mpei); mpch->entry_count++; mpie = (int_entry_ptr) curraddr; - mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, ncpu + 1); + mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, 0); curraddr += sizeof(*mpie) * MPEII_MAX_IRQ; mpch->entry_count += MPEII_MAX_IRQ; From owner-svn-src-head@FreeBSD.ORG Mon Nov 25 23:45:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C12ABAC9; Mon, 25 Nov 2013 23:45:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0A4E22C1; Mon, 25 Nov 2013 23:45:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPNjoWq094919; Mon, 25 Nov 2013 23:45:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPNjojC094917; Mon, 25 Nov 2013 23:45:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311252345.rAPNjojC094917@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 25 Nov 2013 23:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258610 - head/sbin/growfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 23:45:50 -0000 Author: pluknet Date: Mon Nov 25 23:45:50 2013 New Revision: 258610 URL: http://svnweb.freebsd.org/changeset/base/258610 Log: Adjust introduction history. Dump .Dd for this and previous changes. Discussed with: trasz MFC after: 3 days Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 ============================================================================== --- head/sbin/growfs/growfs.8 Mon Nov 25 23:31:00 2013 (r258609) +++ head/sbin/growfs/growfs.8 Mon Nov 25 23:45:50 2013 (r258610) @@ -37,7 +37,7 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd April 30, 2012 +.Dd November 26, 2013 .Dt GROWFS 8 .Os .Sh NAME @@ -116,7 +116,7 @@ The utility first appeared in .Fx 4.4 . The ability to resize mounted filesystems was added in -.Fx 10.0 . +.Fx 9.2 . .Sh AUTHORS .An Christoph Herrmann Aq chm@FreeBSD.org .An Thomas-Henning von Kamptz Aq tomsoft@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 01:30:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04CB059E; Tue, 26 Nov 2013 01:30:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEDFB27A9; Tue, 26 Nov 2013 01:30:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ1UA0Z031880; Tue, 26 Nov 2013 01:30:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ1UADW031879; Tue, 26 Nov 2013 01:30:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260130.rAQ1UADW031879@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 01:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258612 - head/sys/dev/iwi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 01:30:11 -0000 Author: adrian Date: Tue Nov 26 01:30:10 2013 New Revision: 258612 URL: http://svnweb.freebsd.org/changeset/base/258612 Log: The bssid can change from underneath us, so take a reference before we fiddle with it. Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Tue Nov 26 00:23:47 2013 (r258611) +++ head/sys/dev/iwi/if_iwi.c Tue Nov 26 01:30:10 2013 (r258612) @@ -945,10 +945,13 @@ iwi_media_status(struct ifnet *ifp, stru struct ieee80211vap *vap = ifp->if_softc; struct ieee80211com *ic = vap->iv_ic; struct iwi_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211_node *ni; /* read current transmission rate from adapter */ - vap->iv_bss->ni_txrate = + ni = ieee80211_ref_node(vap->iv_bss); + ni->ni_txrate = iwi_cvtrate(CSR_READ_4(sc, IWI_CSR_CURRENT_TX_RATE)); + ieee80211_free_node(ni); ieee80211_media_status(ifp, imr); } @@ -1367,13 +1370,14 @@ iwi_checkforqos(struct ieee80211vap *vap frm += frm[1] + 2; } - ni = vap->iv_bss; + ni = ieee80211_ref_node(vap->iv_bss); ni->ni_capinfo = capinfo; ni->ni_associd = associd & 0x3fff; if (wme != NULL) ni->ni_flags |= IEEE80211_NODE_QOS; else ni->ni_flags &= ~IEEE80211_NODE_QOS; + ieee80211_free_node(ni); #undef SUBTYPE } @@ -2812,7 +2816,7 @@ iwi_auth_and_assoc(struct iwi_softc *sc, { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; - struct ieee80211_node *ni = vap->iv_bss; + struct ieee80211_node *ni; struct iwi_configuration config; struct iwi_associate *assoc = &sc->assoc; struct iwi_rateset rs; @@ -2822,6 +2826,8 @@ iwi_auth_and_assoc(struct iwi_softc *sc, IWI_LOCK_ASSERT(sc); + ni = ieee80211_ref_node(vap->iv_bss); + if (sc->flags & IWI_FLAG_ASSOCIATED) { DPRINTF(("Already associated\n")); return (-1); @@ -2980,6 +2986,7 @@ iwi_auth_and_assoc(struct iwi_softc *sc, le16toh(assoc->intval))); error = iwi_cmd(sc, IWI_CMD_ASSOCIATE, assoc, sizeof *assoc); done: + ieee80211_free_node(ni); if (error) IWI_STATE_END(sc, IWI_FW_ASSOCIATING); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 02:02:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08CDBD58; Tue, 26 Nov 2013 02:02:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EBAC42956; Tue, 26 Nov 2013 02:02:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ225WO042666; Tue, 26 Nov 2013 02:02:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ225Ux042665; Tue, 26 Nov 2013 02:02:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260202.rAQ225Ux042665@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 02:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258613 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 02:02:06 -0000 Author: adrian Date: Tue Nov 26 02:02:05 2013 New Revision: 258613 URL: http://svnweb.freebsd.org/changeset/base/258613 Log: Refactor out the sendfile copyout in order to make vn_sendfile() callable from the kernel. Right now vn_sendfile() can't be called from anything other than a syscall handler _and_ return the number of bytes queued. This simply moves the copyout() to do_sendfile() so that any kernel code can initiate vn_sendfile() outside of a syscall context. Tested: * tiny little sendfile program spitting things out a tcp socket Sponsored by: Netflix, Inc. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Nov 26 01:30:10 2013 (r258612) +++ head/sys/kern/uipc_syscalls.c Tue Nov 26 02:02:05 2013 (r258613) @@ -1908,6 +1908,7 @@ do_sendfile(struct thread *td, struct se struct file *fp; cap_rights_t rights; int error; + off_t sbytes; /* * File offset must be positive. If it goes beyond EOF @@ -1947,9 +1948,11 @@ do_sendfile(struct thread *td, struct se } error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, uap->offset, - uap->nbytes, uap->sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); fdrop(fp, td); - + if (uap->sbytes != NULL) { + copyout(&sbytes, uap->sbytes, sizeof(off_t)); + } out: free(hdr_uio, M_IOV); free(trl_uio, M_IOV); @@ -2546,7 +2549,7 @@ out: td->td_retval[0] = 0; } if (sent != NULL) { - copyout(&sbytes, sent, sizeof(off_t)); + (*sent) = sbytes; } if (obj != NULL) vm_object_deallocate(obj); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 03:00:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DAE77A6; Tue, 26 Nov 2013 03:00:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 740772BDE; Tue, 26 Nov 2013 03:00:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ30tVP062983; Tue, 26 Nov 2013 03:00:55 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ30tKS062982; Tue, 26 Nov 2013 03:00:55 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201311260300.rAQ30tKS062982@svn.freebsd.org> From: Peter Grehan Date: Tue, 26 Nov 2013 03:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258614 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 03:00:55 -0000 Author: grehan Date: Tue Nov 26 03:00:54 2013 New Revision: 258614 URL: http://svnweb.freebsd.org/changeset/base/258614 Log: The Data Byte Count (DBC) field of a Physical Region Descriptor Table is 22 bits, with the bit 31 being the interrupt-on-completion bit. OpenBSD and UEFI set this bit, resulting in large block i/o lengths being sent to bhyve and coredumping the process. Fix by masking off the relevant 22 bits when using the DBC field as a length. Reviewed by: Zhixiang Yu Discussed with: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) MFC after: 10.0 Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Tue Nov 26 02:02:05 2013 (r258613) +++ head/usr.sbin/bhyve/pci_ahci.c Tue Nov 26 03:00:54 2013 (r258614) @@ -165,6 +165,7 @@ struct ahci_cmd_hdr { struct ahci_prdt_entry { uint64_t dba; uint32_t reserved; +#define DBCMASK 0x3fffff uint32_t dbc; }; @@ -461,10 +462,13 @@ ahci_handle_dma(struct ahci_port *p, int * Build up the iovec based on the prdt */ for (i = 0; i < iovcnt; i++) { + uint32_t dbcsz; + + dbcsz = (prdt->dbc & DBCMASK) + 1; breq->br_iov[i].iov_base = paddr_guest2host(ahci_ctx(sc), - prdt->dba, prdt->dbc + 1); - breq->br_iov[i].iov_len = prdt->dbc + 1; - aior->done += (prdt->dbc + 1); + prdt->dba, dbcsz); + breq->br_iov[i].iov_len = dbcsz; + aior->done += dbcsz; prdt++; } if (readop) @@ -513,11 +517,14 @@ write_prdt(struct ahci_port *p, int slot from = buf; prdt = (struct ahci_prdt_entry *)(cfis + 0x80); for (i = 0; i < hdr->prdtl && len; i++) { - uint8_t *ptr = paddr_guest2host(ahci_ctx(p->pr_sc), - prdt->dba, prdt->dbc + 1); - memcpy(ptr, from, prdt->dbc + 1); - len -= (prdt->dbc + 1); - from += (prdt->dbc + 1); + uint8_t *ptr; + uint32_t dbcsz; + + dbcsz = (prdt->dbc & DBCMASK) + 1; + ptr = paddr_guest2host(ahci_ctx(p->pr_sc), prdt->dba, dbcsz); + memcpy(ptr, from, dbcsz); + len -= dbcsz; + from += dbcsz; prdt++; } hdr->prdbc = size - len; @@ -908,10 +915,13 @@ atapi_read(struct ahci_port *p, int slot * Build up the iovec based on the prdt */ for (i = 0; i < iovcnt; i++) { + uint32_t dbcsz; + + dbcsz = (prdt->dbc & DBCMASK) + 1; breq->br_iov[i].iov_base = paddr_guest2host(ahci_ctx(sc), - prdt->dba, prdt->dbc + 1); - breq->br_iov[i].iov_len = prdt->dbc + 1; - aior->done += (prdt->dbc + 1); + prdt->dba, dbcsz); + breq->br_iov[i].iov_len = dbcsz; + aior->done += dbcsz; prdt++; } err = blockif_read(p->bctx, breq); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 05:26:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55080C0A; Tue, 26 Nov 2013 05:26:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B31A22DA; Tue, 26 Nov 2013 05:26:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ5QBJD012983; Tue, 26 Nov 2013 05:26:11 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ5QBgQ012981; Tue, 26 Nov 2013 05:26:11 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201311260526.rAQ5QBgQ012981@svn.freebsd.org> From: Andreas Tobler Date: Tue, 26 Nov 2013 05:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258615 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 05:26:11 -0000 Author: andreast Date: Tue Nov 26 05:26:10 2013 New Revision: 258615 URL: http://svnweb.freebsd.org/changeset/base/258615 Log: Take care to handle the full 16 byte buffer in the get/put routines. Also, skip the VTERM header once when receiving data from the hypervisor call when we have a HVTERMPROT connection. MFC after: 1 week Modified: head/sys/powerpc/pseries/phyp_console.c Modified: head/sys/powerpc/pseries/phyp_console.c ============================================================================== --- head/sys/powerpc/pseries/phyp_console.c Tue Nov 26 03:00:54 2013 (r258614) +++ head/sys/powerpc/pseries/phyp_console.c Tue Nov 26 05:26:10 2013 (r258615) @@ -286,6 +286,7 @@ static int uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) { int err; + int hdr = 0; uart_lock(&sc->sc_mtx); if (sc->inbuflen == 0) { @@ -296,6 +297,7 @@ uart_phyp_get(struct uart_phyp_softc *sc uart_unlock(&sc->sc_mtx); return (-1); } + hdr = 1; } if (sc->inbuflen == 0) { @@ -305,6 +307,14 @@ uart_phyp_get(struct uart_phyp_softc *sc if (bufsize > sc->inbuflen) bufsize = sc->inbuflen; + + if ((sc->protocol == HVTERMPROT) && (hdr == 1)) { + sc->inbuflen = sc->inbuflen - 4; + /* The VTERM protocol has a 4 byte header, skip it here. */ + memmove(&sc->phyp_inbuf.str[0], &sc->phyp_inbuf.str[4], + sc->inbuflen); + } + memcpy(buffer, sc->phyp_inbuf.str, bufsize); sc->inbuflen -= bufsize; if (sc->inbuflen > 0) @@ -320,32 +330,40 @@ uart_phyp_put(struct uart_phyp_softc *sc { uint16_t seqno; uint64_t len = 0; + int err; + union { - uint64_t u64; - char bytes[8]; + uint64_t u64[2]; + char bytes[16]; } cbuf; uart_lock(&sc->sc_mtx); switch (sc->protocol) { case HVTERM1: - if (bufsize > 8) - bufsize = 8; + if (bufsize > 16) + bufsize = 16; memcpy(&cbuf, buffer, bufsize); len = bufsize; break; case HVTERMPROT: - if (bufsize > 4) - bufsize = 4; + if (bufsize > 12) + bufsize = 12; seqno = sc->outseqno++; cbuf.bytes[0] = VS_DATA_PACKET_HEADER; - cbuf.bytes[1] = 4 + bufsize; /* total length */ + cbuf.bytes[1] = 4 + bufsize; /* total length, max 16 bytes */ cbuf.bytes[2] = (seqno >> 8) & 0xff; cbuf.bytes[3] = seqno & 0xff; memcpy(&cbuf.bytes[4], buffer, bufsize); len = 4 + bufsize; break; } - phyp_hcall(H_PUT_TERM_CHAR, sc->vtermid, len, cbuf.u64, 0); + + do { + err = phyp_hcall(H_PUT_TERM_CHAR, sc->vtermid, len, cbuf.u64[0], + cbuf.u64[1]); + DELAY(100); + } while (err == H_BUSY); + uart_unlock(&sc->sc_mtx); return (bufsize); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 07:35:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F527363; Tue, 26 Nov 2013 07:35:13 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C9D5281B; Tue, 26 Nov 2013 07:35:12 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rAQ7Z7lR003679; Tue, 26 Nov 2013 09:35:07 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rAQ7Z7lR003679 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rAQ7Z70b003678; Tue, 26 Nov 2013 09:35:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 26 Nov 2013 09:35:07 +0200 From: Konstantin Belousov To: Adrian Chadd Subject: Re: svn commit: r258613 - head/sys/kern Message-ID: <20131126073507.GR59496@kib.kiev.ua> References: <201311260202.rAQ225Ux042665@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="02rv0UQOqTxuETXn" Content-Disposition: inline In-Reply-To: <201311260202.rAQ225Ux042665@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 07:35:13 -0000 --02rv0UQOqTxuETXn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 26, 2013 at 02:02:05AM +0000, Adrian Chadd wrote: > Author: adrian > Date: Tue Nov 26 02:02:05 2013 > New Revision: 258613 > URL: http://svnweb.freebsd.org/changeset/base/258613 >=20 > Log: > Refactor out the sendfile copyout in order to make vn_sendfile() > callable from the kernel. > =20 > Right now vn_sendfile() can't be called from anything other than > a syscall handler _and_ return the number of bytes queued. > This simply moves the copyout() to do_sendfile() so that any kernel > code can initiate vn_sendfile() outside of a syscall context. > =20 > Tested: > =20 > * tiny little sendfile program spitting things out a tcp socket > =20 > Sponsored by: Netflix, Inc. >=20 > Modified: > head/sys/kern/uipc_syscalls.c >=20 > Modified: head/sys/kern/uipc_syscalls.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/uipc_syscalls.c Tue Nov 26 01:30:10 2013 (r258612) > +++ head/sys/kern/uipc_syscalls.c Tue Nov 26 02:02:05 2013 (r258613) > @@ -1908,6 +1908,7 @@ do_sendfile(struct thread *td, struct se > struct file *fp; > cap_rights_t rights; > int error; > + off_t sbytes; > =20 > /* > * File offset must be positive. If it goes beyond EOF > @@ -1947,9 +1948,11 @@ do_sendfile(struct thread *td, struct se > } > =20 > error =3D fo_sendfile(fp, uap->s, hdr_uio, trl_uio, uap->offset, > - uap->nbytes, uap->sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); > + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); > fdrop(fp, td); > - > + if (uap->sbytes !=3D NULL) { > + copyout(&sbytes, uap->sbytes, sizeof(off_t)); > + } > out: > free(hdr_uio, M_IOV); > free(trl_uio, M_IOV); > @@ -2546,7 +2549,7 @@ out: > td->td_retval[0] =3D 0; > } > if (sent !=3D NULL) { > - copyout(&sbytes, sent, sizeof(off_t)); > + (*sent) =3D sbytes; > } > if (obj !=3D NULL) > vm_object_deallocate(obj); This breaks compat32 sendfile(2). --02rv0UQOqTxuETXn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSlE8qAAoJEJDCuSvBvK1BJFIP/2c7BJE4lMbe2PKQqSkqY9OV ZSJHPcVZfX53Jw1tBgx/RVDzA05G/4Iq2gecMWddLL5hJH+IV7KSrlvInAhdrI9B zawrHMC6FqaGdI2OFAqZYH7Atb+3cLR8dz2sd06s73JE2krO5QFkFAeyp5DSyZe4 F4W+MlJwctea/r6WL18uMnz3izgGsE4obUONvZQKUxlpmgwiqTbo88Wge2j1Lu1u F+2TmpWP+tBw5zG1nTnpmKBZ0NEuUzPJfoBuDyUoQ/MGf8lXXtt6sdUgB+SR0YIG wQnsTzw/MEiKxCT+Ca2h5Zyzx4nJveoXSChF9uJ9epWkb6PbYMrwkDegCD+ECB7K etEtFskvshyA8e8BNWvDiaWuOu12E2vztEheHXPitmygRdoHG8FBt1P0w9SNzCLr 3ZE4IQYPoifgavly0lj3P2C0dnAiSqU2qRbJTTH8zmog8v0sZgfXHm4j/+q8AxOe /GCzqGyWI0e8INoJ30kV9bfNA1JQn5RqhQiapJESYZrNadznyKPe1YTTFp6d/2Fi aHZ+fjiI8frAS5hE/QsXA3rjLtwQ+5bRUhGBGYr9zTo4m2q6LxKuBaVdcKvcxLLZ xYf8PK4KshxA/UD3OTflpxqhxU9chNfReGO9Nv4PpkOjz2V+uFAWLU1Ywx1NwbTz jsBD+fCgYFjJZDhStxeG =d6N4 -----END PGP SIGNATURE----- --02rv0UQOqTxuETXn-- From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 07:51:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AE148CA; Tue, 26 Nov 2013 07:51:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0ACBB28E1; Tue, 26 Nov 2013 07:51:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ7pcHJ062173; Tue, 26 Nov 2013 07:51:38 GMT (envelope-from lwhsu@svn.freebsd.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ7pc0a062172; Tue, 26 Nov 2013 07:51:38 GMT (envelope-from lwhsu@svn.freebsd.org) Message-Id: <201311260751.rAQ7pc0a062172@svn.freebsd.org> From: Li-Wen Hsu Date: Tue, 26 Nov 2013 07:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258617 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 07:51:39 -0000 Author: lwhsu (ports committer) Date: Tue Nov 26 07:51:38 2013 New Revision: 258617 URL: http://svnweb.freebsd.org/changeset/base/258617 Log: Also note to add xhci(4) to kernel configuration to utilize USB 3.0 Approved by: markj Modified: head/share/man/man4/axge.4 Modified: head/share/man/man4/axge.4 ============================================================================== --- head/share/man/man4/axge.4 Tue Nov 26 07:36:41 2013 (r258616) +++ head/share/man/man4/axge.4 Tue Nov 26 07:51:38 2013 (r258617) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2013 +.Dd November 22, 2013 .Dt AXGE 4 .Os .Sh NAME @@ -41,6 +41,7 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device xhci" .Cd "device ehci" .Cd "device uhci" .Cd "device ohci" From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 07:52:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83E5DA06; Tue, 26 Nov 2013 07:52:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7370428ED; Tue, 26 Nov 2013 07:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ7qffn062333; Tue, 26 Nov 2013 07:52:41 GMT (envelope-from lwhsu@svn.freebsd.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ7qfIX062332; Tue, 26 Nov 2013 07:52:41 GMT (envelope-from lwhsu@svn.freebsd.org) Message-Id: <201311260752.rAQ7qfIX062332@svn.freebsd.org> From: Li-Wen Hsu Date: Tue, 26 Nov 2013 07:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258618 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 07:52:41 -0000 Author: lwhsu (ports committer) Date: Tue Nov 26 07:52:40 2013 New Revision: 258618 URL: http://svnweb.freebsd.org/changeset/base/258618 Log: Mention axge(4) Approved by: kevlo Modified: head/share/man/man4/usb.4 Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Tue Nov 26 07:51:38 2013 (r258617) +++ head/share/man/man4/usb.4 Tue Nov 26 07:52:40 2013 (r258618) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd November 26, 2013 .Dt USB 4 .Os .Sh NAME @@ -147,6 +147,7 @@ specifications can be found at: .Xr usbdi 4 , .Xr aue 4 , .Xr axe 4 , +.Xr axge 4 , .Xr cue 4 , .Xr ehci 4 , .Xr kue 4 , From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:07:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFB84FB8; Tue, 26 Nov 2013 08:07:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AEF422988; Tue, 26 Nov 2013 08:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ87OoE066634; Tue, 26 Nov 2013 08:07:24 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ87OUB066632; Tue, 26 Nov 2013 08:07:24 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311260807.rAQ87OUB066632@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 26 Nov 2013 08:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258619 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:07:24 -0000 Author: pluknet Date: Tue Nov 26 08:07:24 2013 New Revision: 258619 URL: http://svnweb.freebsd.org/changeset/base/258619 Log: DragonFly 3.6.0 released. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Nov 26 07:52:40 2013 (r258618) +++ head/share/misc/bsd-family-tree Tue Nov 26 08:07:24 2013 (r258619) @@ -284,6 +284,7 @@ FreeBSD 5.2 | | | FreeBSD | | NetBSD 6.1.2 | | | 9.2 Mac OS X | | | | 10.9 | OpenBSD 5.4 | + | | | | DragonFly 3.6.0 | | | | | | | | | | | | | | | @@ -603,6 +604,7 @@ NetBSD 6.0.3 2013-09-30 [NBD] NetBSD 6.1.2 2013-09-30 [NBD] Mac OS X 10.9 2013-10-22 [APL] OpenBSD 5.4 2013-11-01 [OBD] +DragonFly 3.6.0 2013-11-25 [DFB] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:07:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FCD5182; Tue, 26 Nov 2013 08:07:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F666298F; Tue, 26 Nov 2013 08:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ87jkS066723; Tue, 26 Nov 2013 08:07:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ87jBT066722; Tue, 26 Nov 2013 08:07:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311260807.rAQ87jBT066722@svn.freebsd.org> From: Dimitry Andric Date: Tue, 26 Nov 2013 08:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258620 - head/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:07:45 -0000 Author: dim Date: Tue Nov 26 08:07:45 2013 New Revision: 258620 URL: http://svnweb.freebsd.org/changeset/base/258620 Log: Pull in r195558 from upstream clang trunk: Fix a SSE2 intrinsics typo Full discourse at: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html Patch by Dimitry Andric and Alexey Dokuchaev! Reported by: danfe MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Modified: head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Tue Nov 26 08:07:24 2013 (r258619) +++ head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Tue Nov 26 08:07:45 2013 (r258620) @@ -1344,7 +1344,7 @@ _mm_movepi64_pi64(__m128i __a) } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) -_mm_movpi64_pi64(__m64 __a) +_mm_movpi64_epi64(__m64 __a) { return (__m128i){ (long long)__a, 0 }; } From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:15:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84E5D53A; Tue, 26 Nov 2013 08:15:38 +0000 (UTC) Received: from mail-qe0-x232.google.com (mail-qe0-x232.google.com [IPv6:2607:f8b0:400d:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 258082A0B; Tue, 26 Nov 2013 08:15:38 +0000 (UTC) Received: by mail-qe0-f50.google.com with SMTP id 1so3240022qec.9 for ; Tue, 26 Nov 2013 00:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bwBvQuc9mNQPXWgfd7ckU5tckq9uNvH6kwfxFR1ewRc=; b=lMGvBpL1BZHtVXsa36BwIPXzABhjHGa7jzfahJqylJ4nJCQ7VCelm9V8bZCt4BEF5z ikgWnA4CsrKbOy6AoCxmB19ns/H7Td4UEUotkfmagx64VIRK7sEuiE3baK62iRcQAOT+ ix0zvra1GlGEjLOGPzHVvEQ8LIPqOpy7ifxsInS2p78WCVOBsQMOVCOcUw+9voQaDg9h ZjIccR+NCJRtTOUMwiUrlRZE/XxhcGVAxAn6M4LDm5E7DuqrkHmNvUFx4DHGPI5/P1m8 n849lirwKjM64RfZ2O9tPPPKbMGl0rMlJJs4YTt4lqc8OcYbEGIr5uy9XCr7WeCsCaIh RN8g== MIME-Version: 1.0 X-Received: by 10.49.59.70 with SMTP id x6mr53458281qeq.17.1385453737340; Tue, 26 Nov 2013 00:15:37 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Tue, 26 Nov 2013 00:15:37 -0800 (PST) In-Reply-To: <20131126073507.GR59496@kib.kiev.ua> References: <201311260202.rAQ225Ux042665@svn.freebsd.org> <20131126073507.GR59496@kib.kiev.ua> Date: Tue, 26 Nov 2013 00:15:37 -0800 X-Google-Sender-Auth: cTCs_yFn7yLNNuu3inBRfuOrtVY Message-ID: Subject: Re: svn commit: r258613 - head/sys/kern From: Adrian Chadd To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:15:38 -0000 On 25 November 2013 23:35, Konstantin Belousov wrote: > This breaks compat32 sendfile(2). Where's that? -adrian From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:32:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12A8C9B4; Tue, 26 Nov 2013 08:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 018AB2B87; Tue, 26 Nov 2013 08:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8Wbdc076381; Tue, 26 Nov 2013 08:32:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8Wb8o076380; Tue, 26 Nov 2013 08:32:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260832.rAQ8Wb8o076380@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 08:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258621 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:32:38 -0000 Author: adrian Date: Tue Nov 26 08:32:37 2013 New Revision: 258621 URL: http://svnweb.freebsd.org/changeset/base/258621 Log: Fix the compat32 sendfile() to be in line with my recent changes. Reminded by: kib Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 26 08:07:45 2013 (r258620) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 26 08:32:37 2013 (r258621) @@ -1652,6 +1652,7 @@ freebsd32_do_sendfile(struct thread *td, cap_rights_t rights; off_t offset; int error; + off_t sbytes; offset = PAIR32TO64(off_t, uap->offset); if (offset < 0) @@ -1692,8 +1693,10 @@ freebsd32_do_sendfile(struct thread *td, } error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset, - uap->nbytes, uap->sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); fdrop(fp, td); + if (uap->sbytes != NULL) + copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: if (hdr_uio) From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:46:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71890C88; Tue, 26 Nov 2013 08:46:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D7BC2C1E; Tue, 26 Nov 2013 08:46:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8kXTd080171; Tue, 26 Nov 2013 08:46:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8kR7L080135; Tue, 26 Nov 2013 08:46:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260846.rAQ8kR7L080135@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 08:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258622 - in head: share/man/man9 sys/cam/ctl sys/cddl/dev/dtrace sys/cddl/dev/sdt sys/compat/linux sys/dev/xen/blkback sys/kern sys/net sys/netinet sys/opencrypto sys/security/mac sys/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:46:33 -0000 Author: avg Date: Tue Nov 26 08:46:27 2013 New Revision: 258622 URL: http://svnweb.freebsd.org/changeset/base/258622 Log: dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE In its stead use the Solaris / illumos approach of emulating '-' (dash) in probe names with '__' (two consecutive underscores). Reviewed by: markj MFC after: 3 weeks Modified: head/share/man/man9/SDT.9 head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/dev/dtrace/dtrace_test.c head/sys/cddl/dev/sdt/sdt.c head/sys/compat/linux/linux_dtrace.h head/sys/dev/xen/blkback/blkback.c head/sys/kern/kern_clock.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_priv.c head/sys/kern/kern_proc.c head/sys/kern/kern_racct.c head/sys/kern/kern_sig.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/kern_timeout.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_devstat.c head/sys/kern/subr_turnstile.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/net/vnet.c head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/sctp_dtrace_define.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/opencrypto/deflate.c head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_internal.h head/sys/sys/sdt.h head/sys/tools/vnode_if.awk Modified: head/share/man/man9/SDT.9 ============================================================================== --- head/share/man/man9/SDT.9 Tue Nov 26 08:32:37 2013 (r258621) +++ head/share/man/man9/SDT.9 Tue Nov 26 08:46:27 2013 (r258622) @@ -35,28 +35,28 @@ .Fn SDT_PROVIDER_DECLARE prov .Fn SDT_PROVIDER_DEFINE prov .Fn SDT_PROBE_DECLARE prov mod func name -.Fn SDT_PROBE_DEFINE prov mod func name sname -.Fn SDT_PROBE_DEFINE0 prov mod func name sname -.Fn SDT_PROBE_DEFINE1 prov mod func name sname arg0 -.Fn SDT_PROBE_DEFINE2 prov mod func name sname arg0 arg1 -.Fn SDT_PROBE_DEFINE3 prov mod func name sname arg0 arg1 arg2 -.Fn SDT_PROBE_DEFINE4 prov mod func name sname arg0 arg1 arg2 arg3 -.Fn SDT_PROBE_DEFINE5 prov mod func name sname arg0 arg1 arg2 arg3 arg4 -.Fn SDT_PROBE_DEFINE6 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5 -.Fn SDT_PROBE_DEFINE7 prov mod func name sname arg0 arg1 arg2 arg3 arg4 arg5 \ +.Fn SDT_PROBE_DEFINE prov mod func name +.Fn SDT_PROBE_DEFINE0 prov mod func name +.Fn SDT_PROBE_DEFINE1 prov mod func name arg0 +.Fn SDT_PROBE_DEFINE2 prov mod func name arg0 arg1 +.Fn SDT_PROBE_DEFINE3 prov mod func name arg0 arg1 arg2 +.Fn SDT_PROBE_DEFINE4 prov mod func name arg0 arg1 arg2 arg3 +.Fn SDT_PROBE_DEFINE5 prov mod func name arg0 arg1 arg2 arg3 arg4 +.Fn SDT_PROBE_DEFINE6 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5 +.Fn SDT_PROBE_DEFINE7 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5 \ arg6 -.Fn SDT_PROBE_DEFINE0_XLATE prov mod func name sname -.Fn SDT_PROBE_DEFINE1_XLATE prov mod func name sname arg0 xarg0 -.Fn SDT_PROBE_DEFINE2_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 -.Fn SDT_PROBE_DEFINE3_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE0_XLATE prov mod func name +.Fn SDT_PROBE_DEFINE1_XLATE prov mod func name arg0 xarg0 +.Fn SDT_PROBE_DEFINE2_XLATE prov mod func name arg0 xarg0 arg1 xarg1 +.Fn SDT_PROBE_DEFINE3_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 -.Fn SDT_PROBE_DEFINE4_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE4_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 -.Fn SDT_PROBE_DEFINE5_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE5_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 -.Fn SDT_PROBE_DEFINE6_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE6_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5 -.Fn SDT_PROBE_DEFINE7_XLATE prov mod func name sname arg0 xarg0 arg1 xarg1 \ +.Fn SDT_PROBE_DEFINE7_XLATE prov mod func name arg0 xarg0 arg1 xarg1 \ arg2 xarg2 arg3 xarg3 arg4 xarg4 arg5 xarg5 arg6 xarg6 .Fn SDT_PROBE0 prov mod func name .Fn SDT_PROBE1 prov mod func name arg0 @@ -136,20 +136,19 @@ See the section. Note in particular that probes must not be defined across multiple kernel modules. -The -.Fn SDT_PROBE_DEFINE* -macros also take an extra -.Ar sname -parameter. -This is used to allow the creation of probes with names containing the +.Pp +If .Ql - -character. -Specifically, the +character (dash) is wanted in a probe name, +then it should be represented as +.Ql __ +(double underscore) in the probe .Ar name -argument should contain the probe name with all dashes converted to underscores, -and the -.Ar sname -argument should be the probe name as it will be referenced by D scripts. +parameter passed to various +.Fn SDT_* +macros, +because of technical reasons +(a dash is not valid in C identifiers). .Pp The .Fn SDT_PROBE_DEFINE* Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Nov 26 08:46:27 2013 (r258622) @@ -628,10 +628,10 @@ ctl_be_block_flush_file(struct ctl_be_bl ctl_complete_beio(beio); } -SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, file_done, file_done,"uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, file_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, file_done,"uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, "uint64_t"); static void ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, @@ -960,10 +960,10 @@ ctl_be_block_cw_dispatch(struct ctl_be_b } } -SDT_PROBE_DEFINE1(cbb, kernel, read, start, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, start, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, alloc_done, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, "uint64_t"); static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, Modified: head/sys/cddl/dev/dtrace/dtrace_test.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_test.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/cddl/dev/dtrace/dtrace_test.c Tue Nov 26 08:46:27 2013 (r258622) @@ -39,7 +39,7 @@ SDT_PROVIDER_DEFINE(test); -SDT_PROBE_DEFINE7(test, , , sdttest, sdttest, "int", "int", "int", "int", "int", +SDT_PROBE_DEFINE7(test, , , sdttest, "int", "int", "int", "int", "int", "int", "int"); /* Modified: head/sys/cddl/dev/sdt/sdt.c ============================================================================== --- head/sys/cddl/dev/sdt/sdt.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/cddl/dev/sdt/sdt.c Tue Nov 26 08:46:27 2013 (r258622) @@ -136,6 +136,8 @@ sdt_create_probe(struct sdt_probe *probe char mod[DTRACE_MODNAMELEN]; char func[DTRACE_FUNCNAMELEN]; char name[DTRACE_NAMELEN]; + const char *from; + char *to; size_t len; TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) @@ -159,7 +161,18 @@ sdt_create_probe(struct sdt_probe *probe * in the C compiler, so we have to respect const vs non-const. */ strlcpy(func, probe->func, sizeof(func)); - strlcpy(name, probe->name, sizeof(name)); + + from = probe->name; + to = name; + for (len = 0; len < (sizeof(name) - 1) && *from != '\0'; + len++, from++, to++) { + if (from[0] == '_' && from[1] == '_') { + *to = '-'; + from++; + } else + *to = *from; + } + *to = '\0'; if (dtrace_probe_lookup(prov->id, mod, func, name) != DTRACE_IDNONE) return; Modified: head/sys/compat/linux/linux_dtrace.h ============================================================================== --- head/sys/compat/linux/linux_dtrace.h Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/compat/linux/linux_dtrace.h Tue Nov 26 08:46:27 2013 (r258622) @@ -48,27 +48,27 @@ LINUX_DTRACE, a, b, c) #define _LIN_SDT_PROBE_DEFINE0(a, b, c, d) SDT_PROBE_DEFINE(a, \ - b, c, d, d) + b, c, d) #define LIN_SDT_PROBE_DEFINE0(a, b, c) _LIN_SDT_PROBE_DEFINE0(\ LINUX_DTRACE, a, b, c) #define _LIN_SDT_PROBE_DEFINE1(a, b, c, d, e) SDT_PROBE_DEFINE1(a, \ - b, c, d, d, e) + b, c, d, e) #define LIN_SDT_PROBE_DEFINE1(a, b, c, d) _LIN_SDT_PROBE_DEFINE1(\ LINUX_DTRACE, a, b, c, d) #define _LIN_SDT_PROBE_DEFINE2(a, b, c, d, e, f) SDT_PROBE_DEFINE2(a, \ - b, c, d, d, e, f) + b, c, d, e, f) #define LIN_SDT_PROBE_DEFINE2(a, b, c, d, e) _LIN_SDT_PROBE_DEFINE2(\ LINUX_DTRACE, a, b, c, d, e) #define _LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f, g) SDT_PROBE_DEFINE3(a, \ - b, c, d, d, e, f, g) + b, c, d, e, f, g) #define LIN_SDT_PROBE_DEFINE3(a, b, c, d, e, f) _LIN_SDT_PROBE_DEFINE3(\ LINUX_DTRACE, a, b, c, d, e, f) #define _LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g, h) SDT_PROBE_DEFINE4(a, \ - b, c, d, d, e, f, g, h) + b, c, d, e, f, g, h) #define LIN_SDT_PROBE_DEFINE4(a, b, c, d, e, f, g) _LIN_SDT_PROBE_DEFINE4(\ LINUX_DTRACE, a, b, c, d, e, f, g) #define _LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) \ - SDT_PROBE_DEFINE5(a, b, c, d, d, e, f, g, h, i) + SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h, i) #define LIN_SDT_PROBE_DEFINE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE_DEFINE5(\ LINUX_DTRACE, a, b, c, d, e, f, g, h) Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/dev/xen/blkback/blkback.c Tue Nov 26 08:46:27 2013 (r258622) @@ -2030,10 +2030,10 @@ xbb_filter(void *arg) } SDT_PROVIDER_DEFINE(xbb); -SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_dev, flush, flush, "int"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, read, read, "int", "uint64_t", +SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_dev, flush, "int"); +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, read, "int", "uint64_t", "uint64_t"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, write, write, "int", +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_dev, write, "int", "uint64_t", "uint64_t"); /*----------------------------- Backend Handlers -----------------------------*/ @@ -2209,10 +2209,10 @@ fail_free_bios: return (error); } -SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_file, flush, flush, "int"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, read, read, "int", "uint64_t", +SDT_PROBE_DEFINE1(xbb, kernel, xbb_dispatch_file, flush, "int"); +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, read, "int", "uint64_t", "uint64_t"); -SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, write, write, "int", +SDT_PROBE_DEFINE3(xbb, kernel, xbb_dispatch_file, write, "int", "uint64_t", "uint64_t"); /** Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_clock.c Tue Nov 26 08:46:27 2013 (r258622) @@ -92,7 +92,7 @@ SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_ static struct mtx time_lock; SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE2(sched, , , tick, tick, "struct thread *", "struct proc *"); +SDT_PROBE_DEFINE2(sched, , , tick, "struct thread *", "struct proc *"); static int sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS) Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_exec.c Tue Nov 26 08:46:27 2013 (r258622) @@ -95,9 +95,9 @@ dtrace_execexit_func_t dtrace_fasttrap_e #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE1(proc, kernel, , exec, exec, "char *"); -SDT_PROBE_DEFINE1(proc, kernel, , exec_failure, exec-failure, "int"); -SDT_PROBE_DEFINE1(proc, kernel, , exec_success, exec-success, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec, "char *"); +SDT_PROBE_DEFINE1(proc, kernel, , exec__failure, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exec__success, "char *"); MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments"); @@ -832,7 +832,7 @@ interpret: vfs_mark_atime(imgp->vp, td->td_ucred); - SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); + SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); done1: /* @@ -904,7 +904,7 @@ exec_fail: p->p_flag &= ~P_INEXEC; PROC_UNLOCK(p); - SDT_PROBE(proc, kernel, , exec_failure, error, 0, 0, 0, 0); + SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); done2: #ifdef MAC Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_exit.c Tue Nov 26 08:46:27 2013 (r258622) @@ -93,7 +93,7 @@ dtrace_execexit_func_t dtrace_fasttrap_e #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE1(proc, kernel, , exit, exit, "int"); +SDT_PROBE_DEFINE1(proc, kernel, , exit, "int"); /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_fork.c Tue Nov 26 08:46:27 2013 (r258622) @@ -88,7 +88,7 @@ dtrace_fork_func_t dtrace_fasttrap_fork; #endif SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE3(proc, kernel, , create, create, "struct proc *", +SDT_PROBE_DEFINE3(proc, kernel, , create, "struct proc *", "struct proc *", "int"); #ifndef _SYS_SYSPROTO_H_ Modified: head/sys/kern/kern_priv.c ============================================================================== --- head/sys/kern/kern_priv.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_priv.c Tue Nov 26 08:46:27 2013 (r258622) @@ -63,8 +63,8 @@ SYSCTL_INT(_security_bsd, OID_AUTO, unpr TUNABLE_INT("security.bsd.unprivileged_mlock", &unprivileged_mlock); SDT_PROVIDER_DEFINE(priv); -SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_ok, priv-ok, "int"); -SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_err, priv-err, "int"); +SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__ok, "int"); +SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv__err, "int"); /* * Check a credential for privilege. Lots of good reasons to deny privilege; @@ -167,9 +167,9 @@ priv_check_cred(struct ucred *cred, int error = EPERM; out: if (error) - SDT_PROBE1(priv, kernel, priv_check, priv_err, priv); + SDT_PROBE1(priv, kernel, priv_check, priv__err, priv); else - SDT_PROBE1(priv, kernel, priv_check, priv_ok, priv); + SDT_PROBE1(priv, kernel, priv_check, priv__ok, priv); return (error); } Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_proc.c Tue Nov 26 08:46:27 2013 (r258622) @@ -91,17 +91,17 @@ __FBSDID("$FreeBSD$"); #endif SDT_PROVIDER_DEFINE(proc); -SDT_PROBE_DEFINE4(proc, kernel, ctor, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, ctor, entry, "struct proc *", "int", "void *", "int"); -SDT_PROBE_DEFINE4(proc, kernel, ctor, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, ctor, return, "struct proc *", "int", "void *", "int"); -SDT_PROBE_DEFINE4(proc, kernel, dtor, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE4(proc, kernel, dtor, entry, "struct proc *", "int", "void *", "struct thread *"); -SDT_PROBE_DEFINE3(proc, kernel, dtor, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, dtor, return, "struct proc *", "int", "void *"); -SDT_PROBE_DEFINE3(proc, kernel, init, entry, entry, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, init, entry, "struct proc *", "int", "int"); -SDT_PROBE_DEFINE3(proc, kernel, init, return, return, "struct proc *", "int", +SDT_PROBE_DEFINE3(proc, kernel, init, return, "struct proc *", "int", "int"); MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_racct.c Tue Nov 26 08:46:27 2013 (r258622) @@ -95,29 +95,29 @@ static void racct_add_cred_locked(struct uint64_t amount); SDT_PROVIDER_DEFINE(racct); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add, add, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_failure, add-failure, +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__failure, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_cred, add-cred, "struct ucred *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__cred, "struct ucred *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, add_force, add-force, "struct proc *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, add__force, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, set, set, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, set, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, set_failure, set-failure, +SDT_PROBE_DEFINE3(racct, kernel, rusage, set__failure, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, sub, sub, "struct proc *", "int", +SDT_PROBE_DEFINE3(racct, kernel, rusage, sub, "struct proc *", "int", "uint64_t"); -SDT_PROBE_DEFINE3(racct, kernel, rusage, sub_cred, sub-cred, "struct ucred *", +SDT_PROBE_DEFINE3(racct, kernel, rusage, sub__cred, "struct ucred *", "int", "uint64_t"); -SDT_PROBE_DEFINE1(racct, kernel, racct, create, create, "struct racct *"); -SDT_PROBE_DEFINE1(racct, kernel, racct, destroy, destroy, "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, join, join, "struct racct *", +SDT_PROBE_DEFINE1(racct, kernel, racct, create, "struct racct *"); +SDT_PROBE_DEFINE1(racct, kernel, racct, destroy, "struct racct *"); +SDT_PROBE_DEFINE2(racct, kernel, racct, join, "struct racct *", "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, join_failure, join-failure, +SDT_PROBE_DEFINE2(racct, kernel, racct, join__failure, "struct racct *", "struct racct *"); -SDT_PROBE_DEFINE2(racct, kernel, racct, leave, leave, "struct racct *", +SDT_PROBE_DEFINE2(racct, kernel, racct, leave, "struct racct *", "struct racct *"); int racct_types[] = { @@ -526,7 +526,7 @@ racct_add_locked(struct proc *p, int res #ifdef RCTL error = rctl_enforce(p, resource, amount); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, add_failure, p, resource, + SDT_PROBE(racct, kernel, rusage, add__failure, p, resource, amount, 0, 0); return (error); } @@ -557,7 +557,7 @@ racct_add_cred_locked(struct ucred *cred { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, add_cred, cred, resource, amount, + SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, 0, 0); racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount); @@ -590,7 +590,7 @@ void racct_add_force(struct proc *p, int resource, uint64_t amount) { - SDT_PROBE(racct, kernel, rusage, add_force, p, resource, amount, 0, 0); + SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0); /* * We need proc lock to dereference p->p_ucred. @@ -644,7 +644,7 @@ racct_set_locked(struct proc *p, int res if (diff_proc > 0) { error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, set_failure, p, + SDT_PROBE(racct, kernel, rusage, set__failure, p, resource, amount, 0, 0); return (error); } @@ -804,7 +804,7 @@ racct_sub_cred_locked(struct ucred *cred { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, sub_cred, cred, resource, amount, + SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount, 0, 0); #ifdef notyet Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_sig.c Tue Nov 26 08:46:27 2013 (r258622) @@ -92,11 +92,11 @@ __FBSDID("$FreeBSD$"); #define ONSIG 32 /* NSIG for osig* syscalls. XXX. */ SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE3(proc, kernel, , signal_send, signal-send, "struct thread *", +SDT_PROBE_DEFINE3(proc, kernel, , signal__send, "struct thread *", "struct proc *", "int"); -SDT_PROBE_DEFINE2(proc, kernel, , signal_clear, signal-clear, "int", +SDT_PROBE_DEFINE2(proc, kernel, , signal__clear, "int", "ksiginfo_t *"); -SDT_PROBE_DEFINE3(proc, kernel, , signal_discard, signal-discard, +SDT_PROBE_DEFINE3(proc, kernel, , signal__discard, "struct thread *", "struct proc *", "int"); static int coredump(struct thread *); @@ -1253,7 +1253,7 @@ kern_sigtimedwait(struct thread *td, sig reschedule_signals(p, new_block, 0); if (error == 0) { - SDT_PROBE(proc, kernel, , signal_clear, sig, ksi, 0, 0, 0); + SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0); if (ksi->ksi_code == SI_TIMER) itimer_accept(p, ksi->ksi_timerid, ksi); @@ -2062,7 +2062,7 @@ tdsendsignal(struct proc *p, struct thre } else sigqueue = &td->td_sigqueue; - SDT_PROBE(proc, kernel, , signal_send, td, p, sig, 0, 0 ); + SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 ); /* * If the signal is being ignored, @@ -2073,7 +2073,7 @@ tdsendsignal(struct proc *p, struct thre */ mtx_lock(&ps->ps_mtx); if (SIGISMEMBER(ps->ps_sigignore, sig)) { - SDT_PROBE(proc, kernel, , signal_discard, td, p, sig, 0, 0 ); + SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 ); mtx_unlock(&ps->ps_mtx); if (ksi && (ksi->ksi_flags & KSI_INS)) Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_synch.c Tue Nov 26 08:46:27 2013 (r258622) @@ -107,18 +107,18 @@ SYSCTL_INT(_kern, OID_AUTO, fscale, CTLF static void loadav(void *arg); SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE(sched, , , preempt, preempt); +SDT_PROBE_DEFINE(sched, , , preempt); /* * These probes reference Solaris features that are not implemented in FreeBSD. * Create the probes anyway for compatibility with existing D scripts; they'll * just never fire. */ -SDT_PROBE_DEFINE(sched, , , cpucaps_sleep, cpucaps-sleep); -SDT_PROBE_DEFINE(sched, , , cpucaps_wakeup, cpucaps-wakeup); -SDT_PROBE_DEFINE(sched, , , schedctl_nopreempt, schedctl-nopreempt); -SDT_PROBE_DEFINE(sched, , , schedctl_preempt, schedctl-preempt); -SDT_PROBE_DEFINE(sched, , , schedctl_yield, schedctl-yield); +SDT_PROBE_DEFINE(sched, , , cpucaps__sleep); +SDT_PROBE_DEFINE(sched, , , cpucaps__wakeup); +SDT_PROBE_DEFINE(sched, , , schedctl__nopreempt); +SDT_PROBE_DEFINE(sched, , , schedctl__preempt); +SDT_PROBE_DEFINE(sched, , , schedctl__yield); static void sleepinit(void *unused) Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_thread.c Tue Nov 26 08:46:27 2013 (r258622) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); #include SDT_PROVIDER_DECLARE(proc); -SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp-exit); +SDT_PROBE_DEFINE(proc, , , lwp__exit); /* Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/kern_timeout.c Tue Nov 26 08:46:27 2013 (r258622) @@ -68,9 +68,9 @@ DPCPU_DECLARE(sbintime_t, hardclocktime) #endif SDT_PROVIDER_DEFINE(callout_execute); -SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_start, callout-start, +SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__start, "struct callout *"); -SDT_PROBE_DEFINE1(callout_execute, kernel, , callout_end, callout-end, +SDT_PROBE_DEFINE1(callout_execute, kernel, , callout__end, "struct callout *"); #ifdef CALLOUT_PROFILING @@ -677,9 +677,9 @@ softclock_call_cc(struct callout *c, str sbt1 = sbinuptime(); #endif THREAD_NO_SLEEPING(); - SDT_PROBE(callout_execute, kernel, , callout_start, c, 0, 0, 0, 0); + SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0); c_func(c_arg); - SDT_PROBE(callout_execute, kernel, , callout_end, c, 0, 0, 0, 0); + SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0); THREAD_SLEEPING_OK(); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt2 = sbinuptime(); Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/sched_4bsd.c Tue Nov 26 08:46:27 2013 (r258622) @@ -254,20 +254,20 @@ SYSCTL_INT(_kern_sched, OID_AUTO, follow SDT_PROVIDER_DEFINE(sched); -SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , change__pri, "struct thread *", "struct proc *", "uint8_t"); -SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , dequeue, "struct thread *", "struct proc *", "void *"); -SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , enqueue, "struct thread *", "struct proc *", "void *", "int"); -SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , lend__pri, "struct thread *", "struct proc *", "uint8_t", "struct thread *"); -SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); -SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", +SDT_PROBE_DEFINE2(sched, , , load__change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off__cpu, "struct thread *", "struct proc *"); -SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); -SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); -SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", +SDT_PROBE_DEFINE(sched, , , on__cpu); +SDT_PROBE_DEFINE(sched, , , remain__cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); static __inline void @@ -276,7 +276,7 @@ sched_load_add(void) sched_tdcnt++; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); - SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); + SDT_PROBE2(sched, , , load__change, NOCPU, sched_tdcnt); } static __inline void @@ -285,7 +285,7 @@ sched_load_rem(void) sched_tdcnt--; KTR_COUNTER0(KTR_SCHED, "load", "global load", sched_tdcnt); - SDT_PROBE2(sched, , , load_change, NOCPU, sched_tdcnt); + SDT_PROBE2(sched, , , load__change, NOCPU, sched_tdcnt); } /* * Arrange to reschedule if necessary, taking the priorities and @@ -835,12 +835,12 @@ sched_priority(struct thread *td, u_char KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); - SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); + SDT_PROBE3(sched, , , change__pri, td, td->td_proc, prio); if (td != curthread && prio > td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); - SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + SDT_PROBE4(sched, , , lend__pri, td, td->td_proc, prio, curthread); } THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1032,7 +1032,7 @@ sched_switch(struct thread *td, struct t PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif - SDT_PROBE2(sched, , , off_cpu, td, td->td_proc); + SDT_PROBE2(sched, , , off__cpu, td, td->td_proc); /* I feel sleepy */ lock_profile_release_lock(&sched_lock.lock_object); @@ -1066,13 +1066,13 @@ sched_switch(struct thread *td, struct t * need to reap it. */ - SDT_PROBE0(sched, , , on_cpu); + SDT_PROBE0(sched, , , on__cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif } else - SDT_PROBE0(sched, , , remain_cpu); + SDT_PROBE0(sched, , , remain__cpu); #ifdef SMP if (td->td_flags & TDF_IDLETD) Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/sched_ule.c Tue Nov 26 08:46:27 2013 (r258622) @@ -343,20 +343,20 @@ SYSINIT(sched_initticks, SI_SUB_CLOCKS, SDT_PROVIDER_DEFINE(sched); -SDT_PROBE_DEFINE3(sched, , , change_pri, change-pri, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , change__pri, "struct thread *", "struct proc *", "uint8_t"); -SDT_PROBE_DEFINE3(sched, , , dequeue, dequeue, "struct thread *", +SDT_PROBE_DEFINE3(sched, , , dequeue, "struct thread *", "struct proc *", "void *"); -SDT_PROBE_DEFINE4(sched, , , enqueue, enqueue, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , enqueue, "struct thread *", "struct proc *", "void *", "int"); -SDT_PROBE_DEFINE4(sched, , , lend_pri, lend-pri, "struct thread *", +SDT_PROBE_DEFINE4(sched, , , lend__pri, "struct thread *", "struct proc *", "uint8_t", "struct thread *"); -SDT_PROBE_DEFINE2(sched, , , load_change, load-change, "int", "int"); -SDT_PROBE_DEFINE2(sched, , , off_cpu, off-cpu, "struct thread *", +SDT_PROBE_DEFINE2(sched, , , load__change, "int", "int"); +SDT_PROBE_DEFINE2(sched, , , off__cpu, "struct thread *", "struct proc *"); -SDT_PROBE_DEFINE(sched, , , on_cpu, on-cpu); -SDT_PROBE_DEFINE(sched, , , remain_cpu, remain-cpu); -SDT_PROBE_DEFINE2(sched, , , surrender, surrender, "struct thread *", +SDT_PROBE_DEFINE(sched, , , on__cpu); +SDT_PROBE_DEFINE(sched, , , remain__cpu); +SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); /* @@ -541,7 +541,7 @@ tdq_load_add(struct tdq *tdq, struct thr if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload++; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); - SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); + SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -561,7 +561,7 @@ tdq_load_rem(struct tdq *tdq, struct thr if ((td->td_flags & TDF_NOLOAD) == 0) tdq->tdq_sysload--; KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); - SDT_PROBE2(sched, , , load_change, (int)TDQ_ID(tdq), tdq->tdq_load); + SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load); } /* @@ -1679,12 +1679,12 @@ sched_thread_priority(struct thread *td, KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); - SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); + SDT_PROBE3(sched, , , change__pri, td, td->td_proc, prio); if (td != curthread && prio < td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td)); - SDT_PROBE4(sched, , , lend_pri, td, td->td_proc, prio, + SDT_PROBE4(sched, , , lend__pri, td, td->td_proc, prio, curthread); } ts = td->td_sched; @@ -1937,7 +1937,7 @@ sched_switch(struct thread *td, struct t if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif - SDT_PROBE2(sched, , , off_cpu, newtd, newtd->td_proc); + SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc); lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; sched_pctcpu_update(newtd->td_sched, 0); @@ -1963,14 +1963,14 @@ sched_switch(struct thread *td, struct t lock_profile_obtain_lock_success( &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); - SDT_PROBE0(sched, , , on_cpu); + SDT_PROBE0(sched, , , on__cpu); #ifdef HWPMC_HOOKS if (PMC_PROC_IS_USING_PMCS(td->td_proc)) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); #endif } else { thread_unblock_switch(td, mtx); - SDT_PROBE0(sched, , , remain_cpu); + SDT_PROBE0(sched, , , remain__cpu); } /* * Assert that all went well and return. Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/subr_devstat.c Tue Nov 26 08:46:27 2013 (r258622) @@ -47,19 +47,19 @@ __FBSDID("$FreeBSD$"); SDT_PROVIDER_DEFINE(io); -SDT_PROBE_DEFINE2(io, , , start, start, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , done, done, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , wait_start, wait-start, "struct bio *", +SDT_PROBE_DEFINE2(io, , , start, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , done, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , wait__start, "struct bio *", "struct devstat *"); -SDT_PROBE_DEFINE2(io, , , wait_done, wait-done, "struct bio *", +SDT_PROBE_DEFINE2(io, , , wait__done, "struct bio *", "struct devstat *"); #define DTRACE_DEVSTAT_START() SDT_PROBE2(io, , , start, NULL, ds) #define DTRACE_DEVSTAT_BIO_START() SDT_PROBE2(io, , , start, bp, ds) #define DTRACE_DEVSTAT_DONE() SDT_PROBE2(io, , , done, NULL, ds) #define DTRACE_DEVSTAT_BIO_DONE() SDT_PROBE2(io, , , done, bp, ds) -#define DTRACE_DEVSTAT_WAIT_START() SDT_PROBE2(io, , , wait_start, NULL, ds) -#define DTRACE_DEVSTAT_WAIT_DONE() SDT_PROBE2(io, , , wait_done, NULL, ds) +#define DTRACE_DEVSTAT_WAIT_START() SDT_PROBE2(io, , , wait__start, NULL, ds) +#define DTRACE_DEVSTAT_WAIT_DONE() SDT_PROBE2(io, , , wait__done, NULL, ds) static int devstat_num_devs; static long devstat_generation = 1; Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/subr_turnstile.c Tue Nov 26 08:46:27 2013 (r258622) @@ -169,8 +169,8 @@ static int turnstile_init(void *mem, int static void turnstile_fini(void *mem, int size); SDT_PROVIDER_DECLARE(sched); -SDT_PROBE_DEFINE(sched, , , sleep, sleep); -SDT_PROBE_DEFINE2(sched, , , wakeup, wakeup, "struct thread *", +SDT_PROBE_DEFINE(sched, , , sleep); +SDT_PROBE_DEFINE2(sched, , , wakeup, "struct thread *", "struct proc *"); /* Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/vfs_cache.c Tue Nov 26 08:46:27 2013 (r258622) @@ -61,28 +61,28 @@ __FBSDID("$FreeBSD$"); #include SDT_PROVIDER_DECLARE(vfs); -SDT_PROBE_DEFINE3(vfs, namecache, enter, done, done, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namecache, enter, done, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, done, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, "struct vnode *", "char *"); -SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, entry, "struct vnode *"); -SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, hit, "struct vnode *", +SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, "struct vnode *"); +SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, miss, "struct vnode *"); -SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, return, "int", +SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, "struct vnode *"); +SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, "int", "struct vnode *", "char *"); -SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, hit, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit_negative, hit-negative, +SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit__negative, "struct vnode *", "char *"); -SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, miss, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, "struct vnode *", "char *"); -SDT_PROBE_DEFINE1(vfs, namecache, purge, done, done, "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, done, "struct vnode *"); -SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, done, "struct mount *"); -SDT_PROBE_DEFINE3(vfs, namecache, zap, done, done, "struct vnode *", "char *", +SDT_PROBE_DEFINE1(vfs, namecache, purge, done, "struct vnode *"); +SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, "struct vnode *"); +SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, "struct mount *"); +SDT_PROBE_DEFINE3(vfs, namecache, zap, done, "struct vnode *", "char *", "struct vnode *"); -SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, done, "struct vnode *", +SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, "struct vnode *", "char *"); /* @@ -613,7 +613,7 @@ negative_success: nchstats.ncs_neghits++; if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; - SDT_PROBE(vfs, namecache, lookup, hit_negative, dvp, nc_get_name(ncp), + SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp), 0, 0, 0); cache_out_ts(ncp, tsp, ticksp); CACHE_WUNLOCK(); Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/vfs_lookup.c Tue Nov 26 08:46:27 2013 (r258622) @@ -69,9 +69,9 @@ __FBSDID("$FreeBSD$"); #undef NAMEI_DIAGNOSTIC SDT_PROVIDER_DECLARE(vfs); -SDT_PROBE_DEFINE3(vfs, namei, lookup, entry, entry, "struct vnode *", "char *", +SDT_PROBE_DEFINE3(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long"); -SDT_PROBE_DEFINE2(vfs, namei, lookup, return, return, "int", "struct vnode *"); +SDT_PROBE_DEFINE2(vfs, namei, lookup, return, "int", "struct vnode *"); /* * Allocation zone for namei Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/kern/vfs_syscalls.c Tue Nov 26 08:46:27 2013 (r258622) @@ -91,8 +91,8 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); -SDT_PROBE_DEFINE2(vfs, , stat, mode, mode, "char *", "int"); -SDT_PROBE_DEFINE2(vfs, , stat, reg, reg, "char *", "int"); +SDT_PROBE_DEFINE2(vfs, , stat, mode, "char *", "int"); +SDT_PROBE_DEFINE2(vfs, , stat, reg, "char *", "int"); static int chroot_refuse_vdir_fds(struct filedesc *fdp); static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/net/vnet.c Tue Nov 26 08:46:27 2013 (r258622) @@ -209,14 +209,14 @@ static TAILQ_HEAD(, vnet_data_free) vnet static struct sx vnet_data_free_lock; SDT_PROVIDER_DEFINE(vnet); -SDT_PROBE_DEFINE1(vnet, functions, vnet_alloc, entry, entry, "int"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, alloc, "int", +SDT_PROBE_DEFINE1(vnet, functions, vnet_alloc, entry, "int"); +SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, "int", "struct vnet *"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, return, return, +SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, return, "int", "struct vnet *"); -SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, entry, +SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, "int", "struct vnet *"); -SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return, entry, +SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, entry, "int"); #ifdef DDB Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/netinet/in_kdtrace.c Tue Nov 26 08:46:27 2013 (r258622) @@ -37,7 +37,7 @@ SDT_PROVIDER_DEFINE(ip); SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); -SDT_PROBE_DEFINE6_XLATE(ip, , , receive, receive, +SDT_PROBE_DEFINE6_XLATE(ip, , , receive, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", @@ -45,7 +45,7 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , receive, "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); -SDT_PROBE_DEFINE6_XLATE(ip, , , send, send, +SDT_PROBE_DEFINE6_XLATE(ip, , , send, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", @@ -53,56 +53,56 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, se "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_established, accept-established, +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_refused, accept-refused, +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_established, connect-established, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_refused, connect-refused, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_request, connect-request, +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, receive, +SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); -SDT_PROBE_DEFINE5_XLATE(tcp, , , send, send, +SDT_PROBE_DEFINE5_XLATE(tcp, , , send, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); -SDT_PROBE_DEFINE6_XLATE(tcp, , , state_change, state-change, +SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", "struct tcpcb *", "csinfo_t *", "void *", "void *", @@ -110,14 +110,14 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state_c "void *", "void *", "int", "tcplsinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(udp, , , receive, receive, +SDT_PROBE_DEFINE5_XLATE(udp, , , receive, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udpsinfo_t *", "struct udphdr *", "udpinfo_t *"); -SDT_PROBE_DEFINE5_XLATE(udp, , , send, send, +SDT_PROBE_DEFINE5_XLATE(udp, , , send, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", Modified: head/sys/netinet/in_kdtrace.h ============================================================================== --- head/sys/netinet/in_kdtrace.h Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/netinet/in_kdtrace.h Tue Nov 26 08:46:27 2013 (r258622) @@ -44,14 +44,14 @@ SDT_PROVIDER_DECLARE(udp); SDT_PROBE_DECLARE(ip, , , receive); SDT_PROBE_DECLARE(ip, , , send); -SDT_PROBE_DECLARE(tcp, , , accept_established); -SDT_PROBE_DECLARE(tcp, , , accept_refused); -SDT_PROBE_DECLARE(tcp, , , connect_established); -SDT_PROBE_DECLARE(tcp, , , connect_refused); -SDT_PROBE_DECLARE(tcp, , , connect_request); +SDT_PROBE_DECLARE(tcp, , , accept__established); +SDT_PROBE_DECLARE(tcp, , , accept__refused); +SDT_PROBE_DECLARE(tcp, , , connect__established); +SDT_PROBE_DECLARE(tcp, , , connect__refused); +SDT_PROBE_DECLARE(tcp, , , connect__request); SDT_PROBE_DECLARE(tcp, , , receive); SDT_PROBE_DECLARE(tcp, , , send); -SDT_PROBE_DECLARE(tcp, , , state_change); +SDT_PROBE_DECLARE(tcp, , , state__change); SDT_PROBE_DECLARE(udp, , , receive); SDT_PROBE_DECLARE(udp, , , send); Modified: head/sys/netinet/sctp_dtrace_define.h ============================================================================== --- head/sys/netinet/sctp_dtrace_define.h Tue Nov 26 08:32:37 2013 (r258621) +++ head/sys/netinet/sctp_dtrace_define.h Tue Nov 26 08:46:27 2013 (r258622) @@ -44,7 +44,7 @@ SDT_PROVIDER_DEFINE(sctp); /* Cwnd probe - tracks changes in the congestion window on a netp */ /********************************************************/ /* Initial */ -SDT_PROBE_DEFINE5(sctp, cwnd, net, init, init, +SDT_PROBE_DEFINE5(sctp, cwnd, net, init, "uint32_t", /* The Vtag for this end */ "uint32_t", /* * The port number of the local side << 16 | port number @@ -55,7 +55,7 @@ SDT_PROBE_DEFINE5(sctp, cwnd, net, init, "int"); /* The new value of the cwnd */ /* ACK-INCREASE */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:49:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04F2E377; Tue, 26 Nov 2013 08:49:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D95FC2C6E; Tue, 26 Nov 2013 08:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8nsLE080680; Tue, 26 Nov 2013 08:49:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8nswK080676; Tue, 26 Nov 2013 08:49:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260849.rAQ8nswK080676@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 08:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258625 - in head/sys: cddl/compat/opensolaris/sys kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:49:55 -0000 Author: avg Date: Tue Nov 26 08:49:53 2013 New Revision: 258625 URL: http://svnweb.freebsd.org/changeset/base/258625 Log: sdt: add support for solaris/illumos style DTRACE_PROBE macros The new macros are implemented in terms of SDT_PROBE_DEFINE and SDT_PROBE. Probes defined in this way will appear under SDT provider named "sdt". Parameter types are exposed via SDT_PROBE_ARGTYPE. This is something that illumos does not have by default. This kind of SDT probes is already present in ZFS code, so those probes will now be available if KDTRACE_HOOKS options is enabled. A potential future illumos compatibility enhancement is to encode a provider name as a prefix in a probe name. Reviewed by: markj MFC after: 3 weeks X-MFC after: r258622 Modified: head/sys/cddl/compat/opensolaris/sys/sdt.h head/sys/kern/kern_sdt.c head/sys/sys/sdt.h Modified: head/sys/cddl/compat/opensolaris/sys/sdt.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/sdt.h Tue Nov 26 08:48:09 2013 (r258624) +++ head/sys/cddl/compat/opensolaris/sys/sdt.h Tue Nov 26 08:49:53 2013 (r258625) @@ -31,18 +31,6 @@ #include_next -#undef DTRACE_PROBE -#undef DTRACE_PROBE1 -#undef DTRACE_PROBE2 -#undef DTRACE_PROBE3 -#undef DTRACE_PROBE4 - -#define DTRACE_PROBE(name) -#define DTRACE_PROBE1(name, type1, arg1) -#define DTRACE_PROBE2(name, type1, arg1, type2, arg2) -#define DTRACE_PROBE3(name, type1, arg1, type2, arg2, type3, arg3) -#define DTRACE_PROBE4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) - #define SET_ERROR(err) (err) #endif /* _OPENSOLARIS_SYS_SDT_H_ */ Modified: head/sys/kern/kern_sdt.c ============================================================================== --- head/sys/kern/kern_sdt.c Tue Nov 26 08:48:09 2013 (r258624) +++ head/sys/kern/kern_sdt.c Tue Nov 26 08:49:53 2013 (r258625) @@ -29,6 +29,8 @@ #include #include +SDT_PROVIDER_DEFINE(sdt); + /* * Hook for the DTrace probe function. The SDT provider will set this to * dtrace_probe() when it loads. Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Tue Nov 26 08:48:09 2013 (r258624) +++ head/sys/sys/sdt.h Tue Nov 26 08:49:53 2013 (r258625) @@ -126,6 +126,14 @@ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6, \ xarg6) +#define DTRACE_PROBE(name) +#define DTRACE_PROBE1(name, type0, arg0) +#define DTRACE_PROBE2(name, type0, arg0, type1, arg1) +#define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) +#define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3) +#define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3,\ + type4, arg4) + #else SET_DECLARE(sdt_providers_set, struct sdt_provider); @@ -313,6 +321,51 @@ SET_DECLARE(sdt_argtypes_set, struct sdt (uintptr_t)arg6); \ } while (0) +#define DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, arg4) do { \ + static SDT_PROBE_DEFINE(sdt, , , name); \ + SDT_PROBE(sdt, , , name, arg0, arg1, arg2, arg3, arg4); +#define DTRACE_PROBE_IMPL_END } while (0) + +#define DTRACE_PROBE(name) \ + DTRACE_PROBE_IMPL_START(name, 0, 0, 0, 0, 0) \ + DTRACE_PROBE_IMPL_END + +#define DTRACE_PROBE1(name, type0, arg0) \ + DTRACE_PROBE_IMPL_START(name, arg0, 0, 0, 0, 0) \ + SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ + DTRACE_PROBE_IMPL_END + +#define DTRACE_PROBE2(name, type0, arg0, type1, arg1) \ + DTRACE_PROBE_IMPL_START(name, arg0, arg1, 0, 0, 0) \ + SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ + DTRACE_PROBE_IMPL_END + +#define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) \ + DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, 0, 0) \ + SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ + DTRACE_PROBE_IMPL_END + +#define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3) \ + DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, 0) \ + SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ + DTRACE_PROBE_IMPL_END + +#define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3, \ + type4, arg4) \ + DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ + SDT_PROBE_ARGTYPE(sdt, , , name, 4, #type4, NULL); \ + DTRACE_PROBE_IMPL_END + #endif /* KDTRACE_HOOKS */ /* @@ -365,6 +418,8 @@ struct sdt_provider { void sdt_probe_stub(uint32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); +SDT_PROVIDER_DECLARE(sdt); + #endif /* _KERNEL */ #endif /* _SYS_SDT_H */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:57:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99471841; Tue, 26 Nov 2013 08:57:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 894CA2CFD; Tue, 26 Nov 2013 08:57:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8vPEW083692; Tue, 26 Nov 2013 08:57:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8vPDa083691; Tue, 26 Nov 2013 08:57:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260857.rAQ8vPDa083691@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 08:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258626 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:57:25 -0000 Author: adrian Date: Tue Nov 26 08:57:25 2013 New Revision: 258626 URL: http://svnweb.freebsd.org/changeset/base/258626 Log: Add a new debug section. Modified: head/sys/dev/iwn/if_iwn_debug.h Modified: head/sys/dev/iwn/if_iwn_debug.h ============================================================================== --- head/sys/dev/iwn/if_iwn_debug.h Tue Nov 26 08:49:53 2013 (r258625) +++ head/sys/dev/iwn/if_iwn_debug.h Tue Nov 26 08:57:25 2013 (r258626) @@ -42,6 +42,7 @@ enum { IWN_DEBUG_CMD = 0x00001000, /* cmd submission */ IWN_DEBUG_TXRATE = 0x00002000, /* TX rate debugging */ IWN_DEBUG_PWRSAVE = 0x00004000, /* Power save operations */ + IWN_DEBUG_SCAN = 0x00008000, /* Scan related operations */ IWN_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWN_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ IWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 08:58:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E922990; Tue, 26 Nov 2013 08:58:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2EA52D0B; Tue, 26 Nov 2013 08:58:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8w8dk083816; Tue, 26 Nov 2013 08:58:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8w8VK083815; Tue, 26 Nov 2013 08:58:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260858.rAQ8w8VK083815@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 08:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258627 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:58:09 -0000 Author: adrian Date: Tue Nov 26 08:58:08 2013 New Revision: 258627 URL: http://svnweb.freebsd.org/changeset/base/258627 Log: Add definitions for the microcode TLV flags entry (type 18.) This isn't used anywhere just yet! Obtained from: Linux iwlwifi Modified: head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Tue Nov 26 08:57:25 2013 (r258626) +++ head/sys/dev/iwn/if_iwnreg.h Tue Nov 26 08:58:08 2013 (r258627) @@ -1600,6 +1600,60 @@ struct iwn_fw_tlv { #define IWN5000_FWSZ IWN5000_FW_TEXT_MAXSZ /* + * Microcode flags TLV (18.) + */ + +/** + * enum iwn_ucode_tlv_flag - ucode API flags + * @IWN_UCODE_TLV_FLAGS_PAN: This is PAN capable microcode; this previously + * was a separate TLV but moved here to save space. + * @IWN_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behaviour on hidden SSID, + * treats good CRC threshold as a boolean + * @IWN_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w). + * @IWN_UCODE_TLV_FLAGS_P2P: This uCode image supports P2P. + * @IWN_UCODE_TLV_FLAGS_DW_BC_TABLE: The SCD byte count table is in DWORDS + * @IWN_UCODE_TLV_FLAGS_UAPSD: This uCode image supports uAPSD + * @IWN_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan + * offload profile config command. + * @IWN_UCODE_TLV_FLAGS_RX_ENERGY_API: supports rx signal strength api + * @IWN_UCODE_TLV_FLAGS_TIME_EVENT_API_V2: using the new time event API. + * @IWN_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS: D3 image supports up to six + * (rather than two) IPv6 addresses + * @IWN_UCODE_TLV_FLAGS_BF_UPDATED: new beacon filtering API + * @IWN_UCODE_TLV_FLAGS_NO_BASIC_SSID: not sending a probe with the SSID element + * from the probe request template. + * @IWN_UCODE_TLV_FLAGS_D3_CONTINUITY_API: modified D3 API to allow keeping + * connection when going back to D0 + * @IWN_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL: new NS offload (small version) + * @IWN_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version) + * @IWN_UCODE_TLV_FLAGS_SCHED_SCAN: this uCode image supports scheduled scan. + * @IWN_UCODE_TLV_FLAGS_STA_KEY_CMD: new ADD_STA and ADD_STA_KEY command API + * @IWN_UCODE_TLV_FLAGS_DEVICE_PS_CMD: support device wide power command + * containing CAM (Continuous Active Mode) indication. + */ +enum iwn_ucode_tlv_flag { + IWN_UCODE_TLV_FLAGS_PAN = (1 << 0), + IWN_UCODE_TLV_FLAGS_NEWSCAN = (1 << 1), + IWN_UCODE_TLV_FLAGS_MFP = (1 << 2), + IWN_UCODE_TLV_FLAGS_P2P = (1 << 3), + IWN_UCODE_TLV_FLAGS_DW_BC_TABLE = (1 << 4), + IWN_UCODE_TLV_FLAGS_NEWBT_COEX = (1 << 5), + IWN_UCODE_TLV_FLAGS_UAPSD = (1 << 6), + IWN_UCODE_TLV_FLAGS_SHORT_BL = (1 << 7), + IWN_UCODE_TLV_FLAGS_RX_ENERGY_API = (1 << 8), + IWN_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 = (1 << 9), + IWN_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = (1 << 10), + IWN_UCODE_TLV_FLAGS_BF_UPDATED = (1 << 11), + IWN_UCODE_TLV_FLAGS_NO_BASIC_SSID = (1 << 12), + IWN_UCODE_TLV_FLAGS_D3_CONTINUITY_API = (1 << 14), + IWN_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL = (1 << 15), + IWN_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE = (1 << 16), + IWN_UCODE_TLV_FLAGS_SCHED_SCAN = (1 << 17), + IWN_UCODE_TLV_FLAGS_STA_KEY_CMD = (1 << 19), + IWN_UCODE_TLV_FLAGS_DEVICE_PS_CMD = (1 << 20), +}; + +/* * Offsets into EEPROM. */ #define IWN_EEPROM_MAC 0x015 From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:10:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 822F3D9C; Tue, 26 Nov 2013 09:10:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6349C2D9F; Tue, 26 Nov 2013 09:10:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ9A2F0087787; Tue, 26 Nov 2013 09:10:02 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ9A2d6087784; Tue, 26 Nov 2013 09:10:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260910.rAQ9A2d6087784@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 09:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258628 - in head/sys/cddl: compat/opensolaris/kern contrib/opensolaris/uts/common/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:10:02 -0000 Author: avg Date: Tue Nov 26 09:10:01 2013 New Revision: 258628 URL: http://svnweb.freebsd.org/changeset/base/258628 Log: opensolaris taskq: some cosmetic changes - drop trailing whitespace - remove redundant "extern" from function declarations - remove unused macro MFC after: 1 week Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue Nov 26 08:58:08 2013 (r258627) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue Nov 26 09:10:01 2013 (r258628) @@ -121,7 +121,7 @@ taskq_dispatch(taskq_t *tq, task_func_t mflag = M_WAITOK; else mflag = M_NOWAIT; - /* + /* * If TQ_FRONT is given, we want higher priority for this task, so it * can go at the front of the queue. */ @@ -140,8 +140,6 @@ taskq_dispatch(taskq_t *tq, task_func_t return ((taskqid_t)(void *)task); } -#define TASKQ_MAGIC 0x74541c - static void taskq_run_safe(void *arg, int pending __unused) { @@ -156,7 +154,7 @@ taskq_dispatch_safe(taskq_t *tq, task_fu { int prio; - /* + /* * If TQ_FRONT is given, we want higher priority for this task, so it * can go at the front of the queue. */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Tue Nov 26 08:58:08 2013 (r258627) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Tue Nov 26 09:10:01 2013 (r258628) @@ -70,24 +70,23 @@ struct proc; extern taskq_t *system_taskq; -extern void taskq_init(void); -extern void taskq_mp_init(void); +void taskq_init(void); +void taskq_mp_init(void); -extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); -extern taskq_t *taskq_create_instance(const char *, int, int, pri_t, int, - int, uint_t); -extern taskq_t *taskq_create_proc(const char *, int, pri_t, int, int, +taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); +taskq_t *taskq_create_instance(const char *, int, int, pri_t, int, int, uint_t); +taskq_t *taskq_create_proc(const char *, int, pri_t, int, int, struct proc *, uint_t); -extern taskq_t *taskq_create_sysdc(const char *, int, int, int, +taskq_t *taskq_create_sysdc(const char *, int, int, int, struct proc *, uint_t, uint_t); -extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); -extern void nulltask(void *); -extern void taskq_destroy(taskq_t *); -extern void taskq_wait(taskq_t *); -extern void taskq_suspend(taskq_t *); -extern int taskq_suspended(taskq_t *); -extern void taskq_resume(taskq_t *); -extern int taskq_member(taskq_t *, kthread_t *); +taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +void nulltask(void *); +void taskq_destroy(taskq_t *); +void taskq_wait(taskq_t *); +void taskq_suspend(taskq_t *); +int taskq_suspended(taskq_t *); +void taskq_resume(taskq_t *); +int taskq_member(taskq_t *, kthread_t *); #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:14:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4524CF02; Tue, 26 Nov 2013 09:14:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3491A2DDF; Tue, 26 Nov 2013 09:14:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ9Ee3k090586; Tue, 26 Nov 2013 09:14:40 GMT (envelope-from truckman@svn.freebsd.org) Received: (from truckman@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ9EexO090585; Tue, 26 Nov 2013 09:14:40 GMT (envelope-from truckman@svn.freebsd.org) Message-Id: <201311260914.rAQ9EexO090585@svn.freebsd.org> From: Don Lewis Date: Tue, 26 Nov 2013 09:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258629 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:14:40 -0000 Author: truckman Date: Tue Nov 26 09:14:39 2013 New Revision: 258629 URL: http://svnweb.freebsd.org/changeset/base/258629 Log: Mention that devd will kldload the driver when the device is connected. Mention that the automatic mode switch from umass to u3g needed by some devices does not work unless the driver is loaded before the device is connected. MFC after: 1 month Modified: head/share/man/man4/u3g.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Tue Nov 26 09:10:01 2013 (r258628) +++ head/share/man/man4/u3g.4 Tue Nov 26 09:14:39 2013 (r258629) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd November 26, 2013 .Dt U3G 4 .Os .Sh NAME @@ -40,6 +40,9 @@ module at boot time, place the following .Bd -literal -offset indent u3g_load="YES" .Ed +.Pp +If neither of the above is done, the driver will automatically be loaded +by devd(8) when the device is connected. .Sh DESCRIPTION The .Nm @@ -98,7 +101,12 @@ and .Xr ucom 4 , .Xr usb 4 , .Xr usb_quirk 4 , +.Xr devd 8 , .Xr usbconfig 8 +.Sh BUGS +The automatic mode switch from disk mode to modem mode does not work unless +the driver is either built into the kernel or loaded before the device is +connected. .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:26:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB023305; Tue, 26 Nov 2013 09:26:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B89B62E7E; Tue, 26 Nov 2013 09:26:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ9QJCA094056; Tue, 26 Nov 2013 09:26:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ9QIPs094046; Tue, 26 Nov 2013 09:26:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260926.rAQ9QIPs094046@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 09:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258630 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cdd... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:26:19 -0000 Author: avg Date: Tue Nov 26 09:26:18 2013 New Revision: 258630 URL: http://svnweb.freebsd.org/changeset/base/258630 Log: 734 taskq_dispatch_prealloc() desired 943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP illumos/illumos-gate@5aeb94743e3be0c51e86f73096334611ae3a058e Essentially FreeBSD taskqueues already operate in a mode that was added to Illumos with taskq_dispatch_ent change. We even exposed the superior FreeBSD interface as taskq_dispatch_safe. Now we just rename taskq_dispatch_safe to taskq_dispatch_ent and struct struct ostask to taskq_ent_t, so that code differences will be minimal. After this change sys/cddl/compat/opensolaris/sys/taskq.h header is no longer needed. Note that this commit is not an MFV because the upstream change was not individually committed to the vendor area. MFC after: 8 days Deleted: head/sys/cddl/compat/opensolaris/sys/taskq.h Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Nov 26 09:14:39 2013 (r258629) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Nov 26 09:26:18 2013 (r258630) @@ -23,6 +23,9 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #ifndef _SYS_ZFS_CONTEXT_H #define _SYS_ZFS_CONTEXT_H @@ -367,6 +370,16 @@ typedef struct taskq taskq_t; typedef uintptr_t taskqid_t; typedef void (task_func_t)(void *); +typedef struct taskq_ent { + struct taskq_ent *tqent_next; + struct taskq_ent *tqent_prev; + task_func_t *tqent_func; + void *tqent_arg; + uintptr_t tqent_flags; +} taskq_ent_t; + +#define TQENT_FLAG_PREALLOC 0x1 /* taskq_dispatch_ent used */ + #define TASKQ_PREPOPULATE 0x0001 #define TASKQ_CPR_SAFE 0x0002 /* Use CPR safe protocol */ #define TASKQ_DYNAMIC 0x0004 /* Use dynamic thread scheduling */ @@ -378,6 +391,7 @@ typedef void (task_func_t)(void *); #define TQ_NOQUEUE 0x02 /* Do not enqueue if can't dispatch */ #define TQ_FRONT 0x08 /* Queue in front */ + extern taskq_t *system_taskq; extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); @@ -386,6 +400,8 @@ extern taskq_t *taskq_create(const char #define taskq_create_sysdc(a, b, d, e, p, dc, f) \ (taskq_create(a, b, maxclsyspri, d, e, f)) extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +extern void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, + taskq_ent_t *); extern void taskq_destroy(taskq_t *); extern void taskq_wait(taskq_t *); extern int taskq_member(taskq_t *, void *); Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Tue Nov 26 09:14:39 2013 (r258629) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c Tue Nov 26 09:26:18 2013 (r258630) @@ -22,19 +22,15 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #include int taskq_now; taskq_t *system_taskq; -typedef struct task { - struct task *task_next; - struct task *task_prev; - task_func_t *task_func; - void *task_arg; -} task_t; - #define TASKQ_ACTIVE 0x00010000 struct taskq { @@ -51,18 +47,18 @@ struct taskq { int tq_maxalloc; kcondvar_t tq_maxalloc_cv; int tq_maxalloc_wait; - task_t *tq_freelist; - task_t tq_task; + taskq_ent_t *tq_freelist; + taskq_ent_t tq_task; }; -static task_t * +static taskq_ent_t * task_alloc(taskq_t *tq, int tqflags) { - task_t *t; + taskq_ent_t *t; int rv; again: if ((t = tq->tq_freelist) != NULL && tq->tq_nalloc >= tq->tq_minalloc) { - tq->tq_freelist = t->task_next; + tq->tq_freelist = t->tqent_next; } else { if (tq->tq_nalloc >= tq->tq_maxalloc) { if (!(tqflags & KM_SLEEP)) @@ -87,7 +83,7 @@ again: if ((t = tq->tq_freelist) != NULL } mutex_exit(&tq->tq_lock); - t = kmem_alloc(sizeof (task_t), tqflags & KM_SLEEP); + t = kmem_alloc(sizeof (taskq_ent_t), tqflags & KM_SLEEP); mutex_enter(&tq->tq_lock); if (t != NULL) @@ -97,15 +93,15 @@ again: if ((t = tq->tq_freelist) != NULL } static void -task_free(taskq_t *tq, task_t *t) +task_free(taskq_t *tq, taskq_ent_t *t) { if (tq->tq_nalloc <= tq->tq_minalloc) { - t->task_next = tq->tq_freelist; + t->tqent_next = tq->tq_freelist; tq->tq_freelist = t; } else { tq->tq_nalloc--; mutex_exit(&tq->tq_lock); - kmem_free(t, sizeof (task_t)); + kmem_free(t, sizeof (taskq_ent_t)); mutex_enter(&tq->tq_lock); } @@ -116,7 +112,7 @@ task_free(taskq_t *tq, task_t *t) taskqid_t taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t tqflags) { - task_t *t; + taskq_ent_t *t; if (taskq_now) { func(arg); @@ -130,26 +126,58 @@ taskq_dispatch(taskq_t *tq, task_func_t return (0); } if (tqflags & TQ_FRONT) { - t->task_next = tq->tq_task.task_next; - t->task_prev = &tq->tq_task; + t->tqent_next = tq->tq_task.tqent_next; + t->tqent_prev = &tq->tq_task; } else { - t->task_next = &tq->tq_task; - t->task_prev = tq->tq_task.task_prev; + t->tqent_next = &tq->tq_task; + t->tqent_prev = tq->tq_task.tqent_prev; } - t->task_next->task_prev = t; - t->task_prev->task_next = t; - t->task_func = func; - t->task_arg = arg; + t->tqent_next->tqent_prev = t; + t->tqent_prev->tqent_next = t; + t->tqent_func = func; + t->tqent_arg = arg; cv_signal(&tq->tq_dispatch_cv); mutex_exit(&tq->tq_lock); return (1); } void +taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags, + taskq_ent_t *t) +{ + ASSERT(func != NULL); + ASSERT(!(tq->tq_flags & TASKQ_DYNAMIC)); + + /* + * Mark it as a prealloc'd task. This is important + * to ensure that we don't free it later. + */ + t->tqent_flags |= TQENT_FLAG_PREALLOC; + /* + * Enqueue the task to the underlying queue. + */ + mutex_enter(&tq->tq_lock); + + if (flags & TQ_FRONT) { + t->tqent_next = tq->tq_task.tqent_next; + t->tqent_prev = &tq->tq_task; + } else { + t->tqent_next = &tq->tq_task; + t->tqent_prev = tq->tq_task.tqent_prev; + } + t->tqent_next->tqent_prev = t; + t->tqent_prev->tqent_next = t; + t->tqent_func = func; + t->tqent_arg = arg; + cv_signal(&tq->tq_dispatch_cv); + mutex_exit(&tq->tq_lock); +} + +void taskq_wait(taskq_t *tq) { mutex_enter(&tq->tq_lock); - while (tq->tq_task.task_next != &tq->tq_task || tq->tq_active != 0) + while (tq->tq_task.tqent_next != &tq->tq_task || tq->tq_active != 0) cv_wait(&tq->tq_wait_cv, &tq->tq_lock); mutex_exit(&tq->tq_lock); } @@ -158,27 +186,32 @@ static void * taskq_thread(void *arg) { taskq_t *tq = arg; - task_t *t; + taskq_ent_t *t; + boolean_t prealloc; mutex_enter(&tq->tq_lock); while (tq->tq_flags & TASKQ_ACTIVE) { - if ((t = tq->tq_task.task_next) == &tq->tq_task) { + if ((t = tq->tq_task.tqent_next) == &tq->tq_task) { if (--tq->tq_active == 0) cv_broadcast(&tq->tq_wait_cv); cv_wait(&tq->tq_dispatch_cv, &tq->tq_lock); tq->tq_active++; continue; } - t->task_prev->task_next = t->task_next; - t->task_next->task_prev = t->task_prev; + t->tqent_prev->tqent_next = t->tqent_next; + t->tqent_next->tqent_prev = t->tqent_prev; + t->tqent_next = NULL; + t->tqent_prev = NULL; + prealloc = t->tqent_flags & TQENT_FLAG_PREALLOC; mutex_exit(&tq->tq_lock); rw_enter(&tq->tq_threadlock, RW_READER); - t->task_func(t->task_arg); + t->tqent_func(t->tqent_arg); rw_exit(&tq->tq_threadlock); mutex_enter(&tq->tq_lock); - task_free(tq, t); + if (!prealloc) + task_free(tq, t); } tq->tq_nthreads--; cv_broadcast(&tq->tq_wait_cv); @@ -217,8 +250,8 @@ taskq_create(const char *name, int nthre tq->tq_nthreads = nthreads; tq->tq_minalloc = minalloc; tq->tq_maxalloc = maxalloc; - tq->tq_task.task_next = &tq->tq_task; - tq->tq_task.task_prev = &tq->tq_task; + tq->tq_task.tqent_next = &tq->tq_task; + tq->tq_task.tqent_prev = &tq->tq_task; tq->tq_threadlist = kmem_alloc(nthreads * sizeof (thread_t), KM_SLEEP); if (flags & TASKQ_PREPOPULATE) { Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue Nov 26 09:14:39 2013 (r258629) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Tue Nov 26 09:26:18 2013 (r258630) @@ -46,7 +46,7 @@ static void system_taskq_init(void *arg) { - taskq_zone = uma_zcreate("taskq_zone", sizeof(struct ostask), + taskq_zone = uma_zcreate("taskq_zone", sizeof(taskq_ent_t), NULL, NULL, NULL, NULL, 0, 0); system_taskq = taskq_create("system_taskq", mp_ncpus, 0, 0, 0, 0); } @@ -104,9 +104,9 @@ taskq_member(taskq_t *tq, kthread_t *thr static void taskq_run(void *arg, int pending __unused) { - struct ostask *task = arg; + taskq_ent_t *task = arg; - task->ost_func(task->ost_arg); + task->tqent_func(task->tqent_arg); uma_zfree(taskq_zone, task); } @@ -114,7 +114,7 @@ taskq_run(void *arg, int pending __unuse taskqid_t taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) { - struct ostask *task; + taskq_ent_t *task; int mflag, prio; if ((flags & (TQ_SLEEP | TQ_NOQUEUE)) == TQ_SLEEP) @@ -131,26 +131,26 @@ taskq_dispatch(taskq_t *tq, task_func_t if (task == NULL) return (0); - task->ost_func = func; - task->ost_arg = arg; + task->tqent_func = func; + task->tqent_arg = arg; - TASK_INIT(&task->ost_task, prio, taskq_run, task); - taskqueue_enqueue(tq->tq_queue, &task->ost_task); + TASK_INIT(&task->tqent_task, prio, taskq_run, task); + taskqueue_enqueue(tq->tq_queue, &task->tqent_task); return ((taskqid_t)(void *)task); } static void -taskq_run_safe(void *arg, int pending __unused) +taskq_run_ent(void *arg, int pending __unused) { - struct ostask *task = arg; + taskq_ent_t *task = arg; - task->ost_func(task->ost_arg); + task->tqent_func(task->tqent_arg); } -taskqid_t -taskq_dispatch_safe(taskq_t *tq, task_func_t func, void *arg, u_int flags, - struct ostask *task) +void +taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, u_int flags, + taskq_ent_t *task) { int prio; @@ -160,11 +160,9 @@ taskq_dispatch_safe(taskq_t *tq, task_fu */ prio = !!(flags & TQ_FRONT); - task->ost_func = func; - task->ost_arg = arg; + task->tqent_func = func; + task->tqent_arg = arg; - TASK_INIT(&task->ost_task, prio, taskq_run_safe, task); - taskqueue_enqueue(tq->tq_queue, &task->ost_task); - - return ((taskqid_t)(void *)task); + TASK_INIT(&task->tqent_task, prio, taskq_run_ent, task); + taskqueue_enqueue(tq->tq_queue, &task->tqent_task); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Nov 26 09:14:39 2013 (r258629) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Nov 26 09:26:18 2013 (r258630) @@ -825,7 +825,7 @@ static taskq_t * spa_taskq_create(spa_t *spa, const char *name, enum zti_modes mode, uint_t value) { - uint_t flags = TASKQ_PREPOPULATE; + uint_t flags = 0; boolean_t batch = B_FALSE; switch (mode) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Nov 26 09:14:39 2013 (r258629) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Nov 26 09:26:18 2013 (r258630) @@ -24,6 +24,7 @@ * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #ifndef _ZIO_H @@ -474,10 +475,9 @@ struct zio { zio_cksum_report_t *io_cksum_report; uint64_t io_ena; -#ifdef _KERNEL - /* FreeBSD only. */ - struct ostask io_task; -#endif + /* Taskq dispatching state */ + taskq_ent_t io_tqent; + avl_node_t io_trim_node; list_node_t io_trim_link; }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 09:14:39 2013 (r258629) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 09:26:18 2013 (r258630) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ #include @@ -1224,7 +1225,7 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ { spa_t *spa = zio->io_spa; zio_type_t t = zio->io_type; - int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0); + int flags = (cutinline ? TQ_FRONT : 0); ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT); @@ -1250,13 +1251,19 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ q++; ASSERT3U(q, <, ZIO_TASKQ_TYPES); -#ifdef _KERNEL - (void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q], - (task_func_t *)zio_execute, zio, flags, &zio->io_task); + + /* + * NB: We are assuming that the zio can only be dispatched + * to a single taskq at a time. It would be a grievous error + * to dispatch the zio to another taskq at the same time. + */ +#if defined(illumos) || !defined(_KERNEL) + ASSERT(zio->io_tqent.tqent_next == NULL); #else - (void) taskq_dispatch(spa->spa_zio_taskq[t][q], - (task_func_t *)zio_execute, zio, flags); + ASSERT(zio->io_tqent.tqent_task.ta_pending == 0); #endif + taskq_dispatch_ent(spa->spa_zio_taskq[t][q], + (task_func_t *)zio_execute, zio, flags, &zio->io_tqent); } static boolean_t @@ -3174,16 +3181,15 @@ zio_done(zio_t *zio) * Reexecution is potentially a huge amount of work. * Hand it off to the otherwise-unused claim taskq. */ -#ifdef _KERNEL - (void) taskq_dispatch_safe( - spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], - (task_func_t *)zio_reexecute, zio, TQ_SLEEP, - &zio->io_task); +#if defined(illumos) || !defined(_KERNEL) + ASSERT(zio->io_tqent.tqent_next == NULL); #else - (void) taskq_dispatch( - spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], - (task_func_t *)zio_reexecute, zio, TQ_SLEEP); + ASSERT(zio->io_tqent.tqent_task.ta_pending == 0); #endif + (void) taskq_dispatch_ent( + spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], + (task_func_t *)zio_reexecute, zio, 0, + &zio->io_tqent); } return (ZIO_PIPELINE_STOP); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Tue Nov 26 09:14:39 2013 (r258629) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h Tue Nov 26 09:26:18 2013 (r258630) @@ -45,6 +45,12 @@ typedef struct taskq taskq_t; typedef uintptr_t taskqid_t; typedef void (task_func_t)(void *); +typedef struct taskq_ent { + struct task tqent_task; + task_func_t *tqent_func; + void *tqent_arg; +} taskq_ent_t; + struct proc; /* @@ -80,6 +86,8 @@ taskq_t *taskq_create_proc(const char *, taskq_t *taskq_create_sysdc(const char *, int, int, int, struct proc *, uint_t, uint_t); taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); +void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, + taskq_ent_t *); void nulltask(void *); void taskq_destroy(taskq_t *); void taskq_wait(taskq_t *); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:45:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CF1470E; Tue, 26 Nov 2013 09:45:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D4C32F7F; Tue, 26 Nov 2013 09:45:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ9jn6A000671; Tue, 26 Nov 2013 09:45:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ9jmw7000668; Tue, 26 Nov 2013 09:45:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260945.rAQ9jmw7000668@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 09:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258631 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:45:49 -0000 Author: avg Date: Tue Nov 26 09:45:48 2013 New Revision: 258631 URL: http://svnweb.freebsd.org/changeset/base/258631 Log: MFV r247578: 3581 spa_zio_taskq[ZIO_TYPE_FREE][ZIO_TASKQ_ISSUE]->tq_lock is piping hot illumos/illumos-gate@ec94d32216ed5705f5176582355cc311cf848e73 MFC after: 9 days Sponsored by: HybridCluster [merge] Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Nov 26 09:26:18 2013 (r258630) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Nov 26 09:45:48 2013 (r258631) @@ -95,23 +95,25 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, check_hos static int zfs_ccw_retry_interval = 300; typedef enum zti_modes { - zti_mode_fixed, /* value is # of threads (min 1) */ - zti_mode_online_percent, /* value is % of online CPUs */ - zti_mode_batch, /* cpu-intensive; value is ignored */ - zti_mode_null, /* don't create a taskq */ - zti_nmodes + ZTI_MODE_FIXED, /* value is # of threads (min 1) */ + ZTI_MODE_ONLINE_PERCENT, /* value is % of online CPUs */ + ZTI_MODE_BATCH, /* cpu-intensive; value is ignored */ + ZTI_MODE_NULL, /* don't create a taskq */ + ZTI_NMODES } zti_modes_t; -#define ZTI_FIX(n) { zti_mode_fixed, (n) } -#define ZTI_PCT(n) { zti_mode_online_percent, (n) } -#define ZTI_BATCH { zti_mode_batch, 0 } -#define ZTI_NULL { zti_mode_null, 0 } +#define ZTI_P(n, q) { ZTI_MODE_FIXED, (n), (q) } +#define ZTI_PCT(n) { ZTI_MODE_ONLINE_PERCENT, (n), 1 } +#define ZTI_BATCH { ZTI_MODE_BATCH, 0, 1 } +#define ZTI_NULL { ZTI_MODE_NULL, 0, 0 } -#define ZTI_ONE ZTI_FIX(1) +#define ZTI_N(n) ZTI_P(n, 1) +#define ZTI_ONE ZTI_N(1) typedef struct zio_taskq_info { - enum zti_modes zti_mode; + zti_modes_t zti_mode; uint_t zti_value; + uint_t zti_count; } zio_taskq_info_t; static const char *const zio_taskq_types[ZIO_TASKQ_TYPES] = { @@ -119,17 +121,30 @@ static const char *const zio_taskq_types }; /* - * Define the taskq threads for the following I/O types: - * NULL, READ, WRITE, FREE, CLAIM, and IOCTL + * This table defines the taskq settings for each ZFS I/O type. When + * initializing a pool, we use this table to create an appropriately sized + * taskq. Some operations are low volume and therefore have a small, static + * number of threads assigned to their taskqs using the ZTI_N(#) or ZTI_ONE + * macros. Other operations process a large amount of data; the ZTI_BATCH + * macro causes us to create a taskq oriented for throughput. Some operations + * are so high frequency and short-lived that the taskq itself can become a a + * point of lock contention. The ZTI_P(#, #) macro indicates that we need an + * additional degree of parallelism specified by the number of threads per- + * taskq and the number of taskqs; when dispatching an event in this case, the + * particular taskq is chosen at random. + * + * The different taskq priorities are to handle the different contexts (issue + * and interrupt) and then to reserve threads for ZIO_PRIORITY_NOW I/Os that + * need to be handled with minimum delay. */ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ_TYPES] = { /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ - { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, - { ZTI_FIX(8), ZTI_NULL, ZTI_BATCH, ZTI_NULL }, - { ZTI_BATCH, ZTI_FIX(5), ZTI_FIX(8), ZTI_FIX(5) }, - { ZTI_FIX(100), ZTI_NULL, ZTI_ONE, ZTI_NULL }, - { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, - { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* NULL */ + { ZTI_N(8), ZTI_NULL, ZTI_BATCH, ZTI_NULL }, /* READ */ + { ZTI_BATCH, ZTI_N(5), ZTI_N(8), ZTI_N(5) }, /* WRITE */ + { ZTI_P(12, 8), ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FREE */ + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* CLAIM */ + { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* IOCTL */ }; static void spa_sync_version(void *arg, dmu_tx_t *tx); @@ -821,50 +836,124 @@ spa_get_errlists(spa_t *spa, avl_tree_t offsetof(spa_error_entry_t, se_avl)); } -static taskq_t * -spa_taskq_create(spa_t *spa, const char *name, enum zti_modes mode, - uint_t value) +static void +spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q) { + const zio_taskq_info_t *ztip = &zio_taskqs[t][q]; + enum zti_modes mode = ztip->zti_mode; + uint_t value = ztip->zti_value; + uint_t count = ztip->zti_count; + spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; + char name[32]; uint_t flags = 0; boolean_t batch = B_FALSE; - switch (mode) { - case zti_mode_null: - return (NULL); /* no taskq needed */ - - case zti_mode_fixed: - ASSERT3U(value, >=, 1); - value = MAX(value, 1); - break; + if (mode == ZTI_MODE_NULL) { + tqs->stqs_count = 0; + tqs->stqs_taskq = NULL; + return; + } - case zti_mode_batch: - batch = B_TRUE; - flags |= TASKQ_THREADS_CPU_PCT; - value = zio_taskq_batch_pct; - break; + ASSERT3U(count, >, 0); - case zti_mode_online_percent: - flags |= TASKQ_THREADS_CPU_PCT; - break; + tqs->stqs_count = count; + tqs->stqs_taskq = kmem_alloc(count * sizeof (taskq_t *), KM_SLEEP); - default: - panic("unrecognized mode for %s taskq (%u:%u) in " - "spa_activate()", - name, mode, value); - break; - } + for (uint_t i = 0; i < count; i++) { + taskq_t *tq; + + switch (mode) { + case ZTI_MODE_FIXED: + ASSERT3U(value, >=, 1); + value = MAX(value, 1); + break; + + case ZTI_MODE_BATCH: + batch = B_TRUE; + flags |= TASKQ_THREADS_CPU_PCT; + value = zio_taskq_batch_pct; + break; + + case ZTI_MODE_ONLINE_PERCENT: + flags |= TASKQ_THREADS_CPU_PCT; + break; + + default: + panic("unrecognized mode for %s_%s taskq (%u:%u) in " + "spa_activate()", + zio_type_name[t], zio_taskq_types[q], mode, value); + break; + } + + if (count > 1) { + (void) snprintf(name, sizeof (name), "%s_%s_%u", + zio_type_name[t], zio_taskq_types[q], i); + } else { + (void) snprintf(name, sizeof (name), "%s_%s", + zio_type_name[t], zio_taskq_types[q]); + } #ifdef SYSDC - if (zio_taskq_sysdc && spa->spa_proc != &p0) { - if (batch) - flags |= TASKQ_DC_BATCH; + if (zio_taskq_sysdc && spa->spa_proc != &p0) { + if (batch) + flags |= TASKQ_DC_BATCH; - return (taskq_create_sysdc(name, value, 50, INT_MAX, - spa->spa_proc, zio_taskq_basedc, flags)); - } + tq = taskq_create_sysdc(name, value, 50, INT_MAX, + spa->spa_proc, zio_taskq_basedc, flags); + } else { +#endif + tq = taskq_create_proc(name, value, maxclsyspri, 50, + INT_MAX, spa->spa_proc, flags); +#ifdef SYSDC + } #endif - return (taskq_create_proc(name, value, maxclsyspri, 50, INT_MAX, - spa->spa_proc, flags)); + + tqs->stqs_taskq[i] = tq; + } +} + +static void +spa_taskqs_fini(spa_t *spa, zio_type_t t, zio_taskq_type_t q) +{ + spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; + + if (tqs->stqs_taskq == NULL) { + ASSERT0(tqs->stqs_count); + return; + } + + for (uint_t i = 0; i < tqs->stqs_count; i++) { + ASSERT3P(tqs->stqs_taskq[i], !=, NULL); + taskq_destroy(tqs->stqs_taskq[i]); + } + + kmem_free(tqs->stqs_taskq, tqs->stqs_count * sizeof (taskq_t *)); + tqs->stqs_taskq = NULL; +} + +/* + * Dispatch a task to the appropriate taskq for the ZFS I/O type and priority. + * Note that a type may have multiple discrete taskqs to avoid lock contention + * on the taskq itself. In that case we choose which taskq at random by using + * the low bits of gethrtime(). + */ +void +spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q, + task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent) +{ + spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; + taskq_t *tq; + + ASSERT3P(tqs->stqs_taskq, !=, NULL); + ASSERT3U(tqs->stqs_count, !=, 0); + + if (tqs->stqs_count == 1) { + tq = tqs->stqs_taskq[0]; + } else { + tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count]; + } + + taskq_dispatch_ent(tq, func, arg, flags, ent); } static void @@ -872,16 +961,7 @@ spa_create_zio_taskqs(spa_t *spa) { for (int t = 0; t < ZIO_TYPES; t++) { for (int q = 0; q < ZIO_TASKQ_TYPES; q++) { - const zio_taskq_info_t *ztip = &zio_taskqs[t][q]; - enum zti_modes mode = ztip->zti_mode; - uint_t value = ztip->zti_value; - char name[32]; - - (void) snprintf(name, sizeof (name), - "%s_%s", zio_type_name[t], zio_taskq_types[q]); - - spa->spa_zio_taskq[t][q] = - spa_taskq_create(spa, name, mode, value); + spa_taskqs_init(spa, t, q); } } } @@ -1058,9 +1138,7 @@ spa_deactivate(spa_t *spa) for (int t = 0; t < ZIO_TYPES; t++) { for (int q = 0; q < ZIO_TASKQ_TYPES; q++) { - if (spa->spa_zio_taskq[t][q] != NULL) - taskq_destroy(spa->spa_zio_taskq[t][q]); - spa->spa_zio_taskq[t][q] = NULL; + spa_taskqs_fini(spa, t, q); } } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Tue Nov 26 09:26:18 2013 (r258630) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Tue Nov 26 09:45:48 2013 (r258631) @@ -81,16 +81,16 @@ typedef struct spa_config_dirent { char *scd_path; } spa_config_dirent_t; -enum zio_taskq_type { +typedef enum zio_taskq_type { ZIO_TASKQ_ISSUE = 0, ZIO_TASKQ_ISSUE_HIGH, ZIO_TASKQ_INTERRUPT, ZIO_TASKQ_INTERRUPT_HIGH, ZIO_TASKQ_TYPES -}; +} zio_taskq_type_t; /* - * State machine for the zpool-pooname process. The states transitions + * State machine for the zpool-poolname process. The states transitions * are done as follows: * * From To Routine @@ -108,6 +108,11 @@ typedef enum spa_proc_state { SPA_PROC_GONE /* spa_thread() is exiting, spa_proc = &p0 */ } spa_proc_state_t; +typedef struct spa_taskqs { + uint_t stqs_count; + taskq_t **stqs_taskq; +} spa_taskqs_t; + struct spa { /* * Fields protected by spa_namespace_lock. @@ -126,7 +131,7 @@ struct spa { uint8_t spa_sync_on; /* sync threads are running */ spa_load_state_t spa_load_state; /* current load operation */ uint64_t spa_import_flags; /* import specific flags */ - taskq_t *spa_zio_taskq[ZIO_TYPES][ZIO_TASKQ_TYPES]; + spa_taskqs_t spa_zio_taskq[ZIO_TYPES][ZIO_TASKQ_TYPES]; dsl_pool_t *spa_dsl_pool; boolean_t spa_is_initializing; /* true while opening pool */ metaslab_class_t *spa_normal_class; /* normal data class */ @@ -258,6 +263,9 @@ struct spa { extern const char *spa_config_path; +extern void spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q, + task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent); + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 09:26:18 2013 (r258630) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 09:45:48 2013 (r258631) @@ -1221,7 +1221,7 @@ zio_free_bp_init(zio_t *zio) */ static void -zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q, boolean_t cutinline) +zio_taskq_dispatch(zio_t *zio, zio_taskq_type_t q, boolean_t cutinline) { spa_t *spa = zio->io_spa; zio_type_t t = zio->io_type; @@ -1244,10 +1244,11 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ t = ZIO_TYPE_NULL; /* - * If this is a high priority I/O, then use the high priority taskq. + * If this is a high priority I/O, then use the high priority taskq if + * available. */ if (zio->io_priority == ZIO_PRIORITY_NOW && - spa->spa_zio_taskq[t][q + 1] != NULL) + spa->spa_zio_taskq[t][q + 1].stqs_count != 0) q++; ASSERT3U(q, <, ZIO_TASKQ_TYPES); @@ -1262,19 +1263,24 @@ zio_taskq_dispatch(zio_t *zio, enum zio_ #else ASSERT(zio->io_tqent.tqent_task.ta_pending == 0); #endif - taskq_dispatch_ent(spa->spa_zio_taskq[t][q], - (task_func_t *)zio_execute, zio, flags, &zio->io_tqent); + spa_taskq_dispatch_ent(spa, t, q, (task_func_t *)zio_execute, zio, + flags, &zio->io_tqent); } static boolean_t -zio_taskq_member(zio_t *zio, enum zio_taskq_type q) +zio_taskq_member(zio_t *zio, zio_taskq_type_t q) { kthread_t *executor = zio->io_executor; spa_t *spa = zio->io_spa; - for (zio_type_t t = 0; t < ZIO_TYPES; t++) - if (taskq_member(spa->spa_zio_taskq[t][q], executor)) - return (B_TRUE); + for (zio_type_t t = 0; t < ZIO_TYPES; t++) { + spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; + uint_t i; + for (i = 0; i < tqs->stqs_count; i++) { + if (taskq_member(tqs->stqs_taskq[i], executor)) + return (B_TRUE); + } + } return (B_FALSE); } @@ -3186,10 +3192,9 @@ zio_done(zio_t *zio) #else ASSERT(zio->io_tqent.tqent_task.ta_pending == 0); #endif - (void) taskq_dispatch_ent( - spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], - (task_func_t *)zio_reexecute, zio, 0, - &zio->io_tqent); + spa_taskq_dispatch_ent(spa, ZIO_TYPE_CLAIM, + ZIO_TASKQ_ISSUE, (task_func_t *)zio_reexecute, zio, + 0, &zio->io_tqent); } return (ZIO_PIPELINE_STOP); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:49:42 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C24899; Tue, 26 Nov 2013 09:49:42 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 54CF42FAC; Tue, 26 Nov 2013 09:49:40 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA09554; Tue, 26 Nov 2013 11:49:39 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlFH1-0000ou-2l; Tue, 26 Nov 2013 11:49:39 +0200 Message-ID: <52946E7A.9040107@FreeBSD.org> Date: Tue, 26 Nov 2013 11:48:42 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258622 - in head: share/man/man9 sys/cam/ctl sys/cddl/dev/dtrace sys/cddl/dev/sdt sys/compat/linux sys/dev/xen/blkback sys/kern sys/net sys/netinet sys/opencrypto sys/security/mac sys/... References: <201311260846.rAQ8kR7L080135@svn.freebsd.org> In-Reply-To: <201311260846.rAQ8kR7L080135@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:49:42 -0000 on 26/11/2013 10:46 Andriy Gapon said the following: > Author: avg > Date: Tue Nov 26 08:46:27 2013 > New Revision: 258622 > URL: http://svnweb.freebsd.org/changeset/base/258622 > > Log: > dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE > > In its stead use the Solaris / illumos approach of emulating '-' (dash) > in probe names with '__' (two consecutive underscores). > > Reviewed by: markj > MFC after: 3 weeks Sponsored by: HybridCluster -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:50:14 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 349AB902; Tue, 26 Nov 2013 09:50:14 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 55C912FB4; Tue, 26 Nov 2013 09:50:13 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA09576; Tue, 26 Nov 2013 11:50:12 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlFHX-0000ox-Lc; Tue, 26 Nov 2013 11:50:11 +0200 Message-ID: <52946E9C.9040909@FreeBSD.org> Date: Tue, 26 Nov 2013 11:49:16 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258625 - in head/sys: cddl/compat/opensolaris/sys kern sys References: <201311260849.rAQ8nswK080676@svn.freebsd.org> In-Reply-To: <201311260849.rAQ8nswK080676@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:50:14 -0000 on 26/11/2013 10:49 Andriy Gapon said the following: > Author: avg > Date: Tue Nov 26 08:49:53 2013 > New Revision: 258625 > URL: http://svnweb.freebsd.org/changeset/base/258625 > > Log: > sdt: add support for solaris/illumos style DTRACE_PROBE macros > > The new macros are implemented in terms of SDT_PROBE_DEFINE and SDT_PROBE. > Probes defined in this way will appear under SDT provider named "sdt". > Parameter types are exposed via SDT_PROBE_ARGTYPE. > This is something that illumos does not have by default. > > This kind of SDT probes is already present in ZFS code, so those probes > will now be available if KDTRACE_HOOKS options is enabled. > > A potential future illumos compatibility enhancement is to encode a provider > name as a prefix in a probe name. > > Reviewed by: markj > MFC after: 3 weeks > X-MFC after: r258622 Sponsored by: HybridCluster -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:50:58 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F04A967; Tue, 26 Nov 2013 09:50:58 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BC37B2FDE; Tue, 26 Nov 2013 09:50:57 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA09594; Tue, 26 Nov 2013 11:50:56 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlFIG-0000pB-1N; Tue, 26 Nov 2013 11:50:56 +0200 Message-ID: <52946ECC.5040402@FreeBSD.org> Date: Tue, 26 Nov 2013 11:50:04 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258630 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cdd... References: <201311260926.rAQ9QIPs094046@svn.freebsd.org> In-Reply-To: <201311260926.rAQ9QIPs094046@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:50:58 -0000 on 26/11/2013 11:26 Andriy Gapon said the following: > Author: avg > Date: Tue Nov 26 09:26:18 2013 > New Revision: 258630 > URL: http://svnweb.freebsd.org/changeset/base/258630 > > Log: > 734 taskq_dispatch_prealloc() desired > > 943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP > illumos/illumos-gate@5aeb94743e3be0c51e86f73096334611ae3a058e > > Essentially FreeBSD taskqueues already operate in a mode that > was added to Illumos with taskq_dispatch_ent change. > We even exposed the superior FreeBSD interface as taskq_dispatch_safe. > Now we just rename taskq_dispatch_safe to taskq_dispatch_ent and > struct struct ostask to taskq_ent_t, so that code differences will be > minimal. > > After this change sys/cddl/compat/opensolaris/sys/taskq.h header is no > longer needed. > > Note that this commit is not an MFV because the upstream change was not > individually committed to the vendor area. > > MFC after: 8 days Sponsored by: HybridCluster [merge] -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 09:57:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEDA1BA4; Tue, 26 Nov 2013 09:57:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB2F42052; Tue, 26 Nov 2013 09:57:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ9vGEB004177; Tue, 26 Nov 2013 09:57:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ9vF6d004168; Tue, 26 Nov 2013 09:57:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311260957.rAQ9vF6d004168@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 09:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 09:57:16 -0000 Author: avg Date: Tue Nov 26 09:57:14 2013 New Revision: 258632 URL: http://svnweb.freebsd.org/changeset/base/258632 Log: MFV r255255: 4045 zfs write throttle & i/o scheduler performance work illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e Please note the following changes: - zio_ioctl has lost its priority parameter and now TRIM is executed with 'now' priority - some knobs are gone and some new knobs are added; not all of them are exposed as tunables / sysctls yet MFC after: 10 days Sponsored by: HybridCluster [merge] Added: head/sys/cddl/compat/opensolaris/sys/disp.h (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/sa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Tue Nov 26 09:57:14 2013 (r258632) @@ -186,7 +186,7 @@ static const ztest_shared_opts_t ztest_o extern uint64_t metaslab_gang_bang; extern uint64_t metaslab_df_alloc_threshold; -extern uint64_t zfs_deadman_synctime; +extern uint64_t zfs_deadman_synctime_ms; static ztest_shared_opts_t *ztest_shared_opts; static ztest_shared_opts_t ztest_opts; @@ -5328,10 +5328,10 @@ ztest_deadman_thread(void *arg) hrtime_t delta, total = 0; for (;;) { - delta = (zs->zs_thread_stop - zs->zs_thread_start) / - NANOSEC + zfs_deadman_synctime; + delta = zs->zs_thread_stop - zs->zs_thread_start + + MSEC2NSEC(zfs_deadman_synctime_ms); - (void) poll(NULL, 0, (int)(1000 * delta)); + (void) poll(NULL, 0, (int)NSEC2MSEC(delta)); /* * If the pool is suspended then fail immediately. Otherwise, @@ -5342,12 +5342,12 @@ ztest_deadman_thread(void *arg) if (spa_suspended(spa)) { fatal(0, "aborting test after %llu seconds because " "pool has transitioned to a suspended state.", - zfs_deadman_synctime); + zfs_deadman_synctime_ms / 1000); return (NULL); } vdev_deadman(spa->spa_root_vdev); - total += zfs_deadman_synctime; + total += zfs_deadman_synctime_ms/1000; (void) printf("ztest has been running for %lld seconds\n", total); } @@ -6080,7 +6080,7 @@ main(int argc, char **argv) (void) setvbuf(stdout, NULL, _IOLBF, 0); dprintf_setup(&argc, argv); - zfs_deadman_synctime = 300; + zfs_deadman_synctime_ms = 300000; ztest_fd_rand = open("/dev/urandom", O_RDONLY); ASSERT3S(ztest_fd_rand, >=, 0); Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Nov 26 09:45:48 2013 (r258631) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Tue Nov 26 09:57:14 2013 (r258632) @@ -65,6 +65,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -204,6 +205,8 @@ extern int aok; */ #define curthread ((void *)(uintptr_t)thr_self()) +#define kpreempt(x) sched_yield() + typedef struct kthread kthread_t; #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ Added: head/sys/cddl/compat/opensolaris/sys/disp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/compat/opensolaris/sys/disp.h Tue Nov 26 09:57:14 2013 (r258632) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2013 Andriy Gapon + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _OPENSOLARIS_SYS_DISP_H_ +#define _OPENSOLARIS_SYS_DISP_H_ + +#ifdef _KERNEL + +#include + +#define kpreempt(x) kern_yield(PRI_USER) + +#endif /* _KERNEL */ + +#endif /* _OPENSOLARIS_SYS_DISP_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 09:57:14 2013 (r258632) @@ -127,6 +127,7 @@ #include #include #include +#include #ifdef _KERNEL #include #endif @@ -150,10 +151,6 @@ static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; -extern int zfs_write_limit_shift; -extern uint64_t zfs_write_limit_max; -extern kmutex_t zfs_write_limit_lock; - #define ARC_REDUCE_DNLC_PERCENT 3 uint_t arc_reduce_dnlc_percent = ARC_REDUCE_DNLC_PERCENT; @@ -162,6 +159,12 @@ typedef enum arc_reclaim_strategy { ARC_RECLAIM_CONS /* Conservative reclaim strategy */ } arc_reclaim_strategy_t; +/* + * The number of iterations through arc_evict_*() before we + * drop & reacquire the lock. + */ +int arc_evict_iterations = 100; + /* number of seconds before growing cache again */ static int arc_grow_retry = 60; @@ -177,6 +180,11 @@ static int arc_shrink_shift = 5; */ static int arc_min_prefetch_lifespan; +/* + * If this percent of memory is free, don't throttle. + */ +int arc_lotsfree_percent = 10; + static int arc_dead; extern int zfs_prefetch_disable; @@ -526,6 +534,7 @@ typedef struct arc_write_callback arc_wr struct arc_write_callback { void *awcb_private; arc_done_func_t *awcb_ready; + arc_done_func_t *awcb_physdone; arc_done_func_t *awcb_done; arc_buf_t *awcb_buf; }; @@ -1312,7 +1321,7 @@ arc_change_state(arc_state_t *new_state, kmutex_t *lock; ASSERT(MUTEX_HELD(hash_lock)); - ASSERT(new_state != old_state); + ASSERT3P(new_state, !=, old_state); ASSERT(refcnt == 0 || ab->b_datacnt > 0); ASSERT(ab->b_datacnt == 0 || !GHOST_STATE(new_state)); ASSERT(ab->b_datacnt <= 1 || old_state != arc_anon); @@ -1937,8 +1946,10 @@ arc_evict(arc_state_t *state, uint64_t s kmutex_t *hash_lock; boolean_t have_lock; void *stolen = NULL; + arc_buf_hdr_t marker = { 0 }; + int count = 0; static int evict_metadata_offset, evict_data_offset; - int i, idx, offset, list_count, count; + int i, idx, offset, list_count, lists; ASSERT(state == arc_mru || state == arc_mfu); @@ -1958,7 +1969,7 @@ arc_evict(arc_state_t *state, uint64_t s idx = evict_data_offset; } bytes_remaining = evicted_state->arcs_lsize[type]; - count = 0; + lists = 0; evict_start: list = &list_start[idx]; @@ -1985,6 +1996,33 @@ evict_start: if (recycle && ab->b_size != bytes && ab_prev && ab_prev->b_size == bytes) continue; + + /* ignore markers */ + if (ab->b_spa == 0) + continue; + + /* + * It may take a long time to evict all the bufs requested. + * To avoid blocking all arc activity, periodically drop + * the arcs_mtx and give other threads a chance to run + * before reacquiring the lock. + * + * If we are looking for a buffer to recycle, we are in + * the hot code path, so don't sleep. + */ + if (!recycle && count++ > arc_evict_iterations) { + list_insert_after(list, ab, &marker); + mutex_exit(evicted_lock); + mutex_exit(lock); + kpreempt(KPREEMPT_SYNC); + mutex_enter(lock); + mutex_enter(evicted_lock); + ab_prev = list_prev(list, &marker); + list_remove(list, &marker); + count = 0; + continue; + } + hash_lock = HDR_LOCK(ab); have_lock = MUTEX_HELD(hash_lock); if (have_lock || mutex_tryenter(hash_lock)) { @@ -2051,7 +2089,7 @@ evict_start: mutex_exit(evicted_lock); mutex_exit(lock); idx = ((idx + 1) & (list_count - 1)); - count++; + lists++; goto evict_start; } } else { @@ -2063,10 +2101,10 @@ evict_start: mutex_exit(lock); idx = ((idx + 1) & (list_count - 1)); - count++; + lists++; if (bytes_evicted < bytes) { - if (count < list_count) + if (lists < list_count) goto evict_start; else dprintf("only evicted %lld bytes from %x", @@ -2084,28 +2122,14 @@ evict_start: ARCSTAT_INCR(arcstat_mutex_miss, missed); /* - * We have just evicted some data into the ghost state, make - * sure we also adjust the ghost state size if necessary. + * Note: we have just evicted some data into the ghost state, + * potentially putting the ghost size over the desired size. Rather + * that evicting from the ghost list in this hot code path, leave + * this chore to the arc_reclaim_thread(). */ - if (arc_no_grow && - arc_mru_ghost->arcs_size + arc_mfu_ghost->arcs_size > arc_c) { - int64_t mru_over = arc_anon->arcs_size + arc_mru->arcs_size + - arc_mru_ghost->arcs_size - arc_c; - - if (mru_over > 0 && arc_mru_ghost->arcs_lsize[type] > 0) { - int64_t todelete = - MIN(arc_mru_ghost->arcs_lsize[type], mru_over); - arc_evict_ghost(arc_mru_ghost, 0, todelete); - } else if (arc_mfu_ghost->arcs_lsize[type] > 0) { - int64_t todelete = MIN(arc_mfu_ghost->arcs_lsize[type], - arc_mru_ghost->arcs_size + - arc_mfu_ghost->arcs_size - arc_c); - arc_evict_ghost(arc_mfu_ghost, 0, todelete); - } - } + if (stolen) ARCSTAT_BUMP(arcstat_stolen); - return (stolen); } @@ -2122,9 +2146,10 @@ arc_evict_ghost(arc_state_t *state, uint kmutex_t *hash_lock, *lock; uint64_t bytes_deleted = 0; uint64_t bufs_skipped = 0; + int count = 0; static int evict_offset; int list_count, idx = evict_offset; - int offset, count = 0; + int offset, lists = 0; ASSERT(GHOST_STATE(state)); @@ -2142,6 +2167,8 @@ evict_start: mutex_enter(lock); for (ab = list_tail(list); ab; ab = ab_prev) { ab_prev = list_prev(list, ab); + if (ab->b_type > ARC_BUFC_NUMTYPES) + panic("invalid ab=%p", (void *)ab); if (spa && ab->b_spa != spa) continue; @@ -2153,6 +2180,23 @@ evict_start: /* caller may be trying to modify this buffer, skip it */ if (MUTEX_HELD(hash_lock)) continue; + + /* + * It may take a long time to evict all the bufs requested. + * To avoid blocking all arc activity, periodically drop + * the arcs_mtx and give other threads a chance to run + * before reacquiring the lock. + */ + if (count++ > arc_evict_iterations) { + list_insert_after(list, ab, &marker); + mutex_exit(lock); + kpreempt(KPREEMPT_SYNC); + mutex_enter(lock); + ab_prev = list_prev(list, &marker); + list_remove(list, &marker); + count = 0; + continue; + } if (mutex_tryenter(hash_lock)) { ASSERT(!HDR_IO_IN_PROGRESS(ab)); ASSERT(ab->b_buf == NULL); @@ -2188,14 +2232,16 @@ evict_start: mutex_enter(lock); ab_prev = list_prev(list, &marker); list_remove(list, &marker); - } else + } else { bufs_skipped += 1; + } + } mutex_exit(lock); idx = ((idx + 1) & (ARC_BUFC_NUMDATALISTS - 1)); - count++; + lists++; - if (count < list_count) + if (lists < list_count) goto evict_start; evict_offset = idx; @@ -2203,7 +2249,7 @@ evict_start: (bytes < 0 || bytes_deleted < bytes)) { list_start = &state->arcs_lists[0]; list_count = ARC_BUFC_NUMMETADATALISTS; - offset = count = 0; + offset = lists = 0; goto evict_start; } @@ -3083,7 +3129,7 @@ arc_read_done(zio_t *zio) */ int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, - void *private, int priority, int zio_flags, uint32_t *arc_flags, + void *private, zio_priority_t priority, int zio_flags, uint32_t *arc_flags, const zbookmark_t *zb) { arc_buf_hdr_t *hdr; @@ -3699,6 +3745,18 @@ arc_write_ready(zio_t *zio) hdr->b_flags |= ARC_IO_IN_PROGRESS; } +/* + * The SPA calls this callback for each physical write that happens on behalf + * of a logical write. See the comment in dbuf_write_physdone() for details. + */ +static void +arc_write_physdone(zio_t *zio) +{ + arc_write_callback_t *cb = zio->io_private; + if (cb->awcb_physdone != NULL) + cb->awcb_physdone(zio, cb->awcb_buf, cb->awcb_private); +} + static void arc_write_done(zio_t *zio) { @@ -3779,8 +3837,9 @@ arc_write_done(zio_t *zio) zio_t * arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, boolean_t l2arc, boolean_t l2arc_compress, - const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *done, - void *private, int priority, int zio_flags, const zbookmark_t *zb) + const zio_prop_t *zp, arc_done_func_t *ready, arc_done_func_t *physdone, + arc_done_func_t *done, void *private, zio_priority_t priority, + int zio_flags, const zbookmark_t *zb) { arc_buf_hdr_t *hdr = buf->b_hdr; arc_write_callback_t *callback; @@ -3797,18 +3856,20 @@ arc_write(zio_t *pio, spa_t *spa, uint64 hdr->b_flags |= ARC_L2COMPRESS; callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_SLEEP); callback->awcb_ready = ready; + callback->awcb_physdone = physdone; callback->awcb_done = done; callback->awcb_private = private; callback->awcb_buf = buf; zio = zio_write(pio, spa, txg, bp, buf->b_data, hdr->b_size, zp, - arc_write_ready, arc_write_done, callback, priority, zio_flags, zb); + arc_write_ready, arc_write_physdone, arc_write_done, callback, + priority, zio_flags, zb); return (zio); } static int -arc_memory_throttle(uint64_t reserve, uint64_t inflight_data, uint64_t txg) +arc_memory_throttle(uint64_t reserve, uint64_t txg) { #ifdef _KERNEL uint64_t available_memory = @@ -3822,7 +3883,9 @@ arc_memory_throttle(uint64_t reserve, ui MIN(available_memory, vmem_size(heap_arena, VMEM_FREE)); #endif #endif /* sun */ - if (available_memory >= zfs_write_limit_max) + + if (cnt.v_free_count + cnt.v_cache_count > + (uint64_t)physmem * arc_lotsfree_percent / 100) return (0); if (txg > last_txg) { @@ -3846,20 +3909,6 @@ arc_memory_throttle(uint64_t reserve, ui return (SET_ERROR(EAGAIN)); } page_load = 0; - - if (arc_size > arc_c_min) { - uint64_t evictable_memory = - arc_mru->arcs_lsize[ARC_BUFC_DATA] + - arc_mru->arcs_lsize[ARC_BUFC_METADATA] + - arc_mfu->arcs_lsize[ARC_BUFC_DATA] + - arc_mfu->arcs_lsize[ARC_BUFC_METADATA]; - available_memory += MIN(evictable_memory, arc_size - arc_c_min); - } - - if (inflight_data > available_memory / 4) { - ARCSTAT_INCR(arcstat_memory_throttle_count, 1); - return (SET_ERROR(ERESTART)); - } #endif return (0); } @@ -3877,15 +3926,6 @@ arc_tempreserve_space(uint64_t reserve, int error; uint64_t anon_size; -#ifdef ZFS_DEBUG - /* - * Once in a while, fail for no reason. Everything should cope. - */ - if (spa_get_random(10000) == 0) { - dprintf("forcing random failure\n"); - return (SET_ERROR(ERESTART)); - } -#endif if (reserve > arc_c/4 && !arc_no_grow) arc_c = MIN(arc_c_max, reserve * 4); if (reserve > arc_c) @@ -3903,7 +3943,8 @@ arc_tempreserve_space(uint64_t reserve, * in order to compress/encrypt/etc the data. We therefore need to * make sure that there is sufficient available memory for this. */ - if (error = arc_memory_throttle(reserve, anon_size, txg)) + error = arc_memory_throttle(reserve, txg); + if (error != 0) return (error); /* @@ -4094,11 +4135,20 @@ arc_init(void) arc_dead = FALSE; arc_warm = B_FALSE; - if (zfs_write_limit_max == 0) - zfs_write_limit_max = ptob(physmem) >> zfs_write_limit_shift; - else - zfs_write_limit_shift = 0; - mutex_init(&zfs_write_limit_lock, NULL, MUTEX_DEFAULT, NULL); + /* + * Calculate maximum amount of dirty data per pool. + * + * If it has been set by /etc/system, take that. + * Otherwise, use a percentage of physical memory defined by + * zfs_dirty_data_max_percent (default 10%) with a cap at + * zfs_dirty_data_max_max (default 4GB). + */ + if (zfs_dirty_data_max == 0) { + zfs_dirty_data_max = ptob(physmem) * + zfs_dirty_data_max_percent / 100; + zfs_dirty_data_max = MIN(zfs_dirty_data_max, + zfs_dirty_data_max_max); + } #ifdef _KERNEL if (TUNABLE_INT_FETCH("vfs.zfs.prefetch_disable", &zfs_prefetch_disable)) @@ -4177,8 +4227,6 @@ arc_fini(void) mutex_destroy(&arc_l2c_only->arcs_locks[i].arcs_lock); } - mutex_destroy(&zfs_write_limit_lock); - buf_fini(); ASSERT(arc_loaned_bytes == 0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Nov 26 09:57:14 2013 (r258632) @@ -842,7 +842,7 @@ dbuf_free_range(dnode_t *dn, uint64_t st atomic_inc_64(&zfs_free_range_recv_miss); } - for (db = list_head(&dn->dn_dbufs); db; db = db_next) { + for (db = list_head(&dn->dn_dbufs); db != NULL; db = db_next) { db_next = list_next(&dn->dn_dbufs, db); ASSERT(db->db_blkid != DMU_BONUS_BLKID); @@ -1188,6 +1188,8 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t sizeof (dbuf_dirty_record_t), offsetof(dbuf_dirty_record_t, dr_dirty_node)); } + if (db->db_blkid != DMU_BONUS_BLKID && os->os_dsl_dataset != NULL) + dr->dr_accounted = db->db.db_size; dr->dr_dbuf = db; dr->dr_txg = tx->tx_txg; dr->dr_next = *drp; @@ -1271,7 +1273,10 @@ dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t dbuf_rele(parent, FTAG); mutex_enter(&db->db_mtx); - /* possible race with dbuf_undirty() */ + /* + * Since we've dropped the mutex, it's possible that + * dbuf_undirty() might have changed this out from under us. + */ if (db->db_last_dirty == dr || dn->dn_object == DMU_META_DNODE_OBJECT) { mutex_enter(&di->dt.di.dr_mtx); @@ -1341,7 +1346,11 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ ASSERT(db->db.db_size != 0); - /* XXX would be nice to fix up dn_towrite_space[] */ + /* + * Any space we accounted for in dp_dirty_* will be cleaned up by + * dsl_pool_sync(). This is relatively rare so the discrepancy + * is not a big deal. + */ *drp = dr->dr_next; @@ -1521,7 +1530,7 @@ dbuf_assign_arcbuf(dmu_buf_impl_t *db, a /* * "Clear" the contents of this dbuf. This will mark the dbuf - * EVICTING and clear *most* of its references. Unfortunetely, + * EVICTING and clear *most* of its references. Unfortunately, * when we are not holding the dn_dbufs_mtx, we can't clear the * entry in the dn_dbufs list. We have to wait until dbuf_destroy() * in this case. For callers from the DMU we will usually see: @@ -1708,7 +1717,7 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db.db_offset = 0; } else { int blocksize = - db->db_level ? 1<dn_indblkshift : dn->dn_datablksz; + db->db_level ? 1 << dn->dn_indblkshift : dn->dn_datablksz; db->db.db_size = blocksize; db->db.db_offset = db->db_blkid * blocksize; } @@ -1817,7 +1826,7 @@ dbuf_destroy(dmu_buf_impl_t *db) } void -dbuf_prefetch(dnode_t *dn, uint64_t blkid) +dbuf_prefetch(dnode_t *dn, uint64_t blkid, zio_priority_t prio) { dmu_buf_impl_t *db = NULL; blkptr_t *bp = NULL; @@ -1841,8 +1850,6 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki if (dbuf_findbp(dn, 0, blkid, TRUE, &db, &bp) == 0) { if (bp && !BP_IS_HOLE(bp)) { - int priority = dn->dn_type == DMU_OT_DDT_ZAP ? - ZIO_PRIORITY_DDT_PREFETCH : ZIO_PRIORITY_ASYNC_READ; dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH; zbookmark_t zb; @@ -1851,7 +1858,7 @@ dbuf_prefetch(dnode_t *dn, uint64_t blki dn->dn_object, 0, blkid); (void) arc_read(NULL, dn->dn_objset->os_spa, - bp, NULL, NULL, priority, + bp, NULL, NULL, prio, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &aflags, &zb); } @@ -2536,6 +2543,38 @@ dbuf_write_ready(zio_t *zio, arc_buf_t * mutex_exit(&db->db_mtx); } +/* + * The SPA will call this callback several times for each zio - once + * for every physical child i/o (zio->io_phys_children times). This + * allows the DMU to monitor the progress of each logical i/o. For example, + * there may be 2 copies of an indirect block, or many fragments of a RAID-Z + * block. There may be a long delay before all copies/fragments are completed, + * so this callback allows us to retire dirty space gradually, as the physical + * i/os complete. + */ +/* ARGSUSED */ +static void +dbuf_write_physdone(zio_t *zio, arc_buf_t *buf, void *arg) +{ + dmu_buf_impl_t *db = arg; + objset_t *os = db->db_objset; + dsl_pool_t *dp = dmu_objset_pool(os); + dbuf_dirty_record_t *dr; + int delta = 0; + + dr = db->db_data_pending; + ASSERT3U(dr->dr_txg, ==, zio->io_txg); + + /* + * The callback will be called io_phys_children times. Retire one + * portion of our dirty space each time we are called. Any rounding + * error will be cleaned up by dsl_pool_sync()'s call to + * dsl_pool_undirty_space(). + */ + delta = dr->dr_accounted / zio->io_phys_children; + dsl_pool_undirty_space(dp, delta, zio->io_txg); +} + /* ARGSUSED */ static void dbuf_write_done(zio_t *zio, arc_buf_t *buf, void *vdb) @@ -2630,6 +2669,7 @@ dbuf_write_done(zio_t *zio, arc_buf_t *b ASSERT(db->db_dirtycnt > 0); db->db_dirtycnt -= 1; db->db_data_pending = NULL; + dbuf_rele_and_unlock(db, (void *)(uintptr_t)txg); } @@ -2748,8 +2788,8 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ ASSERT(db->db_state != DB_NOFILL); dr->dr_zio = zio_write(zio, os->os_spa, txg, db->db_blkptr, data->b_data, arc_buf_size(data), &zp, - dbuf_write_override_ready, dbuf_write_override_done, dr, - ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); + dbuf_write_override_ready, NULL, dbuf_write_override_done, + dr, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); mutex_enter(&db->db_mtx); dr->dt.dl.dr_override_state = DR_NOT_OVERRIDDEN; zio_write_override(dr->dr_zio, &dr->dt.dl.dr_overridden_by, @@ -2760,7 +2800,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ zp.zp_checksum == ZIO_CHECKSUM_NOPARITY); dr->dr_zio = zio_write(zio, os->os_spa, txg, db->db_blkptr, NULL, db->db.db_size, &zp, - dbuf_write_nofill_ready, dbuf_write_nofill_done, db, + dbuf_write_nofill_ready, NULL, dbuf_write_nofill_done, db, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED | ZIO_FLAG_NODATA, &zb); } else { @@ -2768,7 +2808,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_ dr->dr_zio = arc_write(zio, os->os_spa, txg, db->db_blkptr, data, DBUF_IS_L2CACHEABLE(db), DBUF_IS_L2COMPRESSIBLE(db), &zp, dbuf_write_ready, - dbuf_write_done, db, ZIO_PRIORITY_ASYNC_WRITE, - ZIO_FLAG_MUSTSUCCEED, &zb); + dbuf_write_physdone, dbuf_write_done, db, + ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); } } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Nov 26 09:57:14 2013 (r258632) @@ -374,13 +374,11 @@ static int dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp, uint32_t flags) { - dsl_pool_t *dp = NULL; dmu_buf_t **dbp; uint64_t blkid, nblks, i; uint32_t dbuf_flags; int err; zio_t *zio; - hrtime_t start; ASSERT(length <= DMU_MAX_ACCESS); @@ -408,9 +406,6 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, } dbp = kmem_zalloc(sizeof (dmu_buf_t *) * nblks, KM_SLEEP); - if (dn->dn_objset->os_dsl_dataset) - dp = dn->dn_objset->os_dsl_dataset->ds_dir->dd_pool; - start = gethrtime(); zio = zio_root(dn->dn_objset->os_spa, NULL, NULL, ZIO_FLAG_CANFAIL); blkid = dbuf_whichblock(dn, offset); for (i = 0; i < nblks; i++) { @@ -434,9 +429,6 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, /* wait for async i/o */ err = zio_wait(zio); - /* track read overhead when we are in sync context */ - if (dp && dsl_pool_sync_context(dp)) - dp->dp_read_overhead += gethrtime() - start; if (err) { dmu_buf_rele_array(dbp, nblks, tag); return (err); @@ -518,12 +510,22 @@ dmu_buf_rele_array(dmu_buf_t **dbp_fake, kmem_free(dbp, sizeof (dmu_buf_t *) * numbufs); } +/* + * Issue prefetch i/os for the given blocks. + * + * Note: The assumption is that we *know* these blocks will be needed + * almost immediately. Therefore, the prefetch i/os will be issued at + * ZIO_PRIORITY_SYNC_READ + * + * Note: indirect blocks and other metadata will be read synchronously, + * causing this function to block if they are not already cached. + */ void dmu_prefetch(objset_t *os, uint64_t object, uint64_t offset, uint64_t len) { dnode_t *dn; uint64_t blkid; - int nblks, i, err; + int nblks, err; if (zfs_prefetch_disable) return; @@ -536,7 +538,7 @@ dmu_prefetch(objset_t *os, uint64_t obje rw_enter(&dn->dn_struct_rwlock, RW_READER); blkid = dbuf_whichblock(dn, object * sizeof (dnode_phys_t)); - dbuf_prefetch(dn, blkid); + dbuf_prefetch(dn, blkid, ZIO_PRIORITY_SYNC_READ); rw_exit(&dn->dn_struct_rwlock); return; } @@ -553,16 +555,16 @@ dmu_prefetch(objset_t *os, uint64_t obje rw_enter(&dn->dn_struct_rwlock, RW_READER); if (dn->dn_datablkshift) { int blkshift = dn->dn_datablkshift; - nblks = (P2ROUNDUP(offset+len, 1<> blkshift; + nblks = (P2ROUNDUP(offset + len, 1 << blkshift) - + P2ALIGN(offset, 1 << blkshift)) >> blkshift; } else { nblks = (offset < dn->dn_datablksz); } if (nblks != 0) { blkid = dbuf_whichblock(dn, offset); - for (i = 0; i < nblks; i++) - dbuf_prefetch(dn, blkid+i); + for (int i = 0; i < nblks; i++) + dbuf_prefetch(dn, blkid + i, ZIO_PRIORITY_SYNC_READ); } rw_exit(&dn->dn_struct_rwlock); @@ -1376,7 +1378,7 @@ dmu_sync_late_arrival(zio_t *pio, objset zio_nowait(zio_write(pio, os->os_spa, dmu_tx_get_txg(tx), zgd->zgd_bp, zgd->zgd_db->db_data, zgd->zgd_db->db_size, zp, - dmu_sync_late_arrival_ready, dmu_sync_late_arrival_done, dsa, + dmu_sync_late_arrival_ready, NULL, dmu_sync_late_arrival_done, dsa, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL, zb)); return (0); @@ -1516,8 +1518,9 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s zio_nowait(arc_write(pio, os->os_spa, txg, bp, dr->dt.dl.dr_data, DBUF_IS_L2CACHEABLE(db), - DBUF_IS_L2COMPRESSIBLE(db), &zp, dmu_sync_ready, dmu_sync_done, - dsa, ZIO_PRIORITY_SYNC_WRITE, ZIO_FLAG_CANFAIL, &zb)); + DBUF_IS_L2COMPRESSIBLE(db), &zp, dmu_sync_ready, + NULL, dmu_sync_done, dsa, ZIO_PRIORITY_SYNC_WRITE, + ZIO_FLAG_CANFAIL, &zb)); return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Nov 26 09:57:14 2013 (r258632) @@ -1028,7 +1028,7 @@ dmu_objset_sync(objset_t *os, zio_t *pio zio = arc_write(pio, os->os_spa, tx->tx_txg, os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), DMU_OS_IS_L2COMPRESSIBLE(os), &zp, dmu_objset_write_ready, - dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE, + NULL, dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Nov 26 09:45:48 2013 (r258631) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Nov 26 09:57:14 2013 (r258632) @@ -54,6 +54,7 @@ dmu_tx_create_dd(dsl_dir_t *dd) offsetof(dmu_tx_hold_t, txh_node)); list_create(&tx->tx_callbacks, sizeof (dmu_tx_callback_t), offsetof(dmu_tx_callback_t, dcb_node)); + tx->tx_start = gethrtime(); #ifdef ZFS_DEBUG refcount_create(&tx->tx_space_written); refcount_create(&tx->tx_space_freed); @@ -597,13 +598,13 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t if (txh == NULL) return; dn = txh->txh_dnode; + dmu_tx_count_dnode(txh); if (off >= (dn->dn_maxblkid+1) * dn->dn_datablksz) return; if (len == DMU_OBJECT_END) len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; - dmu_tx_count_dnode(txh); /* * For i/o error checking, we read the first and last level-0 @@ -911,6 +912,161 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_i } #endif +/* + * If we can't do 10 iops, something is wrong. Let us go ahead + * and hit zfs_dirty_data_max. + */ +hrtime_t zfs_delay_max_ns = MSEC2NSEC(100); +int zfs_delay_resolution_ns = 100 * 1000; /* 100 microseconds */ + +/* + * We delay transactions when we've determined that the backend storage + * isn't able to accommodate the rate of incoming writes. + * + * If there is already a transaction waiting, we delay relative to when + * that transaction finishes waiting. This way the calculated min_time + * is independent of the number of threads concurrently executing + * transactions. + * + * If we are the only waiter, wait relative to when the transaction + * started, rather than the current time. This credits the transaction for + * "time already served", e.g. reading indirect blocks. + * + * The minimum time for a transaction to take is calculated as: + * min_time = scale * (dirty - min) / (max - dirty) + * min_time is then capped at zfs_delay_max_ns. + * + * The delay has two degrees of freedom that can be adjusted via tunables. + * The percentage of dirty data at which we start to delay is defined by + * zfs_delay_min_dirty_percent. This should typically be at or above + * zfs_vdev_async_write_active_max_dirty_percent so that we only start to + * delay after writing at full speed has failed to keep up with the incoming + * write rate. The scale of the curve is defined by zfs_delay_scale. Roughly + * speaking, this variable determines the amount of delay at the midpoint of + * the curve. + * + * delay + * 10ms +-------------------------------------------------------------*+ + * | *| + * 9ms + *+ + * | *| + * 8ms + *+ + * | * | + * 7ms + * + + * | * | + * 6ms + * + + * | * | + * 5ms + * + + * | * | + * 4ms + * + + * | * | + * 3ms + * + + * | * | + * 2ms + (midpoint) * + + * | | ** | + * 1ms + v *** + + * | zfs_delay_scale ----------> ******** | + * 0 +-------------------------------------*********----------------+ + * 0% <- zfs_dirty_data_max -> 100% + * + * Note that since the delay is added to the outstanding time remaining on the + * most recent transaction, the delay is effectively the inverse of IOPS. + * Here the midpoint of 500us translates to 2000 IOPS. The shape of the curve + * was chosen such that small changes in the amount of accumulated dirty data + * in the first 3/4 of the curve yield relatively small differences in the + * amount of delay. + * + * The effects can be easier to understand when the amount of delay is + * represented on a log scale: + * + * delay + * 100ms +-------------------------------------------------------------++ + * + + + * | | + * + *+ + * 10ms + *+ + * + ** + + * | (midpoint) ** | + * + | ** + + * 1ms + v **** + + * + zfs_delay_scale ----------> ***** + + * | **** | + * + **** + + * 100us + ** + + * + * + + * | * | + * + * + + * 10us + * + + * + + + * | | + * + + + * +--------------------------------------------------------------+ + * 0% <- zfs_dirty_data_max -> 100% + * + * Note here that only as the amount of dirty data approaches its limit does + * the delay start to increase rapidly. The goal of a properly tuned system + * should be to keep the amount of dirty data out of that range by first + * ensuring that the appropriate limits are set for the I/O scheduler to reach + * optimal throughput on the backend storage, and then by changing the value + * of zfs_delay_scale to increase the steepness of the curve. + */ +static void +dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty) +{ + dsl_pool_t *dp = tx->tx_pool; + uint64_t delay_min_bytes = + zfs_dirty_data_max * zfs_delay_min_dirty_percent / 100; + hrtime_t wakeup, min_tx_time, now; + + if (dirty <= delay_min_bytes) + return; + + /* + * The caller has already waited until we are under the max. + * We make them pass us the amount of dirty data so we don't + * have to handle the case of it being >= the max, which could + * cause a divide-by-zero if it's == the max. + */ + ASSERT3U(dirty, <, zfs_dirty_data_max); + + now = gethrtime(); + min_tx_time = zfs_delay_scale * + (dirty - delay_min_bytes) / (zfs_dirty_data_max - dirty); + if (now > tx->tx_start + min_tx_time) + return; + + min_tx_time = MIN(min_tx_time, zfs_delay_max_ns); + + DTRACE_PROBE3(delay__mintime, dmu_tx_t *, tx, uint64_t, dirty, + uint64_t, min_tx_time); + + mutex_enter(&dp->dp_lock); + wakeup = MAX(tx->tx_start + min_tx_time, + dp->dp_last_wakeup + min_tx_time); + dp->dp_last_wakeup = wakeup; + mutex_exit(&dp->dp_lock); + +#ifdef _KERNEL +#ifdef illumos + mutex_enter(&curthread->t_delay_lock); + while (cv_timedwait_hires(&curthread->t_delay_cv, + &curthread->t_delay_lock, wakeup, zfs_delay_resolution_ns, + CALLOUT_FLAG_ABSOLUTE | CALLOUT_FLAG_ROUNDUP) > 0) + continue; + mutex_exit(&curthread->t_delay_lock); +#else + pause_sbt("dmu_tx_delay", wakeup * SBT_1NS, + zfs_delay_resolution_ns * SBT_1NS, C_ABSOLUTE); +#endif +#else + hrtime_t delta = wakeup - gethrtime(); + struct timespec ts; + ts.tv_sec = delta / NANOSEC; + ts.tv_nsec = delta % NANOSEC; + (void) nanosleep(&ts, NULL); +#endif +} + static int dmu_tx_try_assign(dmu_tx_t *tx, txg_how_t txg_how) { @@ -941,6 +1097,12 @@ dmu_tx_try_assign(dmu_tx_t *tx, txg_how_ return (SET_ERROR(ERESTART)); } + if (!tx->tx_waited && + dsl_pool_need_dirty_delay(tx->tx_pool)) { + tx->tx_wait_dirty = B_TRUE; + return (SET_ERROR(ERESTART)); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:02:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85803D67; Tue, 26 Nov 2013 10:02:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7446620A1; Tue, 26 Nov 2013 10:02:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQA23hZ007075; Tue, 26 Nov 2013 10:02:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQA223A007070; Tue, 26 Nov 2013 10:02:02 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261002.rAQA223A007070@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258633 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:02:03 -0000 Author: avg Date: Tue Nov 26 10:02:02 2013 New Revision: 258633 URL: http://svnweb.freebsd.org/changeset/base/258633 Log: MFV r255256: 3954 metaslabs continue to load even after hitting zfs_mg_alloc_failure limit 4080 zpool clear fails to clear pool 4081 need zfs_mg_noalloc_threshold illumos/illumos-gate@22e30981d82a0b6dc89253596ededafae8655e00 MFC after: 10 days Sponsored by: HybridCluster [merge] Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Nov 26 09:57:14 2013 (r258632) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Nov 26 10:02:02 2013 (r258633) @@ -65,7 +65,8 @@ int zfs_condense_pct = 200; /* * This value defines the number of allowed allocation failures per vdev. * If a device reaches this threshold in a given txg then we consider skipping - * allocations on that device. + * allocations on that device. The value of zfs_mg_alloc_failures is computed + * in zio_init() unless it has been overridden in /etc/system. */ int zfs_mg_alloc_failures = 0; TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); @@ -74,6 +75,21 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_ "Number of allowed allocation failures per vdev"); /* + * The zfs_mg_noalloc_threshold defines which metaslab groups should + * be eligible for allocation. The value is defined as a percentage of + * a free space. Metaslab groups that have more free space than + * zfs_mg_noalloc_threshold are always eligible for allocations. Once + * a metaslab group's free space is less than or equal to the + * zfs_mg_noalloc_threshold the allocator will avoid allocating to that + * group unless all groups in the pool have reached zfs_mg_noalloc_threshold. + * Once all groups in the pool reach zfs_mg_noalloc_threshold then all + * groups are allowed to accept allocations. Gang blocks are always + * eligible to allocate on any metaslab group. The default value of 0 means + * no metaslab group will be excluded based on this criterion. + */ +int zfs_mg_noalloc_threshold = 0; + +/* * Metaslab debugging: when set, keeps all space maps in core to verify frees. */ static int metaslab_debug = 0; @@ -289,6 +305,53 @@ metaslab_compare(const void *x1, const v return (0); } +/* + * Update the allocatable flag and the metaslab group's capacity. + * The allocatable flag is set to true if the capacity is below + * the zfs_mg_noalloc_threshold. If a metaslab group transitions + * from allocatable to non-allocatable or vice versa then the metaslab + * group's class is updated to reflect the transition. + */ +static void +metaslab_group_alloc_update(metaslab_group_t *mg) +{ + vdev_t *vd = mg->mg_vd; + metaslab_class_t *mc = mg->mg_class; + vdev_stat_t *vs = &vd->vdev_stat; + boolean_t was_allocatable; + + ASSERT(vd == vd->vdev_top); + + mutex_enter(&mg->mg_lock); + was_allocatable = mg->mg_allocatable; + + mg->mg_free_capacity = ((vs->vs_space - vs->vs_alloc) * 100) / + (vs->vs_space + 1); + + mg->mg_allocatable = (mg->mg_free_capacity > zfs_mg_noalloc_threshold); + + /* + * The mc_alloc_groups maintains a count of the number of + * groups in this metaslab class that are still above the + * zfs_mg_noalloc_threshold. This is used by the allocating + * threads to determine if they should avoid allocations to + * a given group. The allocator will avoid allocations to a group + * if that group has reached or is below the zfs_mg_noalloc_threshold + * and there are still other groups that are above the threshold. + * When a group transitions from allocatable to non-allocatable or + * vice versa we update the metaslab class to reflect that change. + * When the mc_alloc_groups value drops to 0 that means that all + * groups have reached the zfs_mg_noalloc_threshold making all groups + * eligible for allocations. This effectively means that all devices + * are balanced again. + */ + if (was_allocatable && !mg->mg_allocatable) + mc->mc_alloc_groups--; + else if (!was_allocatable && mg->mg_allocatable) + mc->mc_alloc_groups++; + mutex_exit(&mg->mg_lock); +} + metaslab_group_t * metaslab_group_create(metaslab_class_t *mc, vdev_t *vd) { @@ -339,6 +402,7 @@ metaslab_group_activate(metaslab_group_t return; mg->mg_aliquot = metaslab_aliquot * MAX(1, mg->mg_vd->vdev_children); + metaslab_group_alloc_update(mg); if ((mgprev = mc->mc_rotor) == NULL) { mg->mg_prev = mg; @@ -426,6 +490,29 @@ metaslab_group_sort(metaslab_group_t *mg } /* + * Determine if a given metaslab group should skip allocations. A metaslab + * group should avoid allocations if its used capacity has crossed the + * zfs_mg_noalloc_threshold and there is at least one metaslab group + * that can still handle allocations. + */ +static boolean_t +metaslab_group_allocatable(metaslab_group_t *mg) +{ + vdev_t *vd = mg->mg_vd; + spa_t *spa = vd->vdev_spa; + metaslab_class_t *mc = mg->mg_class; + + /* + * A metaslab group is considered allocatable if its free capacity + * is greater than the set value of zfs_mg_noalloc_threshold, it's + * associated with a slog, or there are no other metaslab groups + * with free capacity greater than zfs_mg_noalloc_threshold. + */ + return (mg->mg_free_capacity > zfs_mg_noalloc_threshold || + mc != spa_normal_class(spa) || mc->mc_alloc_groups == 0); +} + +/* * ========================================================================== * Common allocator routines * ========================================================================== @@ -1374,6 +1461,8 @@ metaslab_sync_reassess(metaslab_group_t vdev_t *vd = mg->mg_vd; int64_t failures = mg->mg_alloc_failures; + metaslab_group_alloc_update(mg); + /* * Re-evaluate all metaslabs which have lower offsets than the * bonus area. @@ -1475,6 +1564,8 @@ metaslab_group_alloc(metaslab_group_t *m if (msp == NULL) return (-1ULL); + mutex_enter(&msp->ms_lock); + /* * If we've already reached the allowable number of failed * allocation attempts on this metaslab group then we @@ -1491,11 +1582,10 @@ metaslab_group_alloc(metaslab_group_t *m "asize %llu, failures %llu", spa_name(spa), mg->mg_vd->vdev_id, txg, mg, psize, asize, mg->mg_alloc_failures); + mutex_exit(&msp->ms_lock); return (-1ULL); } - mutex_enter(&msp->ms_lock); - /* * Ensure that the metaslab we have selected is still * capable of handling our request. It's possible that @@ -1648,6 +1738,21 @@ top: } else { allocatable = vdev_allocatable(vd); } + + /* + * Determine if the selected metaslab group is eligible + * for allocations. If we're ganging or have requested + * an allocation for the smallest gang block size + * then we don't want to avoid allocating to the this + * metaslab group. If we're in this condition we should + * try to allocate from any device possible so that we + * don't inadvertently return ENOSPC and suspend the pool + * even though space is still available. + */ + if (allocatable && CAN_FASTGANG(flags) && + psize > SPA_GANGBLOCKSIZE) + allocatable = metaslab_group_allocatable(mg); + if (!allocatable) goto next; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Tue Nov 26 09:57:14 2013 (r258632) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h Tue Nov 26 10:02:02 2013 (r258633) @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_METASLAB_IMPL_H @@ -45,6 +45,7 @@ struct metaslab_class { metaslab_group_t *mc_rotor; space_map_ops_t *mc_ops; uint64_t mc_aliquot; + uint64_t mc_alloc_groups; /* # of allocatable groups */ uint64_t mc_alloc; /* total allocated space */ uint64_t mc_deferred; /* total deferred frees */ uint64_t mc_space; /* total space (alloc + free) */ @@ -58,6 +59,8 @@ struct metaslab_group { uint64_t mg_aliquot; uint64_t mg_bonus_area; uint64_t mg_alloc_failures; + boolean_t mg_allocatable; /* can we allocate? */ + uint64_t mg_free_capacity; /* percentage free */ int64_t mg_bias; int64_t mg_activation_count; metaslab_class_t *mg_class; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 09:57:14 2013 (r258632) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Nov 26 10:02:02 2013 (r258633) @@ -2458,7 +2458,7 @@ zio_alloc_zil(spa_t *spa, uint64_t txg, if (error) { error = metaslab_alloc(spa, spa_normal_class(spa), size, new_bp, 1, txg, old_bp, - METASLAB_HINTBP_AVOID | METASLAB_GANG_AVOID); + METASLAB_HINTBP_AVOID); } if (error == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:14:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4238EF6A; Tue, 26 Nov 2013 10:14:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 22AD8212C; Tue, 26 Nov 2013 10:14:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAEOb6011074; Tue, 26 Nov 2013 10:14:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAENrV011071; Tue, 26 Nov 2013 10:14:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261014.rAQAENrV011071@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258634 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:14:24 -0000 Author: avg Date: Tue Nov 26 10:14:23 2013 New Revision: 258634 URL: http://svnweb.freebsd.org/changeset/base/258634 Log: MFV r258376: 3964 L2ARC should always compress metadata buffers illumos/illumos-gate@e4be62a2b74a8f09bb669217a1a39eee069b13a1 MFC after: 10 days Sponsored by: HybridCluster [merge] Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Tue Nov 26 10:02:02 2013 (r258633) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h Tue Nov 26 10:14:23 2013 (r258634) @@ -329,7 +329,8 @@ boolean_t dbuf_is_metadata(dmu_buf_impl_ ((_db)->db_objset->os_secondary_cache == ZFS_CACHE_METADATA))) #define DBUF_IS_L2COMPRESSIBLE(_db) \ - ((_db)->db_objset->os_compress != ZIO_COMPRESS_OFF) + ((_db)->db_objset->os_compress != ZIO_COMPRESS_OFF || \ + (dbuf_is_metadata(_db) && zfs_mdcomp_disable == B_FALSE)) #ifdef ZFS_DEBUG Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Nov 26 10:02:02 2013 (r258633) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Tue Nov 26 10:14:23 2013 (r258634) @@ -24,6 +24,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright 2013 DEY Storage Systems, Inc. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -807,6 +808,8 @@ int dmu_diff(const char *tosnap_name, co #define ZFS_CRC64_POLY 0xC96C5795D7870F42ULL /* ECMA-182, reflected form */ extern uint64_t zfs_crc64_table[256]; +extern int zfs_mdcomp_disable; + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Nov 26 10:02:02 2013 (r258633) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Nov 26 10:14:23 2013 (r258634) @@ -130,7 +130,7 @@ struct objset { ((os)->os_secondary_cache == ZFS_CACHE_ALL || \ (os)->os_secondary_cache == ZFS_CACHE_METADATA) -#define DMU_OS_IS_L2COMPRESSIBLE(os) ((os)->os_compress != ZIO_COMPRESS_OFF) +#define DMU_OS_IS_L2COMPRESSIBLE(os) (zfs_mdcomp_disable == B_FALSE) /* called from zpl */ int dmu_objset_hold(const char *name, void *tag, objset_t **osp); From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:34:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29E6C853; Tue, 26 Nov 2013 10:34:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19CFC22ED; Tue, 26 Nov 2013 10:34:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAYYqn017813; Tue, 26 Nov 2013 10:34:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAYYGZ017812; Tue, 26 Nov 2013 10:34:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311261034.rAQAYYGZ017812@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 26 Nov 2013 10:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258637 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:34:35 -0000 Author: glebius Date: Tue Nov 26 10:34:34 2013 New Revision: 258637 URL: http://svnweb.freebsd.org/changeset/base/258637 Log: Fix build. Modified: head/sys/fs/nfsclient/nfs_clkdtrace.c Modified: head/sys/fs/nfsclient/nfs_clkdtrace.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clkdtrace.c Tue Nov 26 10:26:40 2013 (r258636) +++ head/sys/fs/nfsclient/nfs_clkdtrace.c Tue Nov 26 10:34:34 2013 (r258637) @@ -177,21 +177,6 @@ static dtrace_pops_t dtnfsclient_pops = static dtrace_provider_id_t dtnfsclient_id; /* - * Most probes are generated from the above RPC table, but for access and - * attribute caches, we have specific IDs we recognize and handle specially - * in various spots. - */ -extern uint32_t nfscl_accesscache_flush_done_id; -extern uint32_t nfscl_accesscache_get_hit_id; -extern uint32_t nfscl_accesscache_get_miss_id; -extern uint32_t nfscl_accesscache_load_done_id; - -extern uint32_t nfscl_attrcache_flush_done_id; -extern uint32_t nfscl_attrcache_get_hit_id; -extern uint32_t nfscl_attrcache_get_miss_id; -extern uint32_t nfscl_attrcache_load_done_id; - -/* * When tracing on a procedure is enabled, the DTrace ID for an RPC event is * stored in one of these two NFS client-allocated arrays; 0 indicates that * the event is not being traced so probes should not be called. From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:46:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AE4DBDF; Tue, 26 Nov 2013 10:46:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A87B23A1; Tue, 26 Nov 2013 10:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAkifH021540; Tue, 26 Nov 2013 10:46:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAkiNw021539; Tue, 26 Nov 2013 10:46:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261046.rAQAkiNw021539@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258638 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:46:44 -0000 Author: avg Date: Tue Nov 26 10:46:43 2013 New Revision: 258638 URL: http://svnweb.freebsd.org/changeset/base/258638 Log: expose zfs_flags as debug.zfs_flags r/w tunable and sysctl This knob is purposefully hidden under debug. MFC after: 5 days Sponsored by: HybridCluster Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 26 10:34:34 2013 (r258637) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 26 10:46:43 2013 (r258638) @@ -243,6 +243,10 @@ int zfs_flags = ~(ZFS_DEBUG_DPRINTF | ZF #else int zfs_flags = 0; #endif +SYSCTL_DECL(_debug); +TUNABLE_INT("debug.zfs_flags", &zfs_flags); +SYSCTL_INT(_debug, OID_AUTO, zfs_flags, CTLFLAG_RWTUN, &zfs_flags, 0, + "Try to recover from otherwise-fatal errors."); /* * zfs_recover can be set to nonzero to attempt to recover from From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:53:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3113F49; Tue, 26 Nov 2013 10:53:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2ED2240C; Tue, 26 Nov 2013 10:53:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQArCoH024454; Tue, 26 Nov 2013 10:53:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQArCRu024453; Tue, 26 Nov 2013 10:53:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311261053.rAQArCRu024453@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 26 Nov 2013 10:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258641 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:53:12 -0000 Author: hselasky Date: Tue Nov 26 10:53:12 2013 New Revision: 258641 URL: http://svnweb.freebsd.org/changeset/base/258641 Log: Add missing static keyword. MFC after: 2 weeks Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Tue Nov 26 10:48:08 2013 (r258640) +++ head/sys/dev/usb/wlan/if_run.c Tue Nov 26 10:53:12 2013 (r258641) @@ -1062,7 +1062,7 @@ fail: return (error); } -int +static int run_reset(struct run_softc *sc) { usb_device_request_t req; @@ -1465,7 +1465,7 @@ run_get_rf(uint16_t rev) return ("unknown"); } -int +static int run_read_eeprom(struct run_softc *sc) { int8_t delta_2ghz, delta_5ghz; From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 10:57:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F8B11E6; Tue, 26 Nov 2013 10:57:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE352440; Tue, 26 Nov 2013 10:57:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAvAb2025016; Tue, 26 Nov 2013 10:57:10 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAvAm2025015; Tue, 26 Nov 2013 10:57:10 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261057.rAQAvAm2025015@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258642 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:57:10 -0000 Author: avg Date: Tue Nov 26 10:57:09 2013 New Revision: 258642 URL: http://svnweb.freebsd.org/changeset/base/258642 Log: fix debug.zfs_flags sysctl description in r258638 Pointyhat to: avg MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 26 10:53:12 2013 (r258641) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Nov 26 10:57:09 2013 (r258642) @@ -246,7 +246,7 @@ int zfs_flags = 0; SYSCTL_DECL(_debug); TUNABLE_INT("debug.zfs_flags", &zfs_flags); SYSCTL_INT(_debug, OID_AUTO, zfs_flags, CTLFLAG_RWTUN, &zfs_flags, 0, - "Try to recover from otherwise-fatal errors."); + "ZFS debug flags."); /* * zfs_recover can be set to nonzero to attempt to recover from From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 11:11:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87F8C4A7; Tue, 26 Nov 2013 11:11:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E5902525; Tue, 26 Nov 2013 11:11:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQBBPfx031386; Tue, 26 Nov 2013 11:11:25 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQBBPmg031385; Tue, 26 Nov 2013 11:11:25 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311261111.rAQBBPmg031385@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 26 Nov 2013 11:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258643 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 11:11:25 -0000 Author: hselasky Date: Tue Nov 26 11:11:24 2013 New Revision: 258643 URL: http://svnweb.freebsd.org/changeset/base/258643 Log: Style changes. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Tue Nov 26 10:57:09 2013 (r258642) +++ head/sys/dev/usb/wlan/if_run.c Tue Nov 26 11:11:24 2013 (r258643) @@ -2520,7 +2520,7 @@ run_rx_frame(struct run_softc *sc, struc struct rt2870_rxd *rxd; struct rt2860_rxwi *rxwi; uint32_t flags; - uint16_t len, phy; + uint16_t len; uint8_t ant, rssi; int8_t nf; @@ -2587,6 +2587,7 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; + uint16_t phy; tap->wr_flags = 0; tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); @@ -5286,7 +5287,7 @@ run_stop(void *arg) tmp &= ~(RT2860_RX_DMA_EN | RT2860_TX_DMA_EN); run_write(sc, RT2860_WPDMA_GLO_CFG, tmp); - for (ntries = 0; ntries < 100; ntries++) { + for (ntries = 0; ntries < 100; ntries++) { if (run_read(sc, RT2860_WPDMA_GLO_CFG, &tmp) != 0) return; if ((tmp & (RT2860_TX_DMA_BUSY | RT2860_RX_DMA_BUSY)) == 0) From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 12:34:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96534775; Tue, 26 Nov 2013 12:34:22 +0000 (UTC) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB80A2A70; Tue, 26 Nov 2013 12:34:21 +0000 (UTC) Received: from r2d2 ([82.69.179.241]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50006835805.msg; Tue, 26 Nov 2013 12:34:19 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Tue, 26 Nov 2013 12:34:19 +0000 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.179.241 X-Return-Path: prvs=1042f5e7dd=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: From: "Steven Hartland" To: "Andriy Gapon" , , , References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> Subject: Re: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... Date: Tue, 26 Nov 2013 12:34:09 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 12:34:22 -0000 Can I ask why choose priority now for TRIM, does this not change the flow of free requests quite significantly? Also as we have rotational information available should we apply the following change which makes the active queue timestamp sorted instead of offset sorted? An AVL as a FIFO queue seems like quite an expensive option. Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c (revision 258644) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c (working copy) @@ -262,7 +263,9 @@ mutex_init(&vq->vq_lock, NULL, MUTEX_DEFAULT, NULL); vq->vq_vdev = vd; - avl_create(&vq->vq_active_tree, vdev_queue_offset_compare, + avl_create(&vq->vq_active_tree, + vd->vdev_rotation_rate == VDEV_RATE_NON_ROTATING ? + vdev_queue_timestamp_compare : vdev_queue_offset_compare, sizeof (zio_t), offsetof(struct zio, io_queue_node)); ----- Original Message ----- From: "Andriy Gapon" To: ; ; Sent: Tuesday, November 26, 2013 9:57 AM Subject: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... > Author: avg > Date: Tue Nov 26 09:57:14 2013 > New Revision: 258632 > URL: http://svnweb.freebsd.org/changeset/base/258632 > > Log: > MFV r255255: 4045 zfs write throttle & i/o scheduler performance work > > illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e > > Please note the following changes: > - zio_ioctl has lost its priority parameter and now TRIM is executed > with 'now' priority > - some knobs are gone and some new knobs are added; not all of them are > exposed as tunables / sysctls yet ... ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 13:24:12 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CC99442; Tue, 26 Nov 2013 13:24:12 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0DD4F2DC2; Tue, 26 Nov 2013 13:24:10 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA13294; Tue, 26 Nov 2013 15:24:02 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlIcT-00016M-RB; Tue, 26 Nov 2013 15:24:01 +0200 Message-ID: <5294A0CD.8030000@FreeBSD.org> Date: Tue, 26 Nov 2013 15:23:25 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Steven Hartland , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 13:24:12 -0000 on 26/11/2013 14:34 Steven Hartland said the following: > Can I ask why choose priority now for TRIM, does this not change the flow of > free requests quite significantly? Sorry, I couldn't grok the question... Also, please take into account that I know nothing about TRIM nor TRIM + ZFS. BTW, I appreciate the review but a timely review[*] would be appreciated even more :-) > Also as we have rotational information available should we apply > the following change which makes the active queue timestamp sorted > instead of offset sorted? > > An AVL as a FIFO queue seems like quite an expensive option. I've just merged the upstream change, perhaps badly. Any improvement are appreciated. [*] Message <5242F5AE.6090407@FreeBSD.org> to zfs-devel@FreeBSD.org. > Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > =================================================================== > --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c (revision 258644) > +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c (working copy) > @@ -262,7 +263,9 @@ > mutex_init(&vq->vq_lock, NULL, MUTEX_DEFAULT, NULL); > vq->vq_vdev = vd; > > - avl_create(&vq->vq_active_tree, vdev_queue_offset_compare, > + avl_create(&vq->vq_active_tree, > + vd->vdev_rotation_rate == VDEV_RATE_NON_ROTATING ? > + vdev_queue_timestamp_compare : vdev_queue_offset_compare, > sizeof (zio_t), offsetof(struct zio, io_queue_node)); > > > ----- Original Message ----- From: "Andriy Gapon" > To: ; ; > > Sent: Tuesday, November 26, 2013 9:57 AM > Subject: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest > cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys > sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... > > >> Author: avg >> Date: Tue Nov 26 09:57:14 2013 >> New Revision: 258632 >> URL: http://svnweb.freebsd.org/changeset/base/258632 >> >> Log: >> MFV r255255: 4045 zfs write throttle & i/o scheduler performance work >> >> illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e >> >> Please note the following changes: >> - zio_ioctl has lost its priority parameter and now TRIM is executed >> with 'now' priority >> - some knobs are gone and some new knobs are added; not all of them are >> exposed as tunables / sysctls yet > ... > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. and the > person or entity to whom it is addressed. In the event of misdirection, the > recipient is prohibited from using, copying, printing or otherwise disseminating > it or any information contained in it. > In the event of misdirection, illegible or incomplete transmission please > telephone +44 845 868 1337 > or return the E.mail to postmaster@multiplay.co.uk. > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 13:46:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 421C28D2; Tue, 26 Nov 2013 13:46:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31C612ED1; Tue, 26 Nov 2013 13:46:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQDkoWs082770; Tue, 26 Nov 2013 13:46:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQDkoWR082769; Tue, 26 Nov 2013 13:46:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261346.rAQDkoWR082769@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 13:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258647 - head/tools/tools/zfsboottest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 13:46:50 -0000 Author: avg Date: Tue Nov 26 13:46:49 2013 New Revision: 258647 URL: http://svnweb.freebsd.org/changeset/base/258647 Log: zfsboottest: properly specify a library dependency MFC after: 4 days Modified: head/tools/tools/zfsboottest/Makefile Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Tue Nov 26 13:06:31 2013 (r258646) +++ head/tools/tools/zfsboottest/Makefile Tue Nov 26 13:46:49 2013 (r258647) @@ -16,7 +16,7 @@ CFLAGS= -O1 \ -I. \ -fdiagnostics-show-option \ -W -Wextra -Wno-sign-compare -Wno-unused-parameter -LDFLAGS+=-lmd +LDADD+= -lmd .if ${MACHINE_CPUARCH} == "amd64" beforedepend zfsboottest.o: machine From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 14:00:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04A50E3F; Tue, 26 Nov 2013 14:00:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8BCB20E8; Tue, 26 Nov 2013 14:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQE0o0k086881; Tue, 26 Nov 2013 14:00:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQE0oOb086880; Tue, 26 Nov 2013 14:00:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261400.rAQE0oOb086880@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 14:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258648 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 14:00:51 -0000 Author: avg Date: Tue Nov 26 14:00:50 2013 New Revision: 258648 URL: http://svnweb.freebsd.org/changeset/base/258648 Log: use saner calculations in should_yield This is based on feedback from bde. MFC after: 6 days Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Nov 26 13:46:49 2013 (r258647) +++ head/sys/kern/kern_synch.c Tue Nov 26 14:00:50 2013 (r258648) @@ -587,7 +587,7 @@ int should_yield(void) { - return ((unsigned int)(ticks - curthread->td_swvoltick) >= hogticks); + return ((u_int)ticks - (u_int)curthread->td_swvoltick >= hogticks); } void From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 14:52:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C313DE4; Tue, 26 Nov 2013 14:52:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD73240C; Tue, 26 Nov 2013 14:52:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQEqUMK009444; Tue, 26 Nov 2013 14:52:30 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQEqT8h009442; Tue, 26 Nov 2013 14:52:29 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311261452.rAQEqT8h009442@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 26 Nov 2013 14:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258651 - in head/contrib/gcc: . config/rs6000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 14:52:30 -0000 Author: pfg Date: Tue Nov 26 14:52:29 2013 New Revision: 258651 URL: http://svnweb.freebsd.org/changeset/base/258651 Log: gcc: Altivec register adjustments from Apple. Obtained from: gcc pre-4.3 (rev. 124763; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/config/rs6000/rs6000.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Tue Nov 26 14:50:39 2013 (r258650) +++ head/contrib/gcc/ChangeLog.gcc43 Tue Nov 26 14:52:29 2013 (r258651) @@ -31,6 +31,12 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-16 Eric Christopher (r124763) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register + saving after stack push. Set sp_offset whenever we push. + (rs6000_emit_epilogue): Move altivec register restore before stack push. + 2007-05-03 Ian Lance Taylor (r124381) * config/rs6000/rs6000.c (rs6000_override_options): Don't set Modified: head/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- head/contrib/gcc/config/rs6000/rs6000.c Tue Nov 26 14:50:39 2013 (r258650) +++ head/contrib/gcc/config/rs6000/rs6000.c Tue Nov 26 14:52:29 2013 (r258651) @@ -14466,77 +14466,6 @@ rs6000_emit_prologue (void) sp_offset = info->total_size; } - /* Save AltiVec registers if needed. */ - if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) - { - int i; - - /* There should be a non inline version of this, for when we - are saving lots of vector registers. */ - for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) - if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) - { - rtx areg, savereg, mem; - int offset; - - offset = info->altivec_save_offset + sp_offset - + 16 * (i - info->first_altivec_reg_save); - - savereg = gen_rtx_REG (V4SImode, i); - - areg = gen_rtx_REG (Pmode, 0); - emit_move_insn (areg, GEN_INT (offset)); - - /* AltiVec addressing mode is [reg+reg]. */ - mem = gen_frame_mem (V4SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); - - insn = emit_move_insn (mem, savereg); - - rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, - areg, GEN_INT (offset)); - } - } - - /* VRSAVE is a bit vector representing which AltiVec registers - are used. The OS uses this to determine which vector - registers to save on a context switch. We need to save - VRSAVE on the stack frame, add whatever AltiVec registers we - used in this function, and do the corresponding magic in the - epilogue. */ - - if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE - && info->vrsave_mask != 0) - { - rtx reg, mem, vrsave; - int offset; - - /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 - as frame_reg_rtx and r11 as the static chain pointer for - nested functions. */ - reg = gen_rtx_REG (SImode, 0); - vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); - if (TARGET_MACHO) - emit_insn (gen_get_vrsave_internal (reg)); - else - emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); - - if (!WORLD_SAVE_P (info)) - { - /* Save VRSAVE. */ - offset = info->vrsave_save_offset + sp_offset; - mem = gen_frame_mem (SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, - GEN_INT (offset))); - insn = emit_move_insn (mem, reg); - } - - /* Include the registers in the mask. */ - emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); - - insn = emit_insn (generate_set_vrsave (reg, info, 0)); - } - /* If we use the link register, get it into r0. */ if (!WORLD_SAVE_P (info) && info->lr_save_p) { @@ -14774,7 +14703,10 @@ rs6000_emit_prologue (void) for which it was done previously. */ if (!WORLD_SAVE_P (info) && info->push_p && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return)) - rs6000_emit_allocate_stack (info->total_size, FALSE); + { + rs6000_emit_allocate_stack (info->total_size, FALSE); + sp_offset = info->total_size; + } /* Set frame pointer, if needed. */ if (frame_pointer_needed) @@ -14784,6 +14716,78 @@ rs6000_emit_prologue (void) RTX_FRAME_RELATED_P (insn) = 1; } + /* Save AltiVec registers if needed. Save here because the red zone does + not include AltiVec registers. */ + if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) + { + int i; + + /* There should be a non inline version of this, for when we + are saving lots of vector registers. */ + for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) + if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) + { + rtx areg, savereg, mem; + int offset; + + offset = info->altivec_save_offset + sp_offset + + 16 * (i - info->first_altivec_reg_save); + + savereg = gen_rtx_REG (V4SImode, i); + + areg = gen_rtx_REG (Pmode, 0); + emit_move_insn (areg, GEN_INT (offset)); + + /* AltiVec addressing mode is [reg+reg]. */ + mem = gen_frame_mem (V4SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); + + insn = emit_move_insn (mem, savereg); + + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + areg, GEN_INT (offset)); + } + } + + /* VRSAVE is a bit vector representing which AltiVec registers + are used. The OS uses this to determine which vector + registers to save on a context switch. We need to save + VRSAVE on the stack frame, add whatever AltiVec registers we + used in this function, and do the corresponding magic in the + epilogue. */ + + if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE + && info->vrsave_mask != 0) + { + rtx reg, mem, vrsave; + int offset; + + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 + as frame_reg_rtx and r11 as the static chain pointer for + nested functions. */ + reg = gen_rtx_REG (SImode, 0); + vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); + if (TARGET_MACHO) + emit_insn (gen_get_vrsave_internal (reg)); + else + emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); + + if (!WORLD_SAVE_P (info)) + { + /* Save VRSAVE. */ + offset = info->vrsave_save_offset + sp_offset; + mem = gen_frame_mem (SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (offset))); + insn = emit_move_insn (mem, reg); + } + + /* Include the registers in the mask. */ + emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); + + insn = emit_insn (generate_set_vrsave (reg, info, 0)); + } + /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) || (DEFAULT_ABI == ABI_V4 @@ -15041,33 +15045,10 @@ rs6000_emit_epilogue (int sibcall) return; } - /* If we have a frame pointer, a call to alloca, or a large stack - frame, restore the old stack pointer using the backchain. Otherwise, - we know what size to update it with. */ - if (use_backchain_to_restore_sp) - { - /* Under V.4, don't reset the stack pointer until after we're done - loading the saved registers. */ - if (DEFAULT_ABI == ABI_V4) - frame_reg_rtx = gen_rtx_REG (Pmode, 11); - - emit_move_insn (frame_reg_rtx, - gen_rtx_MEM (Pmode, sp_reg_rtx)); - } - else if (info->push_p) - { - if (DEFAULT_ABI == ABI_V4 - || current_function_calls_eh_return) - sp_offset = info->total_size; - else - { - emit_insn (TARGET_32BIT - ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size)) - : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size))); - } - } + /* Set sp_offset based on the stack push from the prologue. */ + if ((DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return) + && info->total_size < 32767) + sp_offset = info->total_size; /* Restore AltiVec registers if needed. */ if (TARGET_ALTIVEC_ABI && info->altivec_size != 0) @@ -15108,6 +15089,36 @@ rs6000_emit_epilogue (int sibcall) emit_insn (generate_set_vrsave (reg, info, 1)); } + sp_offset = 0; + + /* If we have a frame pointer, a call to alloca, or a large stack + frame, restore the old stack pointer using the backchain. Otherwise, + we know what size to update it with. */ + if (use_backchain_to_restore_sp) + { + /* Under V.4, don't reset the stack pointer until after we're done + loading the saved registers. */ + if (DEFAULT_ABI == ABI_V4) + frame_reg_rtx = gen_rtx_REG (Pmode, 11); + + emit_move_insn (frame_reg_rtx, + gen_rtx_MEM (Pmode, sp_reg_rtx)); + } + else if (info->push_p) + { + if (DEFAULT_ABI == ABI_V4 + || current_function_calls_eh_return) + sp_offset = info->total_size; + else + { + emit_insn (TARGET_32BIT + ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size)) + : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size))); + } + } + /* Get the old lr if we saved it. */ if (info->lr_save_p) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 14:58:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2810D21E; Tue, 26 Nov 2013 14:58:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 179812451; Tue, 26 Nov 2013 14:58:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQEwbAt010374; Tue, 26 Nov 2013 14:58:37 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQEwbw0010373; Tue, 26 Nov 2013 14:58:37 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311261458.rAQEwbw0010373@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 26 Nov 2013 14:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258652 - head/contrib/gcc/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 14:58:38 -0000 Author: pfg Date: Tue Nov 26 14:58:37 2013 New Revision: 258652 URL: http://svnweb.freebsd.org/changeset/base/258652 Log: gcc: Altivec register adjustments from Apple. Obtained from: gcc pre-4.3 (rev. 124763; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/cp/decl.c Modified: head/contrib/gcc/cp/decl.c ============================================================================== --- head/contrib/gcc/cp/decl.c Tue Nov 26 14:52:29 2013 (r258651) +++ head/contrib/gcc/cp/decl.c Tue Nov 26 14:58:37 2013 (r258652) @@ -4967,8 +4967,8 @@ make_rtl_for_nonlocal_decl (tree decl, t gcc_assert (TREE_STATIC (decl)); /* An in-class declaration of a static data member should be external; it is only a declaration, and not a definition. */ - if (init == NULL_TREE) - gcc_assert (DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)); + if (init == NULL_TREE && DECL_INITIAL (decl) == NULL_TREE) + gcc_assert (DECL_EXTERNAL (decl)); } /* We don't create any RTL for local variables. */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 15:18:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75DDAB2E; Tue, 26 Nov 2013 15:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64F15258F; Tue, 26 Nov 2013 15:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQFIfmR017926; Tue, 26 Nov 2013 15:18:41 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQFIfw1017925; Tue, 26 Nov 2013 15:18:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311261518.rAQFIfw1017925@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 26 Nov 2013 15:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258653 - head/contrib/gcc/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 15:18:41 -0000 Author: pfg Date: Tue Nov 26 15:18:40 2013 New Revision: 258653 URL: http://svnweb.freebsd.org/changeset/base/258653 Log: Forced commit to note that r258652 is actually: gcc: Move conditions before an assert. It is a bit cleaner to check the conditions before calling the assertion. It also preserves the style from the rest of the code. This is just a cosmetical change to match better what both Apple's gcc42 and Android's gcc-4.2.1 do. Modified: head/contrib/gcc/cp/decl.c Modified: head/contrib/gcc/cp/decl.c ============================================================================== --- head/contrib/gcc/cp/decl.c Tue Nov 26 14:58:37 2013 (r258652) +++ head/contrib/gcc/cp/decl.c Tue Nov 26 15:18:40 2013 (r258653) @@ -4966,7 +4966,7 @@ make_rtl_for_nonlocal_decl (tree decl, t { gcc_assert (TREE_STATIC (decl)); /* An in-class declaration of a static data member should be - external; it is only a declaration, and not a definition. */ + external; it is only a declaration, and not a definition. */ if (init == NULL_TREE && DECL_INITIAL (decl) == NULL_TREE) gcc_assert (DECL_EXTERNAL (decl)); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 15:23:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76CA6D7F; Tue, 26 Nov 2013 15:23:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6676125F1; Tue, 26 Nov 2013 15:23:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQFNvro020685; Tue, 26 Nov 2013 15:23:57 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQFNvNa020684; Tue, 26 Nov 2013 15:23:57 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311261523.rAQFNvNa020684@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 26 Nov 2013 15:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258654 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 15:23:57 -0000 Author: pluknet Date: Tue Nov 26 15:23:56 2013 New Revision: 258654 URL: http://svnweb.freebsd.org/changeset/base/258654 Log: Fix macro name in comment. Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Tue Nov 26 15:18:40 2013 (r258653) +++ head/sys/net/netisr.c Tue Nov 26 15:23:56 2013 (r258654) @@ -129,7 +129,7 @@ static SYSCTL_NODE(_net, OID_AUTO, isr, /*- * Three global direct dispatch policies are supported: * - * NETISR_DISPATCH_QUEUED: All work is deferred for a netisr, regardless of + * NETISR_DISPATCH_DEFERRED: All work is deferred for a netisr, regardless of * context (may be overriden by protocols). * * NETISR_DISPATCH_HYBRID: If the executing context allows direct dispatch, From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 16:19:09 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 795F78D2; Tue, 26 Nov 2013 16:19:09 +0000 (UTC) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A76C2A7F; Tue, 26 Nov 2013 16:19:08 +0000 (UTC) Received: from r2d2 ([82.69.179.241]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50006841784.msg; Tue, 26 Nov 2013 16:19:04 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Tue, 26 Nov 2013 16:19:04 +0000 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.179.241 X-Return-Path: prvs=1042f5e7dd=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <54A7475886594221ABD007A86649441D@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" , , , References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> <5294A0CD.8030000@FreeBSD.org> Subject: Re: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... Date: Tue, 26 Nov 2013 16:18:57 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:19:09 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 26/11/2013 14:34 Steven Hartland said the following: >> Can I ask why choose priority now for TRIM, does this not change the flow of >> free requests quite significantly? > > Sorry, I couldn't grok the question... > Also, please take into account that I know nothing about TRIM nor TRIM + ZFS. > > BTW, I appreciate the review but a timely review[*] would be appreciated even > more :-) Erm did I miss something, this only got commited a few hours ago which is the first I knew about it. Did you ask for reviews somewhere I'm not aware of? >> Also as we have rotational information available should we apply >> the following change which makes the active queue timestamp sorted >> instead of offset sorted? >> >> An AVL as a FIFO queue seems like quite an expensive option. > > I've just merged the upstream change, perhaps badly. > Any improvement are appreciated. Will look in more depth at this one as it touches the mirror code I commited recently. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 16:26:23 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 148DFAD5; Tue, 26 Nov 2013 16:26:23 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E3AA82AF6; Tue, 26 Nov 2013 16:26:21 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA16302; Tue, 26 Nov 2013 18:26:19 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlLSs-0001Jh-Sl; Tue, 26 Nov 2013 18:26:18 +0200 Message-ID: <5294CB73.7030704@FreeBSD.org> Date: Tue, 26 Nov 2013 18:25:23 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Steven Hartland , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258632 - in head: cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> <5294A0CD.8030000@FreeBSD.org> <54A7475886594221ABD007A86649441D@multiplay.co.uk> In-Reply-To: <54A7475886594221ABD007A86649441D@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:26:23 -0000 on 26/11/2013 18:18 Steven Hartland said the following: > ----- Original Message ----- From: "Andriy Gapon" > > >> on 26/11/2013 14:34 Steven Hartland said the following: >>> Can I ask why choose priority now for TRIM, does this not change the flow of >>> free requests quite significantly? >> >> Sorry, I couldn't grok the question... >> Also, please take into account that I know nothing about TRIM nor TRIM + ZFS. >> >> BTW, I appreciate the review but a timely review[*] would be appreciated even >> more :-) > > Erm did I miss something, this only got commited a few hours ago which is > the first I knew about it. Did you ask for reviews somewhere I'm not aware of? Did you trim too much of my reply? There was a "footnote" with a reference. >>> Also as we have rotational information available should we apply >>> the following change which makes the active queue timestamp sorted >>> instead of offset sorted? >>> >>> An AVL as a FIFO queue seems like quite an expensive option. >> >> I've just merged the upstream change, perhaps badly. >> Any improvement are appreciated. > > Will look in more depth at this one as it touches the mirror code I commited > recently. Thank you! -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 17:11:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9626B688; Tue, 26 Nov 2013 17:11:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 853F22E38; Tue, 26 Nov 2013 17:11:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQHBhxu058755; Tue, 26 Nov 2013 17:11:43 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQHBh92058754; Tue, 26 Nov 2013 17:11:43 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201311261711.rAQHBh92058754@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 26 Nov 2013 17:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258658 - head/contrib/gcclibs/libcpp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 17:11:44 -0000 Author: mdf Date: Tue Nov 26 17:11:43 2013 New Revision: 258658 URL: http://svnweb.freebsd.org/changeset/base/258658 Log: Fix a segfault / internal compiler error. Among other causes, when gcc throws a warning before parsing any tokens, the cur_token pointer is at the beginning of malloc'd memory. Dereferencing cur_token[-1] can cause a segfault. Code taken from OpenBSD http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c which was a more complete fix than the one I originally coded. MFC after: 1 week Modified: head/contrib/gcclibs/libcpp/errors.c Modified: head/contrib/gcclibs/libcpp/errors.c ============================================================================== --- head/contrib/gcclibs/libcpp/errors.c Tue Nov 26 16:13:48 2013 (r258657) +++ head/contrib/gcclibs/libcpp/errors.c Tue Nov 26 17:11:43 2013 (r258658) @@ -153,7 +153,20 @@ cpp_error (cpp_reader * pfile, int level } else { - src_loc = pfile->cur_token[-1].src_loc; + /* Find actual previous token. */ + cpp_token *t; + + if (pfile->cur_token != pfile->cur_run->base) + t = pfile->cur_token - 1; + else + { + if (pfile->cur_run->prev != NULL) + t = pfile->cur_run->prev->limit; + else + t = NULL; + } + /* Retrieve corresponding source location, unless we failed. */ + src_loc = t ? t->src_loc : 0; } if (_cpp_begin_message (pfile, level, src_loc, 0)) From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 19:14:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55A47F7D; Tue, 26 Nov 2013 19:14:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44FF62665; Tue, 26 Nov 2013 19:14:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJEJZH000309; Tue, 26 Nov 2013 19:14:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJEJKh000308; Tue, 26 Nov 2013 19:14:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201311261914.rAQJEJKh000308@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 26 Nov 2013 19:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258659 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:14:19 -0000 Author: trasz Date: Tue Nov 26 19:14:18 2013 New Revision: 258659 URL: http://svnweb.freebsd.org/changeset/base/258659 Log: Fix warnings to not append "No error: 0". MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Tue Nov 26 17:11:43 2013 (r258658) +++ head/sbin/sysctl/sysctl.c Tue Nov 26 19:14:18 2013 (r258659) @@ -201,7 +201,7 @@ parse(const char *string, int lineno) cp = buf; if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ) { - warn("oid too long: '%s'%s", string, line); + warnx("oid too long: '%s'%s", string, line); return (1); } bufp = strsep(&cp, "=:"); @@ -260,7 +260,7 @@ parse(const char *string, int lineno) } } else { if ((kind & CTLTYPE) == CTLTYPE_NODE) { - warn("oid '%s' isn't a leaf node%s", bufp, line); + warnx("oid '%s' isn't a leaf node%s", bufp, line); return (1); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 19:38:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACE51652; Tue, 26 Nov 2013 19:38:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C48927B3; Tue, 26 Nov 2013 19:38:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJchAG007494; Tue, 26 Nov 2013 19:38:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJchXv007492; Tue, 26 Nov 2013 19:38:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311261938.rAQJchXv007492@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Nov 2013 19:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258660 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:38:43 -0000 Author: kib Date: Tue Nov 26 19:38:42 2013 New Revision: 258660 URL: http://svnweb.freebsd.org/changeset/base/258660 Log: Hide struct pcb definition by #ifdef __amd64__ braces. If cc -m32 compilation results in inclusion of the header, a confict arises due to savefpu being union for i386, but used as struct in the pcb definition. The 32bit code should not need amd64 variant of the struct pcb anyway. For struct region_descriptor, use __uint64_t instead of unsigned long, as the base type for bit-fields. Unsigned long cannot have width 64 for -m32. The changes allowed to use sys/sysctl.h for cc -m32. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/pcb.h head/sys/amd64/include/segments.h Modified: head/sys/amd64/include/pcb.h ============================================================================== --- head/sys/amd64/include/pcb.h Tue Nov 26 19:14:18 2013 (r258659) +++ head/sys/amd64/include/pcb.h Tue Nov 26 19:38:42 2013 (r258660) @@ -43,6 +43,7 @@ #include #include +#ifdef __amd64__ struct pcb { register_t pcb_r15; register_t pcb_r14; @@ -105,6 +106,7 @@ struct pcb { uint64_t pcb_pad[3]; }; +#endif #ifdef _KERNEL struct trapframe; Modified: head/sys/amd64/include/segments.h ============================================================================== --- head/sys/amd64/include/segments.h Tue Nov 26 19:14:18 2013 (r258659) +++ head/sys/amd64/include/segments.h Tue Nov 26 19:38:42 2013 (r258660) @@ -82,8 +82,8 @@ struct soft_segment_descriptor { * region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { - unsigned long rd_limit:16; /* segment extent */ - unsigned long rd_base:64 __packed; /* base address */ + uint64_t rd_limit:16; /* segment extent */ + uint64_t rd_base:64 __packed; /* base address */ } __packed; #ifdef _KERNEL From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 19:47:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A0828C4; Tue, 26 Nov 2013 19:47:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 495E5282E; Tue, 26 Nov 2013 19:47:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJlAiZ010628; Tue, 26 Nov 2013 19:47:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJl9t8010624; Tue, 26 Nov 2013 19:47:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311261947.rAQJl9t8010624@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Nov 2013 19:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258661 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:47:10 -0000 Author: kib Date: Tue Nov 26 19:47:09 2013 New Revision: 258661 URL: http://svnweb.freebsd.org/changeset/base/258661 Log: Add an kinfo sysctl to retrieve signal trampoline location for the given process. Note that the correctness of the trampoline length returned for ABIs which do not use shared page depends on the correctness of the struct sysvec sv_szsigcodebase member, which will be fixed on as-need basis. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_proc.c head/sys/sys/sysctl.h head/sys/sys/user.h Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Tue Nov 26 19:38:42 2013 (r258660) +++ head/sys/compat/freebsd32/freebsd32.h Tue Nov 26 19:47:09 2013 (r258661) @@ -362,6 +362,12 @@ struct kinfo_proc32 { int ki_tdflags; }; +struct kinfo_sigtramp32 { + uint32_t ksigtramp_start; + uint32_t ksigtramp_end; + uint32_t ksigtramp_spare[4]; +}; + struct kld32_file_stat_1 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Nov 26 19:38:42 2013 (r258660) +++ head/sys/kern/kern_proc.c Tue Nov 26 19:47:09 2013 (r258661) @@ -2631,6 +2631,60 @@ errout: return (error); } +static int +sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + struct kinfo_sigtramp kst; + const struct sysentvec *sv; + int error; +#ifdef COMPAT_FREEBSD32 + struct kinfo_sigtramp32 kst32; +#endif + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) + return (error); + sv = p->p_sysent; +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + bzero(&kst32, sizeof(kst32)); + if (SV_PROC_FLAG(p, SV_ILP32)) { + if (sv->sv_sigcode_base != 0) { + kst32.ksigtramp_start = sv->sv_sigcode_base; + kst32.ksigtramp_end = sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst32.ksigtramp_start = sv->sv_psstrings - + *sv->sv_szsigcode; + kst32.ksigtramp_end = sv->sv_psstrings; + } + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst32, sizeof(kst32)); + return (error); + } +#endif + bzero(&kst, sizeof(kst)); + if (sv->sv_sigcode_base != 0) { + kst.ksigtramp_start = (char *)sv->sv_sigcode_base; + kst.ksigtramp_end = (char *)sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst.ksigtramp_start = (char *)sv->sv_psstrings - + *sv->sv_szsigcode; + kst.ksigtramp_end = (char *)sv->sv_psstrings; + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst, sizeof(kst)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2739,3 +2793,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, "Process binary osreldate"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, + "Process signal trampoline location"); Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Tue Nov 26 19:38:42 2013 (r258660) +++ head/sys/sys/sysctl.h Tue Nov 26 19:47:09 2013 (r258661) @@ -530,6 +530,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ #define KERN_PROC_OSREL 40 /* osreldate for process binary */ +#define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ /* * KERN_IPC identifiers Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Tue Nov 26 19:38:42 2013 (r258660) +++ head/sys/sys/user.h Tue Nov 26 19:47:09 2013 (r258661) @@ -498,6 +498,12 @@ struct kinfo_kstack { int _kkst_ispare[16]; /* Space for more stuff. */ }; +struct kinfo_sigtramp { + void *ksigtramp_start; + void *ksigtramp_end; + void *ksigtramp_spare[4]; +}; + #ifdef _KERNEL /* Flags for kern_proc_out function. */ #define KERN_PROC_NOTHREADS 0x1 From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 19:51:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D23AA7; Tue, 26 Nov 2013 19:51:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB18D2878; Tue, 26 Nov 2013 19:51:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJpr5j013267; Tue, 26 Nov 2013 19:51:53 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJpr6E013266; Tue, 26 Nov 2013 19:51:53 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201311261951.rAQJpr6E013266@svn.freebsd.org> From: Joel Dahl Date: Tue, 26 Nov 2013 19:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258662 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:51:54 -0000 Author: joel (doc committer) Date: Tue Nov 26 19:51:53 2013 New Revision: 258662 URL: http://svnweb.freebsd.org/changeset/base/258662 Log: mdoc: sort sections. Modified: head/share/man/man4/u3g.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Tue Nov 26 19:47:09 2013 (r258661) +++ head/share/man/man4/u3g.4 Tue Nov 26 19:51:53 2013 (r258662) @@ -103,10 +103,6 @@ and .Xr usb_quirk 4 , .Xr devd 8 , .Xr usbconfig 8 -.Sh BUGS -The automatic mode switch from disk mode to modem mode does not work unless -the driver is either built into the kernel or loaded before the device is -connected. .Sh HISTORY The .Nm @@ -125,3 +121,7 @@ driver was written by and .An Nick Hibma Aq n_hibma@FreeBSD.org . Hardware for testing was provided by AnyWi Technologies, Leiden, NL. +.Sh BUGS +The automatic mode switch from disk mode to modem mode does not work unless +the driver is either built into the kernel or loaded before the device is +connected. From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 19:54:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA3F4BFE; Tue, 26 Nov 2013 19:54:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B012B288A; Tue, 26 Nov 2013 19:54:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQJsCmK013591; Tue, 26 Nov 2013 19:54:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQJsC3J013590; Tue, 26 Nov 2013 19:54:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311261954.rAQJsC3J013590@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Nov 2013 19:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258663 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:54:12 -0000 Author: kib Date: Tue Nov 26 19:54:12 2013 New Revision: 258663 URL: http://svnweb.freebsd.org/changeset/base/258663 Log: Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. The code would be more correct if using sysctl for the target process instead of inspecting gdb' own trampoline, but the current change is least intrusive and currently, we always initialize the native ABI sysvec first, which means that trampoline location for FreeBSD/amd64 ABI is relatively stable. Similar change will benefit libunwind. Analyzed by: avg Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/contrib/gdb/gdb/amd64fbsd-nat.c Modified: head/contrib/gdb/gdb/amd64fbsd-nat.c ============================================================================== --- head/contrib/gdb/gdb/amd64fbsd-nat.c Tue Nov 26 19:51:53 2013 (r258662) +++ head/contrib/gdb/gdb/amd64fbsd-nat.c Tue Nov 26 19:54:12 2013 (r258663) @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_PROCFS_H @@ -212,24 +213,23 @@ Please report this to . SC_RBP_OFFSET = offset; - /* FreeBSD provides a kern.ps_strings sysctl that we can use to + /* FreeBSD provides a kern.proc.sigtramp sysctl that we can use to locate the sigtramp. That way we can still recognize a sigtramp - if its location is changed in a new kernel. Of course this is - still based on the assumption that the sigtramp is placed - directly under the location where the program arguments and - environment can be found. */ + if its location is changed in a new kernel. */ { - int mib[2]; - long ps_strings; + int mib[4]; + struct kinfo_sigtramp kst; size_t len; mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_SIGTRAMP; + mib[3] = getpid(); + len = sizeof (kst); + if (sysctl (mib, sizeof(mib) / sizeof(mib[0]), &kst, &len, NULL, 0) == 0) { - amd64fbsd_sigtramp_start_addr = ps_strings - 32; - amd64fbsd_sigtramp_end_addr = ps_strings; + amd64fbsd_sigtramp_start_addr = kst.ksigtramp_start; + amd64fbsd_sigtramp_end_addr = kst.ksigtramp_end; } } } From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 20:03:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02122FE9; Tue, 26 Nov 2013 20:03:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E61EC291B; Tue, 26 Nov 2013 20:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQK3P22017183; Tue, 26 Nov 2013 20:03:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQK3Pg8017182; Tue, 26 Nov 2013 20:03:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311262003.rAQK3Pg8017182@svn.freebsd.org> From: Xin LI Date: Tue, 26 Nov 2013 20:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258664 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 20:03:26 -0000 Author: delphij Date: Tue Nov 26 20:03:25 2013 New Revision: 258664 URL: http://svnweb.freebsd.org/changeset/base/258664 Log: Create /var/cache with mode 0755 instead of 0750. This directory is used by many third party applications and having permission 0750 makes it impossible to drop group privileges. MFC after: 3 days Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Tue Nov 26 19:54:12 2013 (r258663) +++ head/etc/mtree/BSD.var.dist Tue Nov 26 20:03:25 2013 (r258664) @@ -28,7 +28,7 @@ /set gname=wheel backups .. - cache + cache mode=0755 .. crash .. From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 20:27:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 176CCCA8; Tue, 26 Nov 2013 20:27:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06D982ADC; Tue, 26 Nov 2013 20:27:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQKRvuQ024880; Tue, 26 Nov 2013 20:27:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQKRvYi024879; Tue, 26 Nov 2013 20:27:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311262027.rAQKRvYi024879@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 26 Nov 2013 20:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258666 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 20:27:58 -0000 Author: glebius Date: Tue Nov 26 20:27:57 2013 New Revision: 258666 URL: http://svnweb.freebsd.org/changeset/base/258666 Log: Fix build, attempt two. Modified: head/sys/fs/nfsclient/nfs_kdtrace.h Modified: head/sys/fs/nfsclient/nfs_kdtrace.h ============================================================================== --- head/sys/fs/nfsclient/nfs_kdtrace.h Tue Nov 26 20:09:43 2013 (r258665) +++ head/sys/fs/nfsclient/nfs_kdtrace.h Tue Nov 26 20:27:57 2013 (r258666) @@ -32,9 +32,6 @@ #ifndef _NFSCL_NFS_KDTRACE_H_ #define _NFSCL_NFS_KDTRACE_H_ -#ifdef KDTRACE_HOOKS -#include - /* * Definitions for NFS access cache probes. */ @@ -42,6 +39,16 @@ extern uint32_t nfscl_accesscache_flush_ extern uint32_t nfscl_accesscache_get_hit_id; extern uint32_t nfscl_accesscache_get_miss_id; extern uint32_t nfscl_accesscache_load_done_id; +/* + * Definitions for NFS attribute cache probes. + */ +extern uint32_t nfscl_attrcache_flush_done_id; +extern uint32_t nfscl_attrcache_get_hit_id; +extern uint32_t nfscl_attrcache_get_miss_id; +extern uint32_t nfscl_attrcache_load_done_id; + +#ifdef KDTRACE_HOOKS +#include #define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp) do { \ if (dtrace_nfscl_accesscache_flush_done_probe != NULL) \ From owner-svn-src-head@FreeBSD.ORG Tue Nov 26 22:41:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F310C517; Tue, 26 Nov 2013 22:41:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E238C23F5; Tue, 26 Nov 2013 22:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQMfeT6072517; Tue, 26 Nov 2013 22:41:40 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQMfeP7072516; Tue, 26 Nov 2013 22:41:40 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311262241.rAQMfeP7072516@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 26 Nov 2013 22:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258667 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 22:41:41 -0000 Author: pluknet Date: Tue Nov 26 22:41:40 2013 New Revision: 258667 URL: http://svnweb.freebsd.org/changeset/base/258667 Log: - Nuke a second copy of nfscl_attrcache extern declarations from under ifdef KDTRACE_HOOKS. This fixes kernel build with options KDTRACE_HOOKS. - Fix style inconsistencies. Modified: head/sys/fs/nfsclient/nfs_kdtrace.h Modified: head/sys/fs/nfsclient/nfs_kdtrace.h ============================================================================== --- head/sys/fs/nfsclient/nfs_kdtrace.h Tue Nov 26 20:27:57 2013 (r258666) +++ head/sys/fs/nfsclient/nfs_kdtrace.h Tue Nov 26 22:41:40 2013 (r258667) @@ -39,13 +39,14 @@ extern uint32_t nfscl_accesscache_flush_ extern uint32_t nfscl_accesscache_get_hit_id; extern uint32_t nfscl_accesscache_get_miss_id; extern uint32_t nfscl_accesscache_load_done_id; + /* * Definitions for NFS attribute cache probes. */ -extern uint32_t nfscl_attrcache_flush_done_id; -extern uint32_t nfscl_attrcache_get_hit_id; -extern uint32_t nfscl_attrcache_get_miss_id; -extern uint32_t nfscl_attrcache_load_done_id; +extern uint32_t nfscl_attrcache_flush_done_id; +extern uint32_t nfscl_attrcache_get_hit_id; +extern uint32_t nfscl_attrcache_get_miss_id; +extern uint32_t nfscl_attrcache_load_done_id; #ifdef KDTRACE_HOOKS #include @@ -77,14 +78,6 @@ extern uint32_t nfscl_attrcache_load_don (rmode), (error)); \ } while (0) -/* - * Definitions for NFS attribute cache probes. - */ -extern uint32_t nfscl_attrcache_flush_done_id; -extern uint32_t nfscl_attrcache_get_hit_id; -extern uint32_t nfscl_attrcache_get_miss_id; -extern uint32_t nfscl_attrcache_load_done_id; - #define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp) do { \ if (dtrace_nfscl_attrcache_flush_done_probe != NULL) \ (dtrace_nfscl_attrcache_flush_done_probe)( \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 00:21:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B572ADF7; Wed, 27 Nov 2013 00:21:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9544D2989; Wed, 27 Nov 2013 00:21:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR0LcL5009604; Wed, 27 Nov 2013 00:21:38 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR0LcX4009601; Wed, 27 Nov 2013 00:21:38 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201311270021.rAR0LcX4009601@svn.freebsd.org> From: Peter Grehan Date: Wed, 27 Nov 2013 00:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258668 - in head/usr.sbin: bhyve bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 00:21:38 -0000 Author: grehan Date: Wed Nov 27 00:21:37 2013 New Revision: 258668 URL: http://svnweb.freebsd.org/changeset/base/258668 Log: Allow bhyve and bhyveload to attach to tty devices. bhyveload: introduce the -c parameter to select a tty for output (or "stdio") bhyve: allow the puc and lpc-com backends to accept a tty in addition to "stdio" When used in conjunction with the null-modem device, nmdm(4), this allows attach/detach to the guest console and multiple concurrent serial ports. kgdb on a serial port is now functional. Reviewed by: neel Requested by: Almost everyone that has used bhyve MFC after: 10.0 Modified: head/usr.sbin/bhyve/uart_emul.c head/usr.sbin/bhyveload/bhyveload.8 head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyve/uart_emul.c ============================================================================== --- head/usr.sbin/bhyve/uart_emul.c Tue Nov 26 22:41:40 2013 (r258667) +++ head/usr.sbin/bhyve/uart_emul.c Wed Nov 27 00:21:37 2013 (r258668) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -67,6 +68,7 @@ __FBSDID("$FreeBSD$"); #define FIFOSZ 16 static bool uart_stdio; /* stdio in use for i/o */ +static struct termios tio_stdio_orig; static struct { int baseaddr; @@ -87,6 +89,12 @@ struct fifo { int size; /* size of the fifo */ }; +struct ttyfd { + bool opened; + int fd; /* tty device file descriptor */ + struct termios tio_orig, tio_new; /* I/O Terminals */ +}; + struct uart_softc { pthread_mutex_t mtx; /* protects all softc elements */ uint8_t data; /* Data register (R/W) */ @@ -103,8 +111,7 @@ struct uart_softc { struct fifo rxfifo; - bool opened; - bool stdio; + struct ttyfd tty; bool thre_int_pending; /* THRE interrupt pending */ void *arg; @@ -114,38 +121,41 @@ struct uart_softc { static void uart_drain(int fd, enum ev_type ev, void *arg); -static struct termios tio_orig, tio_new; /* I/O Terminals */ - static void ttyclose(void) { - tcsetattr(STDIN_FILENO, TCSANOW, &tio_orig); + tcsetattr(STDIN_FILENO, TCSANOW, &tio_stdio_orig); } static void -ttyopen(void) +ttyopen(struct ttyfd *tf) { - tcgetattr(STDIN_FILENO, &tio_orig); + tcgetattr(tf->fd, &tf->tio_orig); - cfmakeraw(&tio_new); - tcsetattr(STDIN_FILENO, TCSANOW, &tio_new); + tf->tio_new = tf->tio_orig; + cfmakeraw(&tf->tio_new); + tf->tio_new.c_cflag |= CLOCAL; + tcsetattr(tf->fd, TCSANOW, &tf->tio_new); - atexit(ttyclose); + if (tf->fd == STDIN_FILENO) { + tio_stdio_orig = tf->tio_orig; + atexit(ttyclose); + } } static bool -tty_char_available(void) +tty_char_available(struct ttyfd *tf) { fd_set rfds; struct timeval tv; FD_ZERO(&rfds); - FD_SET(STDIN_FILENO, &rfds); + FD_SET(tf->fd, &rfds); tv.tv_sec = 0; tv.tv_usec = 0; - if (select(STDIN_FILENO + 1, &rfds, NULL, NULL, &tv) > 0 ) { + if (select(tf->fd + 1, &rfds, NULL, NULL, &tv) > 0 ) { return (true); } else { return (false); @@ -153,12 +163,12 @@ tty_char_available(void) } static int -ttyread(void) +ttyread(struct ttyfd *tf) { char rb; - if (tty_char_available()) { - read(STDIN_FILENO, &rb, 1); + if (tty_char_available(tf)) { + read(tf->fd, &rb, 1); return (rb & 0xff); } else { return (-1); @@ -166,10 +176,10 @@ ttyread(void) } static void -ttywrite(unsigned char wb) +ttywrite(struct ttyfd *tf, unsigned char wb) { - (void)write(STDIN_FILENO, &wb, 1); + (void)write(tf->fd, &wb, 1); } static void @@ -226,10 +236,8 @@ uart_opentty(struct uart_softc *sc) { struct mevent *mev; - assert(!sc->opened && sc->stdio); - - ttyopen(); - mev = mevent_add(STDIN_FILENO, EVF_READ, uart_drain, sc); + ttyopen(&sc->tty); + mev = mevent_add(sc->tty.fd, EVF_READ, uart_drain, sc); assert(mev); } @@ -294,7 +302,7 @@ uart_drain(int fd, enum ev_type ev, void sc = arg; - assert(fd == STDIN_FILENO); + assert(fd == sc->tty.fd); assert(ev == EVF_READ); /* @@ -305,10 +313,10 @@ uart_drain(int fd, enum ev_type ev, void pthread_mutex_lock(&sc->mtx); if ((sc->mcr & MCR_LOOPBACK) != 0) { - (void) ttyread(); + (void) ttyread(&sc->tty); } else { while (fifo_available(&sc->rxfifo) && - ((ch = ttyread()) != -1)) { + ((ch = ttyread(&sc->tty)) != -1)) { fifo_putchar(&sc->rxfifo, ch); } uart_toggle_intr(sc); @@ -323,12 +331,6 @@ uart_write(struct uart_softc *sc, int of int fifosz; uint8_t msr; - /* Open terminal */ - if (!sc->opened && sc->stdio) { - uart_opentty(sc); - sc->opened = true; - } - pthread_mutex_lock(&sc->mtx); /* @@ -351,8 +353,8 @@ uart_write(struct uart_softc *sc, int of if (sc->mcr & MCR_LOOPBACK) { if (fifo_putchar(&sc->rxfifo, value) != 0) sc->lsr |= LSR_OE; - } else if (sc->stdio) { - ttywrite(value); + } else if (sc->tty.opened) { + ttywrite(&sc->tty, value); } /* else drop on floor */ sc->thre_int_pending = true; break; @@ -459,12 +461,6 @@ uart_read(struct uart_softc *sc, int off { uint8_t iir, intr_reason, reg; - /* Open terminal */ - if (!sc->opened && sc->stdio) { - uart_opentty(sc); - sc->opened = true; - } - pthread_mutex_lock(&sc->mtx); /* @@ -581,19 +577,47 @@ uart_init(uart_intr_func_t intr_assert, return (sc); } +static int +uart_tty_backend(struct uart_softc *sc, const char *opts) +{ + int fd; + int retval; + + retval = -1; + + fd = open(opts, O_RDWR); + if (fd > 0 && isatty(fd)) { + sc->tty.fd = fd; + sc->tty.opened = true; + retval = 0; + } + + return (retval); +} + int uart_set_backend(struct uart_softc *sc, const char *opts) { - /* - * XXX one stdio backend supported at this time. - */ + int retval; + + retval = -1; + if (opts == NULL) return (0); - if (strcmp("stdio", opts) == 0 && !uart_stdio) { - sc->stdio = true; - uart_stdio = true; - return (0); - } else - return (-1); + if (strcmp("stdio", opts) == 0) { + if (!uart_stdio) { + sc->tty.fd = STDIN_FILENO; + sc->tty.opened = true; + uart_stdio = true; + retval = 0; + } + } else if (uart_tty_backend(sc, opts) == 0) { + retval = 0; + } + + if (retval == 0) + uart_opentty(sc); + + return (retval); } Modified: head/usr.sbin/bhyveload/bhyveload.8 ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.8 Tue Nov 26 22:41:40 2013 (r258667) +++ head/usr.sbin/bhyveload/bhyveload.8 Wed Nov 27 00:21:37 2013 (r258668) @@ -39,6 +39,7 @@ guest inside a bhyve virtual machine .Op Fl d Ar disk-path .Op Fl h Ar host-path .Op Fl e Ar name=value +.Op Fl c Ar cons-dev .Ar vmname .Sh DESCRIPTION .Nm @@ -100,6 +101,16 @@ to .Pp The option may be used more than once to set more than one environment variable. +.It Fl c Ar cons-dev +.Ar cons-dev +is a +.Xr tty 4 +device to use for +.Nm +terminal I/O. +.Pp +The text string "stdio" is also accepted and selects the use of +unbuffered standard I/O. This is the default value. .El .Sh EXAMPLES To create a virtual machine named @@ -109,10 +120,23 @@ that boots off the ISO image and has 1GB memory allocated to it: .Pp .Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm" +.Pp +To create a virtual machine named +.Ar test-vm +with 256MB of memory allocated, the guest root filesystem under the host +directory +.Pa /user/images/test +and terminal I/O sent to the +.Xr nmdm 4 +device +.Pa /dev/nmdm1B +.Pp +.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm .Sh SEE ALSO .Xr bhyve 4 , .Xr bhyve 8 , .Xr loader 8 , +.Xr nmdm 4, .Xr vmm 4 .Sh HISTORY .Nm Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Tue Nov 26 22:41:40 2013 (r258667) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Nov 27 00:21:37 2013 (r258668) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); static char *host_base = "/"; static struct termios term, oldterm; static int disk_fd = -1; +static int consin_fd, consout_fd; static char *vmname, *progname; static struct vmctx *ctx; @@ -108,7 +109,7 @@ cb_putc(void *arg, int ch) { char c = ch; - write(1, &c, 1); + (void) write(consout_fd, &c, 1); } static int @@ -116,7 +117,7 @@ cb_getc(void *arg) { char c; - if (read(0, &c, 1) == 1) + if (read(consin_fd, &c, 1) == 1) return (c); return (-1); } @@ -126,7 +127,7 @@ cb_poll(void *arg) { int n; - if (ioctl(0, FIONREAD, &n) >= 0) + if (ioctl(consin_fd, FIONREAD, &n) >= 0) return (n > 0); return (0); } @@ -488,7 +489,7 @@ static void cb_exit(void *arg, int v) { - tcsetattr(0, TCSAFLUSH, &oldterm); + tcsetattr(consout_fd, TCSAFLUSH, &oldterm); exit(v); } @@ -564,13 +565,45 @@ static struct loader_callbacks cb = { .getenv = cb_getenv, }; +static int +altcons_open(char *path) +{ + struct stat sb; + int err; + int fd; + + /* + * Allow stdio to be passed in so that the same string + * can be used for the bhyveload console and bhyve com-port + * parameters + */ + if (!strcmp(path, "stdio")) + return (0); + + err = stat(path, &sb); + if (err == 0) { + if (!S_ISCHR(sb.st_mode)) + err = ENOTSUP; + else { + fd = open(path, O_RDWR | O_NONBLOCK); + if (fd < 0) + err = errno; + else + consin_fd = consout_fd = fd; + } + } + + return (err); +} + static void usage(void) { fprintf(stderr, "usage: %s [-m mem-size] [-d ] [-h ]\n" - " %*s [-e ] \n", progname, + " %*s [-e ] [-c ] \n", + progname, (int)strlen(progname), ""); exit(1); } @@ -589,8 +622,16 @@ main(int argc, char** argv) mem_size = 256 * MB; disk_image = NULL; - while ((opt = getopt(argc, argv, "d:e:h:m:")) != -1) { + consin_fd = STDIN_FILENO; + consout_fd = STDOUT_FILENO; + + while ((opt = getopt(argc, argv, "c:d:e:h:m:")) != -1) { switch (opt) { + case 'c': + error = altcons_open(optarg); + if (error != 0) + errx(EX_USAGE, "Could not open '%s'", optarg); + break; case 'd': disk_image = optarg; break; @@ -640,11 +681,13 @@ main(int argc, char** argv) exit(1); } - tcgetattr(0, &term); + tcgetattr(consout_fd, &term); oldterm = term; - term.c_lflag &= ~(ICANON|ECHO); - term.c_iflag &= ~ICRNL; - tcsetattr(0, TCSAFLUSH, &term); + cfmakeraw(&term); + term.c_cflag |= CLOCAL; + + tcsetattr(consout_fd, TCSAFLUSH, &term); + h = dlopen("/boot/userboot.so", RTLD_LOCAL); if (!h) { printf("%s\n", dlerror()); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 03:05:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B56F709; Wed, 27 Nov 2013 03:05:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B59B21F5; Wed, 27 Nov 2013 03:05:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR35O2B067299; Wed, 27 Nov 2013 03:05:24 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR35OvV067298; Wed, 27 Nov 2013 03:05:24 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311270305.rAR35OvV067298@svn.freebsd.org> From: Glen Barber Date: Wed, 27 Nov 2013 03:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258669 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 03:05:25 -0000 Author: gjb Date: Wed Nov 27 03:05:24 2013 New Revision: 258669 URL: http://svnweb.freebsd.org/changeset/base/258669 Log: Document the dvdrom target and NODVD variable, forgotten with r258310. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Wed Nov 27 00:21:37 2013 (r258668) +++ head/release/Makefile Wed Nov 27 03:05:24 2013 (r258669) @@ -4,6 +4,7 @@ # # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) +# dvdrom: Builds release DVD-ROM media (dvd1.iso) # memstick: Builds memory stick image (memstick.img) # mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) @@ -18,6 +19,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation +# NODVD: if set, do not generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 04:08:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D222CEBD; Wed, 27 Nov 2013 04:08:04 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBA5248D; Wed, 27 Nov 2013 04:08:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rAR47haZ023302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 27 Nov 2013 08:07:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rAR47hpj023301; Wed, 27 Nov 2013 08:07:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 27 Nov 2013 08:07:43 +0400 From: Gleb Smirnoff To: Peter Grehan Subject: Re: svn commit: r258668 - in head/usr.sbin: bhyve bhyveload Message-ID: <20131127040743.GS90895@FreeBSD.org> References: <201311270021.rAR0LcX4009601@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311270021.rAR0LcX4009601@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 04:08:04 -0000 On Wed, Nov 27, 2013 at 12:21:38AM +0000, Peter Grehan wrote: P> Author: grehan P> Date: Wed Nov 27 00:21:37 2013 P> New Revision: 258668 P> URL: http://svnweb.freebsd.org/changeset/base/258668 P> P> Log: P> Allow bhyve and bhyveload to attach to tty devices. P> P> bhyveload: introduce the -c parameter P> to select a tty for output (or "stdio") P> P> bhyve: allow the puc and lpc-com backends to P> accept a tty in addition to "stdio" P> P> When used in conjunction with the null-modem device, P> nmdm(4), this allows attach/detach to the guest console P> and multiple concurrent serial ports. kgdb on a serial P> port is now functional. P> P> Reviewed by: neel P> Requested by: Almost everyone that has used bhyve P> MFC after: 10.0 Wow! Thanks! Thanks! Thanks! Now I owe you multiple consumers for vmnet(4) :) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 04:54:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81291965; Wed, 27 Nov 2013 04:54:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7103B269F; Wed, 27 Nov 2013 04:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR4sOKl004105; Wed, 27 Nov 2013 04:54:24 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR4sOqI004103; Wed, 27 Nov 2013 04:54:24 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311270454.rAR4sOqI004103@svn.freebsd.org> From: Peter Wemm Date: Wed, 27 Nov 2013 04:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258672 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 04:54:24 -0000 Author: peter Date: Wed Nov 27 04:54:23 2013 New Revision: 258672 URL: http://svnweb.freebsd.org/changeset/base/258672 Log: At great personal risk, change the default for LIB32 from yes to no. As mentioned in UPDATING, you can even do it as an as-needed operation after doing a buildworld/installworld. You can set WITH_LIB32=yes in make.conf or src.conf. Modified: head/UPDATING head/share/mk/bsd.own.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Nov 27 04:34:44 2013 (r258671) +++ head/UPDATING Wed Nov 27 04:54:23 2013 (r258672) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20131126: + WITH_LIB32 has been changed to WITHOUT_LIB32 by default. You + can set WITH_LIB32=yes in make.conf or src.conf, or if you need + to do a quick 32 bit library build you can do a 'make build32' + and 'make install32' as a separate step AFTER doing a + buildworld/installworld. + 20131108: The WITHOUT_ATF build knob has been removed and its functionality has been subsumed into the more generic WITHOUT_TESTS. If you were Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Nov 27 04:34:44 2013 (r258671) +++ head/share/mk/bsd.own.mk Wed Nov 27 04:54:23 2013 (r258672) @@ -303,7 +303,6 @@ __DEFAULT_YES_OPTIONS = \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ - LIB32 \ LIBPTHREAD \ LIBTHR \ LOCALES \ @@ -369,6 +368,7 @@ __DEFAULT_NO_OPTIONS = \ GPL_DTC \ HESIOD \ INSTALL_AS_USER \ + LIB32 \ LLDB \ NAND \ OFED \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 05:00:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 526FEC4B; Wed, 27 Nov 2013 05:00:16 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A76D326E9; Wed, 27 Nov 2013 05:00:15 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id uz6so6850904obc.37 for ; Tue, 26 Nov 2013 21:00:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7wp8Ot4d3RPOEuzGIKE8Jz7/RDGhPDbWHY7y/6mBhm0=; b=rYdUJseyUwPHWqcQklRUoisRlU/voDrjkEVu56SE2PRXK78VJrYZJnNkvZiZBe5msk t/dLUItELVpt+dIhsjvwWuAiv1RrnF7x57H2g0TVkwJHjhGAIkHovwcqVxRzn6Zlmzzx nTVppQdatBEq0cIU1cpNvgv9YXGe9uIQiXz/LxwdV6MtBYe7lERQseDdfldx+2aRPzmz saZfxjWp5fyunamrXBxnfd/jkk6Bwv+Z9HiHdtMt5KxYvP9iKl3PWnBfPjXIV+aU9VWn KPRPzD2pjNEARv8GBunsYArF+m3CI8U59rvzEPK7m4AIu3jKYPobj07ne3ac3kXxVxiq 4eqQ== MIME-Version: 1.0 X-Received: by 10.60.145.241 with SMTP id sx17mr8276633oeb.57.1385528414314; Tue, 26 Nov 2013 21:00:14 -0800 (PST) Received: by 10.182.153.65 with HTTP; Tue, 26 Nov 2013 21:00:14 -0800 (PST) In-Reply-To: References: <201311182258.rAIMwEFd048783@svn.freebsd.org> <528D6173.4080406@freebsd.org> Date: Tue, 26 Nov 2013 21:00:14 -0800 Message-ID: Subject: Re: svn commit: r258328 - head/sys/net From: Vijay Singh To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: Adrian Chadd , "src-committers@freebsd.org" , FreeBSD Net , "svn-src-all@freebsd.org" , "George V. Neville-Neil" , "freebsd-arch@freebsd.org" , "svn-src-head@freebsd.org" , Julian Elischer X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 05:00:16 -0000 Sorry to join this late, I've been busy preparing other patches to roll out. I am OK either way. FWIW we're running with this @netapp for more than 2 years, but we do use only very few drivers. I would like to avoid the proliferation of APIs but Robert's point also does make sense. On Sat, Nov 23, 2013 at 2:57 AM, Robert Watson wrote: > On Wed, 20 Nov 2013, Julian Elischer wrote: > > After that it'd be nice to write a set of mbuf list macros for abstract >>> the whole queue, dequeue, concat, iterate, etc (like sys/queue.h, but for >>> mbufs.) >>> >>> What do people think? >>> >>> (I've been doing it for m->next chained things, but not m->m_nextpkt >>> things..) >>> >> >> I was thinking: new interfaces.. (your -multi names sound good). macros >> for handling said lists so that people don't screw them up Old drivers run >> with no change. >> > > To me, the name "multi" is ambiguous: could be multicast. If we call the > new datastructure "mbqueue" or "mqueue", then we should name the method > ether_input_mbqueue or ether_input_mqueue. > > Robert > > > > > > >> >>> >>> >>> -adrian >>> >>> >>> On 18 November 2013 14:58, George V. Neville-Neil >>> wrote: >>> >>>> Author: gnn >>>> Date: Mon Nov 18 22:58:14 2013 >>>> New Revision: 258328 >>>> URL: http://svnweb.freebsd.org/changeset/base/258328 >>>> >>>> Log: >>>> Allow ethernet drivers to pass in packets connected via the nextpkt >>>> pointer. >>>> Handling packets in this way allows drivers to amortize work during >>>> packet reception. >>>> >>>> Submitted by: Vijay Singh >>>> Sponsored by: NetApp >>>> >>>> Modified: >>>> head/sys/net/if_ethersubr.c >>>> >>>> Modified: head/sys/net/if_ethersubr.c >>>> ============================================================ >>>> ================== >>>> --- head/sys/net/if_ethersubr.c Mon Nov 18 22:55:50 2013 >>>> (r258327) >>>> +++ head/sys/net/if_ethersubr.c Mon Nov 18 22:58:14 2013 >>>> (r258328) >>>> @@ -708,13 +708,25 @@ static void >>>> ether_input(struct ifnet *ifp, struct mbuf *m) >>>> { >>>> >>>> + struct mbuf *mn; >>>> + >>>> /* >>>> - * We will rely on rcvif being set properly in the deferred >>>> context, >>>> - * so assert it is correct here. >>>> + * The drivers are allowed to pass in a chain of packets linked >>>> with >>>> + * m_nextpkt. We split them up into separate packets here and >>>> pass >>>> + * them up. This allows the drivers to amortize the receive >>>> lock. >>>> */ >>>> - KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", >>>> __func__)); >>>> + while (m) { >>>> + mn = m->m_nextpkt; >>>> + m->m_nextpkt = NULL; >>>> >>>> - netisr_dispatch(NETISR_ETHER, m); >>>> + /* >>>> + * We will rely on rcvif being set properly in the >>>> deferred context, >>>> + * so assert it is correct here. >>>> + */ >>>> + KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet >>>> mismatch", __func__)); >>>> + netisr_dispatch(NETISR_ETHER, m); >>>> + m = mn; >>>> + } >>>> } >>>> >>>> /* >>>> >>> >> >> _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 05:04:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 689F7EF3; Wed, 27 Nov 2013 05:04:02 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FD072745; Wed, 27 Nov 2013 05:04:02 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id B00C2D994; Wed, 27 Nov 2013 05:04:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us B00C2D994 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Wed, 27 Nov 2013 00:03:58 -0500 From: Glen Barber To: Peter Wemm Subject: Re: svn commit: r258672 - in head: . share/mk Message-ID: <20131127050358.GG1710@glenbarber.us> References: <201311270454.rAR4sOqI004103@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GUPx2O/K0ibUojHx" Content-Disposition: inline In-Reply-To: <201311270454.rAR4sOqI004103@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 05:04:02 -0000 --GUPx2O/K0ibUojHx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 27, 2013 at 04:54:24AM +0000, Peter Wemm wrote: > Author: peter > Date: Wed Nov 27 04:54:23 2013 > New Revision: 258672 > URL: http://svnweb.freebsd.org/changeset/base/258672 >=20 > Log: > At great personal risk, change the default for LIB32 from yes to no. As > mentioned in UPDATING, you can even do it as an as-needed operation aft= er > doing a buildworld/installworld. You can set WITH_LIB32=3Dyes in make.= conf > or src.conf. >=20 Thank you. Long overdue, IMHO. Glen --GUPx2O/K0ibUojHx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSlX0+AAoJELls3eqvi17Qu04P/19mRAPS8bBwECuBJyaglt8X 8QS1EmASQ0zOytJJ3Jl7WPAWTfWkoh9MG9qW7nb+bL8o2CxkJTH0nosvno77enqa ZiJl98CEKz8ZTK6Be0donnCpJXrKOzikI4ZSZnvz+B8FUDCVTmJLwf+tSaIVyJrS fiZgNoADMNx8L2bY/pdiYKGRmy9dSvh0QcXJ+/DRMpRHr/HmyX9uDX5QTiRFBftx jm7oQrPKeLpuSsr6VW9p7w7YwTJ64L0zB/6d8EkH+zTrFqCxMOQi2hTgtdlzdeNg w5Ebm8OB4fvI4YHX0ID6rmvbacRdX4ettTVUe29r3OxfPJaq1YHG6Aiynw6NSXck FHyb0s0aMIfnJUxeHK2BlmZauLWfMAdu2pHBBuYGXPDPhvXMgs4N6ndB6VQlGthT z1OVHp577nUflRVYeEesB0H8smjSzOsfl1IOCbTGDFDQOE2OiAKGEUvTSfUUchCZ d01l4eKVaKjIx2GikVkL/jHMzny55wUx93IztjYLDY0iM5YerqlxTaJXet39B9ug 3fk2sfoMN0CYCtouYZfd7QKwewAR636WLQ01x8DKzEsJDOq9ct7DjFLNRTkfDhZy S8/8QiHfhgWnzc6Fg3PNrta6ZYlUBBfMQtv/PKe6iIMdeZ6+qiE5coBsk26dvkC9 LvYlN5z2CPJIcuCG8as8 =/iOP -----END PGP SIGNATURE----- --GUPx2O/K0ibUojHx-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 06:07:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E828795; Wed, 27 Nov 2013 06:07:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E0362970; Wed, 27 Nov 2013 06:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR6749W028070; Wed, 27 Nov 2013 06:07:04 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR674i8028069; Wed, 27 Nov 2013 06:07:04 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201311270607.rAR674i8028069@svn.freebsd.org> From: Peter Grehan Date: Wed, 27 Nov 2013 06:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258673 - head/usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 06:07:04 -0000 Author: grehan Date: Wed Nov 27 06:07:03 2013 New Revision: 258673 URL: http://svnweb.freebsd.org/changeset/base/258673 Log: Don't create an initial value for the host filesystem of "/". This has the unintended effect of booting the host kernel if a disk image open fails. Discussed with: neel Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Nov 27 04:54:23 2013 (r258672) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Nov 27 06:07:03 2013 (r258673) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #define GB (1024 * 1024 * 1024UL) #define BSP 0 -static char *host_base = "/"; +static char *host_base; static struct termios term, oldterm; static int disk_fd = -1; static int consin_fd, consout_fd; From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 06:34:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 652A4E61 for ; Wed, 27 Nov 2013 06:34:38 +0000 (UTC) Received: from mail-pb0-x233.google.com (mail-pb0-x233.google.com [IPv6:2607:f8b0:400e:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 366942AA1 for ; Wed, 27 Nov 2013 06:34:38 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id up15so9649287pbc.24 for ; Tue, 26 Nov 2013 22:34:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type; bh=eli/bplyfeftzSM8spD/g0lIiX0njCt4v0MuG6HEXyI=; b=qpmuc+0uzKumQrYBElKalVcZ5SoS/UJIY3Evx21Mu777fHdkYXwY34vr0DBlmn4ChM cW3AQ8GcEn+xxepXbKtM+e7S+sNyVjfHJMOAebfmzfPLngUC/H957Rh8MAjB+/4vtPra g+CNDUvdnheMqI6dQnyg2NtjIfyrgRU8HRSB8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type; bh=eli/bplyfeftzSM8spD/g0lIiX0njCt4v0MuG6HEXyI=; b=k/e5sQESzx5JaO8xYp9kOrTJldNp4pZTiTfRCFsyzqE0TO9u588E4yC6Lls3pEPiMn jf49sOBg33v8/zLuMLz5nXrTbxxpPA3c6P3xAP8wPIqC8HBtesUZk3nJtGf7aHJmi4dy hBlNEeLEW0ikQZQR2rHmDWseeQZSUPHHCaMMSjw2vLAC7sURhQj/YxbbjEXOUcbJouFC VBFPDZxYCm48o9NK9UZoNX0OBaHXJ1bPY7mbYE9hX438UCHKrXIJKE8E5YlX1dv7SURL rKj+yNHpxTq4ydyvMreRRqTot0wEI2HxXkmu1EnLxd/NJbjVdS6WY6G9JfUNPigKRemQ Yf+g== X-Gm-Message-State: ALoCoQm1YEFGqALBgFUuyCBF04N6dNH5W4e2G9y0mMFxJodduwI4k46uMs3/tjFVse8lQK5VVrmg X-Received: by 10.68.253.67 with SMTP id zy3mr3442555pbc.137.1385534077727; Tue, 26 Nov 2013 22:34:37 -0800 (PST) Received: from hackintosh.wemm.org (c-71-198-8-135.hsd1.ca.comcast.net. [71.198.8.135]) by mx.google.com with ESMTPSA id hn5sm74239448pbb.25.2013.11.26.22.34.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Nov 2013 22:34:36 -0800 (PST) Message-ID: <52959276.7070803@wemm.org> Date: Tue, 26 Nov 2013 22:34:30 -0800 From: Peter Wemm Organization: World Domination in progress. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Glen Barber Subject: Re: svn commit: r258672 - in head: . share/mk References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> In-Reply-To: <20131127050358.GG1710@glenbarber.us> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6USLvdeCqoS4Ispk6xahsnQbS2wJi01Cu" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 06:34:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6USLvdeCqoS4Ispk6xahsnQbS2wJi01Cu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 11/26/13, 9:03 PM, Glen Barber wrote: > On Wed, Nov 27, 2013 at 04:54:24AM +0000, Peter Wemm wrote: >> Author: peter >> Date: Wed Nov 27 04:54:23 2013 >> New Revision: 258672 >> URL: http://svnweb.freebsd.org/changeset/base/258672 >> >> Log: >> At great personal risk, change the default for LIB32 from yes to no.= As >> mentioned in UPDATING, you can even do it as an as-needed operation = after >> doing a buildworld/installworld. You can set WITH_LIB32=3Dyes in ma= ke.conf >> or src.conf. >> >=20 > Thank you. Long overdue, IMHO. >=20 > Glen >=20 A slightly longer explanation of what I was thinking: - There's a new round of 'make -j' problems lurking in there. We are missing chunks of the ordering glue that cause libraries to be built in t= he right order when they depend on each other. - It's a waste of cpu time for the usual case, particularly for the 11.x cycle for the next 1-2 years. - We don't build them properly - we invent cpu flags etc. The usual use case for 32 bit binaries seems to be: - running a 32 bit chroot or jail - this is unaffected. - running old binaries, usually from 4.x or 6.x when the 64 bit port was really green - WITH_LIB32 doesn't actually help much with this because mo= st of the libraries are missing. It seems more likely we can do a better job with packages. With some massaging, we should be able to use the compat-6.x/i386 libraries as-is, = and solve the "old 4.x/6.x binary" issue in one go. However, ld-elf32.so.1 does require special handling. I have something i= n mind that might make this moot though. I suspect I've made the powerpc folks angry though... --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6F= JV UTF-8: for when a ' just won\342\200\231t do. ZFS must be the bacon of file systems. "everything's better with ZFS" --6USLvdeCqoS4Ispk6xahsnQbS2wJi01Cu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKVknsACgkQFRKuUnJ3cX+CTACgkuKEvYdsvsXI+fRYomC+9yHc LowAoJ1LWmFHqH28nCVcFS4nIwgqizCx =KAKi -----END PGP SIGNATURE----- --6USLvdeCqoS4Ispk6xahsnQbS2wJi01Cu-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 07:21:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFDD7A7; Wed, 27 Nov 2013 07:21:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E57E2C62; Wed, 27 Nov 2013 07:21:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR7LPlw054476; Wed, 27 Nov 2013 07:21:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR7LPrD054475; Wed, 27 Nov 2013 07:21:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311270721.rAR7LPrD054475@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 27 Nov 2013 07:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258675 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 07:21:25 -0000 Author: glebius Date: Wed Nov 27 07:21:25 2013 New Revision: 258675 URL: http://svnweb.freebsd.org/changeset/base/258675 Log: Fix build. Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Wed Nov 27 06:54:29 2013 (r258674) +++ head/sys/net/vnet.c Wed Nov 27 07:21:25 2013 (r258675) @@ -216,7 +216,7 @@ SDT_PROBE_DEFINE2(vnet, functions, vnet_ "int", "struct vnet *"); SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, "int", "struct vnet *"); -SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, entry, +SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return, "int"); #ifdef DDB From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 07:30:32 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79D4A9AC; Wed, 27 Nov 2013 07:30:32 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3470B2CB8; Wed, 27 Nov 2013 07:30:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA28900; Wed, 27 Nov 2013 09:30:28 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlZZs-0005AR-Ga; Wed, 27 Nov 2013 09:30:28 +0200 Message-ID: <52959F5C.1050101@FreeBSD.org> Date: Wed, 27 Nov 2013 09:29:32 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r258675 - head/sys/net References: <201311270721.rAR7LPrD054475@svn.freebsd.org> In-Reply-To: <201311270721.rAR7LPrD054475@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 07:30:32 -0000 on 27/11/2013 09:21 Gleb Smirnoff said the following: > Author: glebius > Date: Wed Nov 27 07:21:25 2013 > New Revision: 258675 > URL: http://svnweb.freebsd.org/changeset/base/258675 > > Log: > Fix build. > > Modified: > head/sys/net/vnet.c > > Modified: head/sys/net/vnet.c > ============================================================================== > --- head/sys/net/vnet.c Wed Nov 27 06:54:29 2013 (r258674) > +++ head/sys/net/vnet.c Wed Nov 27 07:21:25 2013 (r258675) > @@ -216,7 +216,7 @@ SDT_PROBE_DEFINE2(vnet, functions, vnet_ > "int", "struct vnet *"); > SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry, > "int", "struct vnet *"); > -SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, entry, > +SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return, > "int"); > > #ifdef DDB > Thank you for fixing this! And sorry that I did not notice the mistake in the code before the change. The probe was defined as "vnet, functions, vnet_destroy, return, entry, ..." and my sed script blindly changed "return, entry" to "entry". Another confirmation that "sname" was silly and that I need to do more pre-commit testing. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 07:37:51 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F419C30; Wed, 27 Nov 2013 07:37:51 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD072CDE; Wed, 27 Nov 2013 07:37:49 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA28991; Wed, 27 Nov 2013 09:37:46 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlZgv-0005B3-TD; Wed, 27 Nov 2013 09:37:45 +0200 Message-ID: <5295A111.50407@FreeBSD.org> Date: Wed, 27 Nov 2013 09:36:49 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Peter Wemm , Glen Barber Subject: Re: svn commit: r258672 - in head: . share/mk References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> In-Reply-To: <52959276.7070803@wemm.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 07:37:51 -0000 on 27/11/2013 08:34 Peter Wemm said the following: > On 11/26/13, 9:03 PM, Glen Barber wrote: >> On Wed, Nov 27, 2013 at 04:54:24AM +0000, Peter Wemm wrote: >>> Author: peter >>> Date: Wed Nov 27 04:54:23 2013 >>> New Revision: 258672 >>> URL: http://svnweb.freebsd.org/changeset/base/258672 >>> >>> Log: >>> At great personal risk, change the default for LIB32 from yes to no. As >>> mentioned in UPDATING, you can even do it as an as-needed operation after >>> doing a buildworld/installworld. You can set WITH_LIB32=yes in make.conf >>> or src.conf. >>> >> >> Thank you. Long overdue, IMHO. >> >> Glen >> > > A slightly longer explanation of what I was thinking: > > - There's a new round of 'make -j' problems lurking in there. We are > missing chunks of the ordering glue that cause libraries to be built in the > right order when they depend on each other. > - It's a waste of cpu time for the usual case, particularly for the 11.x > cycle for the next 1-2 years. Do this change and this point make sense if everyone building virtualbox (and perhaps running it) has to install lib32 anyway? pre-everything:: .if ${ARCH} == "amd64" .if !exists(/usr/lib32/libc.so) @${ECHO} 'Requires 32-bit libraries installed under /usr/lib32.' @${ECHO} 'Do: cd /usr/src; make build32 install32; /etc/rc.d/ldconfig restart' @${FALSE} .endif .endif Just in case, I have no clue why this is required. > - We don't build them properly - we invent cpu flags etc. > > The usual use case for 32 bit binaries seems to be: > - running a 32 bit chroot or jail - this is unaffected. > - running old binaries, usually from 4.x or 6.x when the 64 bit port was > really green - WITH_LIB32 doesn't actually help much with this because most > of the libraries are missing. > > It seems more likely we can do a better job with packages. With some > massaging, we should be able to use the compat-6.x/i386 libraries as-is, and > solve the "old 4.x/6.x binary" issue in one go. > > However, ld-elf32.so.1 does require special handling. I have something in > mind that might make this moot though. > > I suspect I've made the powerpc folks angry though... > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 07:51:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C97E1AE; Wed, 27 Nov 2013 07:51:03 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 967A52DA2; Wed, 27 Nov 2013 07:51:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rAR7oqlA014733; Wed, 27 Nov 2013 09:50:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rAR7oqlA014733 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rAR7opq2014727; Wed, 27 Nov 2013 09:50:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 27 Nov 2013 09:50:51 +0200 From: Konstantin Belousov To: Peter Wemm Subject: Re: svn commit: r258672 - in head: . share/mk Message-ID: <20131127075051.GU59496@kib.kiev.ua> References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ryZWRk5DZTcwGpL9" Content-Disposition: inline In-Reply-To: <52959276.7070803@wemm.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 07:51:03 -0000 --ryZWRk5DZTcwGpL9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 26, 2013 at 10:34:30PM -0800, Peter Wemm wrote: > On 11/26/13, 9:03 PM, Glen Barber wrote: > > On Wed, Nov 27, 2013 at 04:54:24AM +0000, Peter Wemm wrote: > >> Author: peter > >> Date: Wed Nov 27 04:54:23 2013 > >> New Revision: 258672 > >> URL: http://svnweb.freebsd.org/changeset/base/258672 > >> > >> Log: > >> At great personal risk, change the default for LIB32 from yes to no.= As > >> mentioned in UPDATING, you can even do it as an as-needed operation = after > >> doing a buildworld/installworld. You can set WITH_LIB32=3Dyes in ma= ke.conf > >> or src.conf. > >> > >=20 > > Thank you. Long overdue, IMHO. > >=20 > > Glen > >=20 >=20 > A slightly longer explanation of what I was thinking: >=20 > - There's a new round of 'make -j' problems lurking in there. We are > missing chunks of the ordering glue that cause libraries to be built in t= he > right order when they depend on each other. > - It's a waste of cpu time for the usual case, particularly for the 11.x > cycle for the next 1-2 years. Why ? > - We don't build them properly - we invent cpu flags etc. What do you mean there ? Do you reference the fact that lib32 build on amd64 assumes sse2 and all previous coprocessor extensions ? >=20 > The usual use case for 32 bit binaries seems to be: > - running a 32 bit chroot or jail - this is unaffected. > - running old binaries, usually from 4.x or 6.x when the 64 bit port was > really green - WITH_LIB32 doesn't actually help much with this because mo= st > of the libraries are missing. >=20 > It seems more likely we can do a better job with packages. With some > massaging, we should be able to use the compat-6.x/i386 libraries as-is, = and > solve the "old 4.x/6.x binary" issue in one go. >=20 > However, ld-elf32.so.1 does require special handling. I have something in > mind that might make this moot though. >=20 > I suspect I've made the powerpc folks angry though... I disagree with the change. It was not discussed, and the motivation presented ('the build has bugs') is not valid for removing a useful feature. All other OSes I am aware of implement multi-arch fully. For 10/11, we have quite good compat32 layer for non-managing interfaces, and have user-mode compilation environment. I think that the route to go forward is to have multi-arch for ports, or at least, enable to have 32bit ports installation on 64bit host. I think that this is step backward. --ryZWRk5DZTcwGpL9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSlaRaAAoJEJDCuSvBvK1BSNsP/iK+Ag9IsZh0i35y7nG8K2wd lg/L+qgL8bH2DWuNZMwhHQwM79M/C80w8jF0x9AWBZp8Y3RQwdNzecYnbPQbJ4v7 2xU9j8FyHgVYROwp8oTwKlZLltbrXlb0RfafFCas57eRFOq+m9OyncxITYwhucBS mWxuLyqaliBWDiI1ErFmPXhygsEEaCV74lZmZlIpXeeLt6HKG2K5nSsEZNUbRbVB tEjr/MroIHTQXeir7N8IHCkupuAoXfpKtYWaHhStcPVXcHIicBsvn9SnGRZv1joL w3WCe/Sb2k+i1fzuwr/UHesFqxO/4LjXkMWrwWxv+NMr4ChnJJgxFLDI/4qo1qNx xbWkL9u0gkJdZF/LCgHueJ6to52JM3yOnzrDl7sNnStua7kn7OD6fchKTZBz1LTx EpqNBKwNEFJdOAlEBWYAH1H3Y1YtCsslF0GnanlA+Gi9kG6ymOL62SsxBhZSg2pJ GhCazNYBviwSc4Ji+tu8ftURRPGRS6vIC73rlpdLjVbFHBMqqTkQuHcTGWb2duXC IciEoloMPnb/QwvWU7Zj7mKBDwfwDmiXKDN4CfanFEShgU5BMWhAQmifBBaX4GMy AEaIaGG8o1mH092S411MRwwGNMexDVxdxTPwj3e4kJOYHXomxvUalt5Ooh3r2YDA FQEG5pbkwwxcfiY2AihL =RwfC -----END PGP SIGNATURE----- --ryZWRk5DZTcwGpL9-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 08:39:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CDBCC1A; Wed, 27 Nov 2013 08:39:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C85A2065; Wed, 27 Nov 2013 08:39:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAR8dng9078954; Wed, 27 Nov 2013 08:39:49 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAR8dnoU078953; Wed, 27 Nov 2013 08:39:49 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311270839.rAR8dnoU078953@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 27 Nov 2013 08:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258676 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 08:39:49 -0000 Author: pluknet Date: Wed Nov 27 08:39:48 2013 New Revision: 258676 URL: http://svnweb.freebsd.org/changeset/base/258676 Log: Bandaid for compiling with gcc. Modified: head/sys/dev/sfxge/common/siena_nic.c Modified: head/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nic.c Wed Nov 27 07:21:25 2013 (r258675) +++ head/sys/dev/sfxge/common/siena_nic.c Wed Nov 27 08:39:48 2013 (r258676) @@ -589,6 +589,7 @@ siena_nic_probe( unsigned int mask; int rc; + mask = 0; /* XXX: pacify gcc */ EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); /* Read clear any assertion state */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 10:10:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1DC1BCE; Wed, 27 Nov 2013 10:10:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1BB925AB; Wed, 27 Nov 2013 10:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARAAPvT009969; Wed, 27 Nov 2013 10:10:25 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARAAPvD009968; Wed, 27 Nov 2013 10:10:25 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201311271010.rARAAPvD009968@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Wed, 27 Nov 2013 10:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258677 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 10:10:26 -0000 Author: melifaro Date: Wed Nov 27 10:10:25 2013 New Revision: 258677 URL: http://svnweb.freebsd.org/changeset/base/258677 Log: Fix key lookup in ipfw(8) broken since r232865. Print warning for IPv4 address strings which are valid in inet_aton() but not valid in inet_pton(). (1) Found by: Özkan KIRIK Submitted by: Ian Smith (1) MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Wed Nov 27 08:39:48 2013 (r258676) +++ head/sbin/ipfw/ipfw2.c Wed Nov 27 10:10:25 2013 (r258677) @@ -4274,13 +4274,24 @@ table_fill_xentry(char *arg, ipfw_table_ addrlen = sizeof(struct in6_addr); } else { /* Port or any other key */ - key = strtol(arg, &p, 10); /* Skip non-base 10 entries like 'fa1' */ - if (p != arg) { + key = strtol(arg, &p, 10); + if (*p == '\0') { pkey = (uint32_t *)paddr; *pkey = htonl(key); type = IPFW_TABLE_CIDR; + masklen = 32; addrlen = sizeof(uint32_t); + } else if ((p != arg) && (*p == '.')) { + /* + * Warn on IPv4 address strings + * which are "valid" for inet_aton() but not + * in inet_pton(). + * + * Typical examples: '10.5' or '10.0.0.05' + */ + errx(EX_DATAERR, + "Invalid IPv4 address: %s", arg); } } } From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 12:12:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38DD4602; Wed, 27 Nov 2013 12:12:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 285C92BEE; Wed, 27 Nov 2013 12:12:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARCCcYc052383; Wed, 27 Nov 2013 12:12:38 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARCCbjY052381; Wed, 27 Nov 2013 12:12:37 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201311271212.rARCCbjY052381@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 27 Nov 2013 12:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258678 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 12:12:38 -0000 Author: loos Date: Wed Nov 27 12:12:37 2013 New Revision: 258678 URL: http://svnweb.freebsd.org/changeset/base/258678 Log: Fix the led 'gpios' definition to match the description on sys/boot/fdt/dts/bindings-gpio.txt. Make the led pin an output, add the missing flag field. No functional change (gpioled(4) isn’t supported on FDT systems yet). Approved by: adrian (mentor) Modified: head/sys/boot/fdt/dts/rpi.dts Modified: head/sys/boot/fdt/dts/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/rpi.dts Wed Nov 27 10:10:25 2013 (r258677) +++ head/sys/boot/fdt/dts/rpi.dts Wed Nov 27 12:12:37 2013 (r258678) @@ -316,7 +316,7 @@ ok { label = "ok"; - gpios = <&gpio 16 1>; + gpios = <&gpio 16 2 0>; /* Don't change this - it configures * how the led driver determines if From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 12:17:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C9447A8; Wed, 27 Nov 2013 12:17:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C8EB2C21; Wed, 27 Nov 2013 12:17:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARCH6HG053063; Wed, 27 Nov 2013 12:17:06 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARCH64J053062; Wed, 27 Nov 2013 12:17:06 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201311271217.rARCH64J053062@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 27 Nov 2013 12:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258679 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 12:17:06 -0000 Author: loos Date: Wed Nov 27 12:17:05 2013 New Revision: 258679 URL: http://svnweb.freebsd.org/changeset/base/258679 Log: Connect the two recently added man pages to the system's install process. Approved by: adrian (mentor) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Nov 27 12:12:37 2013 (r258678) +++ head/share/man/man4/Makefile Wed Nov 27 12:17:05 2013 (r258679) @@ -157,6 +157,8 @@ MAN= aac.4 \ gif.4 \ gpib.4 \ gpio.4 \ + gpioiic.4 \ + gpioled.4 \ gre.4 \ h_ertt.4 \ hatm.4 \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 12:21:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 22ECDAC3; Wed, 27 Nov 2013 12:21:31 +0000 (UTC) Date: Wed, 27 Nov 2013 12:21:31 +0000 From: Alexey Dokuchaev To: Luiz Otavio O Souza Subject: Re: svn commit: r258678 - head/sys/boot/fdt/dts Message-ID: <20131127122131.GA97570@FreeBSD.org> References: <201311271212.rARCCbjY052381@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201311271212.rARCCbjY052381@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 12:21:31 -0000 On Wed, Nov 27, 2013 at 12:12:37PM +0000, Luiz Otavio O Souza wrote: > New Revision: 258678 > URL: http://svnweb.freebsd.org/changeset/base/258678 > > Log: > Fix the led 'gpios' definition to match the description on > sys/boot/fdt/dts/bindings-gpio.txt. Make the led pin an output, add the > missing flag field. No functional change (gpioled(4) isn’t supported on ^^^^^^^ Folks, please, write your commit logs in ASCII. Pretty please. ./danfe From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 12:50:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44AD9468; Wed, 27 Nov 2013 12:50:48 +0000 (UTC) Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com [IPv6:2607:f8b0:400d:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5E742E05; Wed, 27 Nov 2013 12:50:47 +0000 (UTC) Received: by mail-qa0-f43.google.com with SMTP id ii20so5708563qab.9 for ; Wed, 27 Nov 2013 04:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JKmSrL4zn6+J694OdaY1sLPggd+sCOvwBAvZYq3NuXw=; b=wfTadsPIE7/coqe54pTcj9ZMmAB2xBpNyV55gEPCriiVIIfuHt0xD2ZvF2oFodZm+4 +oDuRJHicLg8a7Pe0L1recglbHlRV+CNGgD1tpn3k0wNOge55XVpQQzNbOFA7jaIhRx9 RdgUif3oL3+BAimEs2fXvRLYLpE8WMEc23dPPQ64v4rwqokd9BwPiuXZuPIDCNk8R1B8 +l5SvUn9WoNOyVswGlSj+oaS7cknJoqpCS/VU/Jmh7AG4w3MifVi0HXf2/uz8VFuU9nc jc6kFnzS5hG2tGgh/S5uTfhaGWS2A1gppM96EKb2s3PUb+jhVhbPMcqXjMJhAnYRf0In uc2g== X-Received: by 10.49.106.1 with SMTP id gq1mr11164719qeb.12.1385556646962; Wed, 27 Nov 2013 04:50:46 -0800 (PST) Received: from [10.10.1.8] ([201.72.203.70]) by mx.google.com with ESMTPSA id o5sm13949005qeg.2.2013.11.27.04.50.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Nov 2013 04:50:46 -0800 (PST) Content-Type: text/plain; charset=koi8-r Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r258678 - head/sys/boot/fdt/dts From: Luiz Otavio O Souza In-Reply-To: <20131127122131.GA97570@FreeBSD.org> Date: Wed, 27 Nov 2013 10:50:40 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <682CD900-55E4-4BAD-B70E-2DA85F3BBDF4@gmail.com> References: <201311271212.rARCCbjY052381@svn.freebsd.org> <20131127122131.GA97570@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1822) Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 12:50:48 -0000 On Nov 27, 2013, at 10:21 AM, Alexey Dokuchaev = wrote: > On Wed, Nov 27, 2013 at 12:12:37PM +0000, Luiz Otavio O Souza wrote: >> New Revision: 258678 >> URL: http://svnweb.freebsd.org/changeset/base/258678 >>=20 >> Log: >> Fix the led 'gpios' definition to match the description on >> sys/boot/fdt/dts/bindings-gpio.txt. Make the led pin an output, add = the >> missing flag field. No functional change (gpioled(4) isn=E2=80=99t = supported on > ^^^^^^^ > Folks, please, write your commit logs in ASCII. Pretty please. My bad. This sneaked in from a copy and paste. Sorry for the breakage on the commit log. Luiz= From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 14:25:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8F033DC; Wed, 27 Nov 2013 14:25:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C94032372; Wed, 27 Nov 2013 14:25:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAREP7fn096939; Wed, 27 Nov 2013 14:25:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAREP7Eh096936; Wed, 27 Nov 2013 14:25:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311271425.rAREP7Eh096936@svn.freebsd.org> From: Alexander Motin Date: Wed, 27 Nov 2013 14:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258683 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 14:25:08 -0000 Author: mav Date: Wed Nov 27 14:25:06 2013 New Revision: 258683 URL: http://svnweb.freebsd.org/changeset/base/258683 Log: Escape special XML chars, returned by some devices, confusing XML parsers. MFC after: 1 month Modified: head/sys/geom/geom_disk.c head/sys/geom/geom_dump.c head/sys/geom/geom_int.h Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Wed Nov 27 14:00:52 2013 (r258682) +++ head/sys/geom/geom_disk.c Wed Nov 27 14:25:06 2013 (r258683) @@ -460,26 +460,36 @@ g_disk_dumpconf(struct sbuf *sb, const c bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; res = dp->d_getattr(bp); - sbuf_printf(sb, "%s%s\n", indent, + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", res == 0 ? buf: dp->d_ident); + sbuf_printf(sb, "\n"); bp->bio_attribute = "GEOM::lunid"; bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; - if (dp->d_getattr(bp) == 0) - sbuf_printf(sb, "%s%s\n", - indent, buf); + if (dp->d_getattr(bp) == 0) { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", buf); + sbuf_printf(sb, "\n"); + } bp->bio_attribute = "GEOM::lunname"; bp->bio_length = DISK_IDENT_SIZE; bp->bio_data = buf; - if (dp->d_getattr(bp) == 0) - sbuf_printf(sb, "%s%s\n", - indent, buf); + if (dp->d_getattr(bp) == 0) { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", buf); + sbuf_printf(sb, "\n"); + } g_destroy_bio(bp); g_free(buf); - } else - sbuf_printf(sb, "%s%s\n", indent, - dp->d_ident); - sbuf_printf(sb, "%s%s\n", indent, dp->d_descr); + } else { + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", dp->d_ident); + sbuf_printf(sb, "\n"); + } + sbuf_printf(sb, "%s", indent); + g_conf_printf_escaped(sb, "%s", dp->d_descr); + sbuf_printf(sb, "\n"); } } Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Wed Nov 27 14:00:52 2013 (r258682) +++ head/sys/geom/geom_dump.c Wed Nov 27 14:25:06 2013 (r258683) @@ -154,25 +154,28 @@ g_conftxt(void *p, int flag) } -static void -g_conf_print_escaped(struct sbuf *sb, const char *fmt, const char *str) +void +g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...) { struct sbuf *s; const u_char *c; + va_list ap; s = sbuf_new_auto(); + va_start(ap, fmt); + sbuf_vprintf(s, fmt, ap); + va_end(ap); + sbuf_finish(s); - for (c = str; *c != '\0'; c++) { + for (c = sbuf_data(s); *c != '\0'; c++) { if (*c == '&' || *c == '<' || *c == '>' || *c == '\'' || *c == '"' || *c > 0x7e) - sbuf_printf(s, "&#x%X;", *c); + sbuf_printf(sb, "&#x%X;", *c); else if (*c == '\t' || *c == '\n' || *c == '\r' || *c > 0x1f) - sbuf_putc(s, *c); + sbuf_putc(sb, *c); else - sbuf_putc(s, '?'); + sbuf_putc(sb, '?'); } - sbuf_finish(s); - sbuf_printf(sb, fmt, sbuf_data(s)); sbuf_delete(s); } @@ -204,7 +207,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t \n", pp->geom); sbuf_printf(sb, "\t r%dw%de%d\n", pp->acr, pp->acw, pp->ace); - g_conf_print_escaped(sb, "\t %s\n", pp->name); + sbuf_printf(sb, "\t "); + g_conf_printf_escaped(sb, "%s", pp->name); + sbuf_printf(sb, "\n"); sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); @@ -229,7 +234,9 @@ g_conf_geom(struct sbuf *sb, struct g_ge sbuf_printf(sb, " \n", gp); sbuf_printf(sb, " \n", gp->class); - g_conf_print_escaped(sb, " %s\n", gp->name); + sbuf_printf(sb, " "); + g_conf_printf_escaped(sb, "%s", gp->name); + sbuf_printf(sb, "\n"); sbuf_printf(sb, " %d\n", gp->rank); if (gp->flags & G_GEOM_WITHER) sbuf_printf(sb, " \n"); @@ -258,7 +265,9 @@ g_conf_class(struct sbuf *sb, struct g_c struct g_geom *gp2; sbuf_printf(sb, " \n", mp); - g_conf_print_escaped(sb, " %s\n", mp->name); + sbuf_printf(sb, " "); + g_conf_printf_escaped(sb, "%s", mp->name); + sbuf_printf(sb, "\n"); LIST_FOREACH(gp2, &mp->geom, geom) { if (gp != NULL && gp != gp2) continue; Modified: head/sys/geom/geom_int.h ============================================================================== --- head/sys/geom/geom_int.h Wed Nov 27 14:00:52 2013 (r258682) +++ head/sys/geom/geom_int.h Wed Nov 27 14:25:06 2013 (r258683) @@ -57,6 +57,7 @@ extern int g_debugflags; /* geom_dump.c */ void g_confxml(void *, int flag); void g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); +void g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...); void g_confdot(void *, int flag); void g_conftxt(void *, int flag); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 15:08:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 410D7E65; Wed, 27 Nov 2013 15:08:19 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 21C3625A2; Wed, 27 Nov 2013 15:08:18 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-246-96.lns20.per2.internode.on.net [121.45.246.96]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rARF869Z031397 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 27 Nov 2013 07:08:10 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <52960AD1.5020604@freebsd.org> Date: Wed, 27 Nov 2013 23:08:01 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Peter Grehan , svn-src-head@freebsd.org Subject: Re: svn commit: r258668 - in head/usr.sbin: bhyve bhyveload References: <201311270021.rAR0LcX4009601@svn.freebsd.org> In-Reply-To: <201311270021.rAR0LcX4009601@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 15:08:19 -0000 On 11/27/13, 8:21 AM, Peter Grehan wrote: > Author: grehan > Date: Wed Nov 27 00:21:37 2013 > New Revision: 258668 > URL: http://svnweb.freebsd.org/changeset/base/258668 > > Log: > Allow bhyve and bhyveload to attach to tty devices. > > bhyveload: introduce the -c parameter > to select a tty for output (or "stdio") > > bhyve: allow the puc and lpc-com backends to > accept a tty in addition to "stdio" > > When used in conjunction with the null-modem device, > nmdm(4), this allows attach/detach to the guest console > and multiple concurrent serial ports. kgdb on a serial > port is now functional. > I wrote nmdm for exactly this purpose for the old vmware port... > Reviewed by: neel > Requested by: Almost everyone that has used bhyve > MFC after: 10.0 > > Modified: > head/usr.sbin/bhyve/uart_emul.c > head/usr.sbin/bhyveload/bhyveload.8 > head/usr.sbin/bhyveload/bhyveload.c > > Modified: head/usr.sbin/bhyve/uart_emul.c > ============================================================================== > --- head/usr.sbin/bhyve/uart_emul.c Tue Nov 26 22:41:40 2013 (r258667) > +++ head/usr.sbin/bhyve/uart_emul.c Wed Nov 27 00:21:37 2013 (r258668) > @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -67,6 +68,7 @@ __FBSDID("$FreeBSD$"); > #define FIFOSZ 16 > > static bool uart_stdio; /* stdio in use for i/o */ > +static struct termios tio_stdio_orig; > > static struct { > int baseaddr; > @@ -87,6 +89,12 @@ struct fifo { > int size; /* size of the fifo */ > }; > > +struct ttyfd { > + bool opened; > + int fd; /* tty device file descriptor */ > + struct termios tio_orig, tio_new; /* I/O Terminals */ > +}; > + > struct uart_softc { > pthread_mutex_t mtx; /* protects all softc elements */ > uint8_t data; /* Data register (R/W) */ > @@ -103,8 +111,7 @@ struct uart_softc { > > struct fifo rxfifo; > > - bool opened; > - bool stdio; > + struct ttyfd tty; > bool thre_int_pending; /* THRE interrupt pending */ > > void *arg; > @@ -114,38 +121,41 @@ struct uart_softc { > > static void uart_drain(int fd, enum ev_type ev, void *arg); > > -static struct termios tio_orig, tio_new; /* I/O Terminals */ > - > static void > ttyclose(void) > { > > - tcsetattr(STDIN_FILENO, TCSANOW, &tio_orig); > + tcsetattr(STDIN_FILENO, TCSANOW, &tio_stdio_orig); > } > > static void > -ttyopen(void) > +ttyopen(struct ttyfd *tf) > { > > - tcgetattr(STDIN_FILENO, &tio_orig); > + tcgetattr(tf->fd, &tf->tio_orig); > > - cfmakeraw(&tio_new); > - tcsetattr(STDIN_FILENO, TCSANOW, &tio_new); > + tf->tio_new = tf->tio_orig; > + cfmakeraw(&tf->tio_new); > + tf->tio_new.c_cflag |= CLOCAL; > + tcsetattr(tf->fd, TCSANOW, &tf->tio_new); > > - atexit(ttyclose); > + if (tf->fd == STDIN_FILENO) { > + tio_stdio_orig = tf->tio_orig; > + atexit(ttyclose); > + } > } > > static bool > -tty_char_available(void) > +tty_char_available(struct ttyfd *tf) > { > fd_set rfds; > struct timeval tv; > > FD_ZERO(&rfds); > - FD_SET(STDIN_FILENO, &rfds); > + FD_SET(tf->fd, &rfds); > tv.tv_sec = 0; > tv.tv_usec = 0; > - if (select(STDIN_FILENO + 1, &rfds, NULL, NULL, &tv) > 0 ) { > + if (select(tf->fd + 1, &rfds, NULL, NULL, &tv) > 0 ) { > return (true); > } else { > return (false); > @@ -153,12 +163,12 @@ tty_char_available(void) > } > > static int > -ttyread(void) > +ttyread(struct ttyfd *tf) > { > char rb; > > - if (tty_char_available()) { > - read(STDIN_FILENO, &rb, 1); > + if (tty_char_available(tf)) { > + read(tf->fd, &rb, 1); > return (rb & 0xff); > } else { > return (-1); > @@ -166,10 +176,10 @@ ttyread(void) > } > > static void > -ttywrite(unsigned char wb) > +ttywrite(struct ttyfd *tf, unsigned char wb) > { > > - (void)write(STDIN_FILENO, &wb, 1); > + (void)write(tf->fd, &wb, 1); > } > > static void > @@ -226,10 +236,8 @@ uart_opentty(struct uart_softc *sc) > { > struct mevent *mev; > > - assert(!sc->opened && sc->stdio); > - > - ttyopen(); > - mev = mevent_add(STDIN_FILENO, EVF_READ, uart_drain, sc); > + ttyopen(&sc->tty); > + mev = mevent_add(sc->tty.fd, EVF_READ, uart_drain, sc); > assert(mev); > } > > @@ -294,7 +302,7 @@ uart_drain(int fd, enum ev_type ev, void > > sc = arg; > > - assert(fd == STDIN_FILENO); > + assert(fd == sc->tty.fd); > assert(ev == EVF_READ); > > /* > @@ -305,10 +313,10 @@ uart_drain(int fd, enum ev_type ev, void > pthread_mutex_lock(&sc->mtx); > > if ((sc->mcr & MCR_LOOPBACK) != 0) { > - (void) ttyread(); > + (void) ttyread(&sc->tty); > } else { > while (fifo_available(&sc->rxfifo) && > - ((ch = ttyread()) != -1)) { > + ((ch = ttyread(&sc->tty)) != -1)) { > fifo_putchar(&sc->rxfifo, ch); > } > uart_toggle_intr(sc); > @@ -323,12 +331,6 @@ uart_write(struct uart_softc *sc, int of > int fifosz; > uint8_t msr; > > - /* Open terminal */ > - if (!sc->opened && sc->stdio) { > - uart_opentty(sc); > - sc->opened = true; > - } > - > pthread_mutex_lock(&sc->mtx); > > /* > @@ -351,8 +353,8 @@ uart_write(struct uart_softc *sc, int of > if (sc->mcr & MCR_LOOPBACK) { > if (fifo_putchar(&sc->rxfifo, value) != 0) > sc->lsr |= LSR_OE; > - } else if (sc->stdio) { > - ttywrite(value); > + } else if (sc->tty.opened) { > + ttywrite(&sc->tty, value); > } /* else drop on floor */ > sc->thre_int_pending = true; > break; > @@ -459,12 +461,6 @@ uart_read(struct uart_softc *sc, int off > { > uint8_t iir, intr_reason, reg; > > - /* Open terminal */ > - if (!sc->opened && sc->stdio) { > - uart_opentty(sc); > - sc->opened = true; > - } > - > pthread_mutex_lock(&sc->mtx); > > /* > @@ -581,19 +577,47 @@ uart_init(uart_intr_func_t intr_assert, > return (sc); > } > > +static int > +uart_tty_backend(struct uart_softc *sc, const char *opts) > +{ > + int fd; > + int retval; > + > + retval = -1; > + > + fd = open(opts, O_RDWR); > + if (fd > 0 && isatty(fd)) { > + sc->tty.fd = fd; > + sc->tty.opened = true; > + retval = 0; > + } > + > + return (retval); > +} > + > int > uart_set_backend(struct uart_softc *sc, const char *opts) > { > - /* > - * XXX one stdio backend supported at this time. > - */ > + int retval; > + > + retval = -1; > + > if (opts == NULL) > return (0); > > - if (strcmp("stdio", opts) == 0 && !uart_stdio) { > - sc->stdio = true; > - uart_stdio = true; > - return (0); > - } else > - return (-1); > + if (strcmp("stdio", opts) == 0) { > + if (!uart_stdio) { > + sc->tty.fd = STDIN_FILENO; > + sc->tty.opened = true; > + uart_stdio = true; > + retval = 0; > + } > + } else if (uart_tty_backend(sc, opts) == 0) { > + retval = 0; > + } > + > + if (retval == 0) > + uart_opentty(sc); > + > + return (retval); > } > > Modified: head/usr.sbin/bhyveload/bhyveload.8 > ============================================================================== > --- head/usr.sbin/bhyveload/bhyveload.8 Tue Nov 26 22:41:40 2013 (r258667) > +++ head/usr.sbin/bhyveload/bhyveload.8 Wed Nov 27 00:21:37 2013 (r258668) > @@ -39,6 +39,7 @@ guest inside a bhyve virtual machine > .Op Fl d Ar disk-path > .Op Fl h Ar host-path > .Op Fl e Ar name=value > +.Op Fl c Ar cons-dev > .Ar vmname > .Sh DESCRIPTION > .Nm > @@ -100,6 +101,16 @@ to > .Pp > The option may be used more than once to set more than one environment > variable. > +.It Fl c Ar cons-dev > +.Ar cons-dev > +is a > +.Xr tty 4 > +device to use for > +.Nm > +terminal I/O. > +.Pp > +The text string "stdio" is also accepted and selects the use of > +unbuffered standard I/O. This is the default value. > .El > .Sh EXAMPLES > To create a virtual machine named > @@ -109,10 +120,23 @@ that boots off the ISO image > and has 1GB memory allocated to it: > .Pp > .Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm" > +.Pp > +To create a virtual machine named > +.Ar test-vm > +with 256MB of memory allocated, the guest root filesystem under the host > +directory > +.Pa /user/images/test > +and terminal I/O sent to the > +.Xr nmdm 4 > +device > +.Pa /dev/nmdm1B > +.Pp > +.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm > .Sh SEE ALSO > .Xr bhyve 4 , > .Xr bhyve 8 , > .Xr loader 8 , > +.Xr nmdm 4, > .Xr vmm 4 > .Sh HISTORY > .Nm > > Modified: head/usr.sbin/bhyveload/bhyveload.c > ============================================================================== > --- head/usr.sbin/bhyveload/bhyveload.c Tue Nov 26 22:41:40 2013 (r258667) > +++ head/usr.sbin/bhyveload/bhyveload.c Wed Nov 27 00:21:37 2013 (r258668) > @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); > static char *host_base = "/"; > static struct termios term, oldterm; > static int disk_fd = -1; > +static int consin_fd, consout_fd; > > static char *vmname, *progname; > static struct vmctx *ctx; > @@ -108,7 +109,7 @@ cb_putc(void *arg, int ch) > { > char c = ch; > > - write(1, &c, 1); > + (void) write(consout_fd, &c, 1); > } > > static int > @@ -116,7 +117,7 @@ cb_getc(void *arg) > { > char c; > > - if (read(0, &c, 1) == 1) > + if (read(consin_fd, &c, 1) == 1) > return (c); > return (-1); > } > @@ -126,7 +127,7 @@ cb_poll(void *arg) > { > int n; > > - if (ioctl(0, FIONREAD, &n) >= 0) > + if (ioctl(consin_fd, FIONREAD, &n) >= 0) > return (n > 0); > return (0); > } > @@ -488,7 +489,7 @@ static void > cb_exit(void *arg, int v) > { > > - tcsetattr(0, TCSAFLUSH, &oldterm); > + tcsetattr(consout_fd, TCSAFLUSH, &oldterm); > exit(v); > } > > @@ -564,13 +565,45 @@ static struct loader_callbacks cb = { > .getenv = cb_getenv, > }; > > +static int > +altcons_open(char *path) > +{ > + struct stat sb; > + int err; > + int fd; > + > + /* > + * Allow stdio to be passed in so that the same string > + * can be used for the bhyveload console and bhyve com-port > + * parameters > + */ > + if (!strcmp(path, "stdio")) > + return (0); > + > + err = stat(path, &sb); > + if (err == 0) { > + if (!S_ISCHR(sb.st_mode)) > + err = ENOTSUP; > + else { > + fd = open(path, O_RDWR | O_NONBLOCK); > + if (fd < 0) > + err = errno; > + else > + consin_fd = consout_fd = fd; > + } > + } > + > + return (err); > +} > + > static void > usage(void) > { > > fprintf(stderr, > "usage: %s [-m mem-size] [-d ] [-h ]\n" > - " %*s [-e ] \n", progname, > + " %*s [-e ] [-c ] \n", > + progname, > (int)strlen(progname), ""); > exit(1); > } > @@ -589,8 +622,16 @@ main(int argc, char** argv) > mem_size = 256 * MB; > disk_image = NULL; > > - while ((opt = getopt(argc, argv, "d:e:h:m:")) != -1) { > + consin_fd = STDIN_FILENO; > + consout_fd = STDOUT_FILENO; > + > + while ((opt = getopt(argc, argv, "c:d:e:h:m:")) != -1) { > switch (opt) { > + case 'c': > + error = altcons_open(optarg); > + if (error != 0) > + errx(EX_USAGE, "Could not open '%s'", optarg); > + break; > case 'd': > disk_image = optarg; > break; > @@ -640,11 +681,13 @@ main(int argc, char** argv) > exit(1); > } > > - tcgetattr(0, &term); > + tcgetattr(consout_fd, &term); > oldterm = term; > - term.c_lflag &= ~(ICANON|ECHO); > - term.c_iflag &= ~ICRNL; > - tcsetattr(0, TCSAFLUSH, &term); > + cfmakeraw(&term); > + term.c_cflag |= CLOCAL; > + > + tcsetattr(consout_fd, TCSAFLUSH, &term); > + > h = dlopen("/boot/userboot.so", RTLD_LOCAL); > if (!h) { > printf("%s\n", dlerror()); > From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 15:58:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91EC9FE6; Wed, 27 Nov 2013 15:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8165F2831; Wed, 27 Nov 2013 15:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARFw7kS027927; Wed, 27 Nov 2013 15:58:07 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARFw7aR027926; Wed, 27 Nov 2013 15:58:07 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201311271558.rARFw7aR027926@svn.freebsd.org> From: "Roger Pau Monn\xc3\xa9" Date: Wed, 27 Nov 2013 15:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258684 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 15:58:07 -0000 Author: royger Date: Wed Nov 27 15:58:07 2013 New Revision: 258684 URL: http://svnweb.freebsd.org/changeset/base/258684 Log: Add myself to the committers-src list. Approved by: gibbs (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Nov 27 14:25:06 2013 (r258683) +++ head/share/misc/committers-src.dot Wed Nov 27 15:58:07 2013 (r258684) @@ -250,6 +250,7 @@ rmacklem [label="Rick Macklem\nrmacklem@ rmh [label="Robert Millan\nrmh@FreeBSD.org\n2011/09/18"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/09/15"] roberto [label="Ollivier Robert\nroberto@FreeBSD.org\n1995/02/22"] +royger [label="Roger Pau Monne\nroyger@FreeBSD.org\n2013/11/26"] rpaulo [label="Rui Paulo\nrpaulo@FreeBSD.org\n2007/09/25"] rrs [label="Randall R Stewart\nrrs@FreeBSD.org\n2007/02/08"] rse [label="Ralf S. Engelschall\nrse@FreeBSD.org\n1997/07/31"] @@ -415,6 +416,7 @@ gavin -> versus gibbs -> mjacob gibbs -> njl +gibbs -> royger glebius -> mav From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 16:01:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFD4B1E2; Wed, 27 Nov 2013 16:01:00 +0000 (UTC) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id D7867287A; Wed, 27 Nov 2013 16:00:59 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoAGANAWllJbsI8S/2dsb2JhbABZgwe3HoMEgR0XdIIlAQEFOhwjEAsYCSUPKh4GiBgBwDIXjwIHhDMDlDGDYpIUgyo7 Received: from 18.143-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.143.18]) by relay.skynet.be with ESMTP; 27 Nov 2013 17:00:41 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id rARG0dNo032499; Wed, 27 Nov 2013 17:00:40 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Wed, 27 Nov 2013 17:00:39 +0100 From: Tijl Coosemans To: Peter Wemm Subject: Re: svn commit: r258672 - in head: . share/mk Message-ID: <20131127170039.2da15f21@kalimero.tijl.coosemans.org> In-Reply-To: <52959276.7070803@wemm.org> References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 16:01:00 -0000 On Tue, 26 Nov 2013 22:34:30 -0800 Peter Wemm wrote: > A slightly longer explanation of what I was thinking: > > - There's a new round of 'make -j' problems lurking in there. We are > missing chunks of the ordering glue that cause libraries to be built in the > right order when they depend on each other. > - It's a waste of cpu time for the usual case, particularly for the 11.x > cycle for the next 1-2 years. > - We don't build them properly - we invent cpu flags etc. > > The usual use case for 32 bit binaries seems to be: > - running a 32 bit chroot or jail - this is unaffected. > - running old binaries, usually from 4.x or 6.x when the 64 bit port was > really green - WITH_LIB32 doesn't actually help much with this because most > of the libraries are missing. Ugh, please revert this. You forgot about Wine. From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 16:18:57 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0301CB8; Wed, 27 Nov 2013 16:18:56 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1382971; Wed, 27 Nov 2013 16:18:55 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA08413; Wed, 27 Nov 2013 18:18:47 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Vlhp8-0005kS-T4; Wed, 27 Nov 2013 18:18:46 +0200 Message-ID: <52961B2E.1080602@FreeBSD.org> Date: Wed, 27 Nov 2013 18:17:50 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, FreeBSD Current , freebsd-fs@FreeBSD.org Subject: [HEADSUP!!!] do not upgrade to or past r258632 if you use ZFS + TRIM References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> In-Reply-To: <201311260957.rAQ9vF6d004168@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 16:18:57 -0000 on 26/11/2013 11:57 Andriy Gapon said the following: > Author: avg > Date: Tue Nov 26 09:57:14 2013 > New Revision: 258632 > URL: http://svnweb.freebsd.org/changeset/base/258632 > > Log: > MFV r255255: 4045 zfs write throttle & i/o scheduler performance work > > illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e > > Please note the following changes: > - zio_ioctl has lost its priority parameter and now TRIM is executed > with 'now' priority > - some knobs are gone and some new knobs are added; not all of them are > exposed as tunables / sysctls yet > > MFC after: 10 days > Sponsored by: HybridCluster [merge] I think that I've introduced a very serious bug when merging this change. Please do not upgrade to this revision if you use ZFS with SSDs and have TRIM support enabled. If you have already upgraded, please disable TRIM support ASAP and roll back to a previous version of kernel and then check integrity of your pools. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 16:30:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E89419D; Wed, 27 Nov 2013 16:30:47 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59AB82A2D; Wed, 27 Nov 2013 16:30:47 +0000 (UTC) Received: from [10.1.3.5] (cnet520-windstream.mcclatchyinteractive.com [166.108.16.2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 6EF9319E00B; Wed, 27 Nov 2013 11:30:46 -0500 (EST) Message-ID: <52961E35.704@mail.lifanov.com> Date: Wed, 27 Nov 2013 11:30:45 -0500 From: Nikolai Lifanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Peter Wemm , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r258672 - in head: . share/mk References: <201311270454.rAR4sOqI004103@svn.freebsd.org> In-Reply-To: <201311270454.rAR4sOqI004103@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 16:30:47 -0000 On 11/26/13 23:54, Peter Wemm wrote: > Author: peter > Date: Wed Nov 27 04:54:23 2013 > New Revision: 258672 > URL: http://svnweb.freebsd.org/changeset/base/258672 > > Log: > At great personal risk, change the default for LIB32 from yes to no. As > mentioned in UPDATING, you can even do it as an as-needed operation after > doing a buildworld/installworld. You can set WITH_LIB32=yes in make.conf > or src.conf. > > Modified: > head/UPDATING > head/share/mk/bsd.own.mk > If you decide to keep this change, can you add LIB32 stuff to optional obsoletes? Otherwise people will be left with rotting outdated lib32 directories. Thanks! - Nikolai Lifanov From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 17:06:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 141EBBAC; Wed, 27 Nov 2013 17:06:41 +0000 (UTC) Received: from mail.palisadesystems.com (mail.palisadesystems.com [216.81.178.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8F102BBC; Wed, 27 Nov 2013 17:06:40 +0000 (UTC) Received: from [192.168.1.107] (173-25-205-212.client.mchsi.com [173.25.205.212]) (authenticated bits=0) by mail.palisadesystems.com (8.14.6/8.14.6) with ESMTP id rARGvb2u006851 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 27 Nov 2013 10:57:39 -0600 (CST) (envelope-from guy.helmer@gmail.com) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r258672 - in head: . share/mk From: Guy Helmer In-Reply-To: <52959276.7070803@wemm.org> Date: Wed, 27 Nov 2013 10:57:36 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <90DAAE00-34A2-4028-BD45-FFEA280CFC3B@gmail.com> References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> To: Peter Wemm X-Mailer: Apple Mail (2.1822) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.palisadesystems.com [192.168.222.92]); Wed, 27 Nov 2013 10:57:41 -0600 (CST) X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner-ID: rARGvb2u006851 X-Palisade-MailScanner: Found to be clean X-Palisade-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.999, required 5, ALL_TRUSTED -1.00, BAYES_00 -1.90, DKIM_ADSP_CUSTOM_MED 0.00, FREEMAIL_FROM 1.00, NML_ADSP_CUSTOM_MED 0.90) X-Palisade-MailScanner-From: guy.helmer@gmail.com X-Spam-Status: No Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 17:06:41 -0000 On Nov 27, 2013, at 12:34 AM, Peter Wemm wrote: > On 11/26/13, 9:03 PM, Glen Barber wrote: >> On Wed, Nov 27, 2013 at 04:54:24AM +0000, Peter Wemm wrote: >>> Author: peter >>> Date: Wed Nov 27 04:54:23 2013 >>> New Revision: 258672 >>> URL: http://svnweb.freebsd.org/changeset/base/258672 >>>=20 >>> Log: >>> At great personal risk, change the default for LIB32 from yes to = no. As >>> mentioned in UPDATING, you can even do it as an as-needed operation = after >>> doing a buildworld/installworld. You can set WITH_LIB32=3Dyes in = make.conf >>> or src.conf. >>>=20 >>=20 >> Thank you. Long overdue, IMHO. >>=20 >> Glen >>=20 >=20 > A slightly longer explanation of what I was thinking: >=20 > - There's a new round of 'make -j' problems lurking in there. We are > missing chunks of the ordering glue that cause libraries to be built = in the > right order when they depend on each other. > - It's a waste of cpu time for the usual case, particularly for the = 11.x > cycle for the next 1-2 years. > - We don't build them properly - we invent cpu flags etc. >=20 > The usual use case for 32 bit binaries seems to be: > - running a 32 bit chroot or jail - this is unaffected. > - running old binaries, usually from 4.x or 6.x when the 64 bit port = was > really green - WITH_LIB32 doesn't actually help much with this because = most > of the libraries are missing. >=20 > It seems more likely we can do a better job with packages. With some > massaging, we should be able to use the compat-6.x/i386 libraries = as-is, and > solve the "old 4.x/6.x binary" issue in one go. >=20 > However, ld-elf32.so.1 does require special handling. I have = something in > mind that might make this moot though. >=20 > I suspect I've made the powerpc folks angry though=85 >=20 FWIW, this would break 3rd-party software I use on amd64 that was only = provided as i386 binaries. Guy From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 17:45:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 676088AB; Wed, 27 Nov 2013 17:45:19 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D8FEF2DB1; Wed, 27 Nov 2013 17:45:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id rARHjGpB090703; Wed, 27 Nov 2013 21:45:16 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Wed, 27 Nov 2013 21:45:16 +0400 (MSK) From: Dmitry Morozovsky To: Peter Wemm Subject: Re: svn commit: r258672 - in head: . share/mk In-Reply-To: <52959276.7070803@wemm.org> Message-ID: References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Wed, 27 Nov 2013 21:45:16 +0400 (MSK) Cc: svn-src-head@freebsd.org, Glen Barber , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 17:45:19 -0000 On Tue, 26 Nov 2013, Peter Wemm wrote: [snip] > It seems more likely we can do a better job with packages. With some > massaging, we should be able to use the compat-6.x/i386 libraries as-is, and > solve the "old 4.x/6.x binary" issue in one go. sorry for my possible ignorance, but aren't compat6 suspected to non-closed (probablly non-trivial) security concerns? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 17:59:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51B2AC36; Wed, 27 Nov 2013 17:59:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 415B82E3C; Wed, 27 Nov 2013 17:59:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARHxEJ0069196; Wed, 27 Nov 2013 17:59:14 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARHxEPE069195; Wed, 27 Nov 2013 17:59:14 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201311271759.rARHxEPE069195@svn.freebsd.org> From: Juli Mallett Date: Wed, 27 Nov 2013 17:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258686 - head/sbin/fdisk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 17:59:14 -0000 Author: jmallett Date: Wed Nov 27 17:59:13 2013 New Revision: 258686 URL: http://svnweb.freebsd.org/changeset/base/258686 Log: Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than only being able to create 1TB partitions: o) Use an unsigned 32-bit quantity to store the number of disk sectors. o) Detect overflow of said 32-bit quantity and clamp to 2^32. o) Rather than returning the disk sector count from get_params, return 0 on success, since its return value is only ever compared to -1 to detect failure. This would cause returning 2^32 sectors to be interpreted as an error. Reviewed by: bde ("good for a quick fix") Modified: head/sbin/fdisk/fdisk.c Modified: head/sbin/fdisk/fdisk.c ============================================================================== --- head/sbin/fdisk/fdisk.c Wed Nov 27 16:08:33 2013 (r258685) +++ head/sbin/fdisk/fdisk.c Wed Nov 27 17:59:13 2013 (r258686) @@ -75,7 +75,8 @@ static int secsize = 0; /* the sensed s static char *disk; -static int cyls, sectors, heads, cylsecs, disksecs; +static int cyls, sectors, heads, cylsecs; +static u_int32_t disksecs; struct mboot { unsigned char *bootinst; /* boot code */ @@ -873,10 +874,13 @@ get_params() o = g_mediasize(fd); if (o < 0) return (-1); - disksecs = o / u; + if (o / u <= NO_DISK_SECTORS) + disksecs = o / u; + else + disksecs = NO_DISK_SECTORS; cyls = dos_cyls = o / (u * dos_heads * dos_sectors); - return (disksecs); + return (0); } static int From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 19:12:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73525240; Wed, 27 Nov 2013 19:12:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6309A2260; Wed, 27 Nov 2013 19:12:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARJCU8G097983; Wed, 27 Nov 2013 19:12:30 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARJCUko097982; Wed, 27 Nov 2013 19:12:30 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201311271912.rARJCUko097982@svn.freebsd.org> From: Stefan Esser Date: Wed, 27 Nov 2013 19:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258687 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 19:12:30 -0000 Author: se Date: Wed Nov 27 19:12:29 2013 New Revision: 258687 URL: http://svnweb.freebsd.org/changeset/base/258687 Log: - add myself to the committers list (it's about time, having been a committer for more than 19 years ...) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Nov 27 17:59:13 2013 (r258686) +++ head/share/misc/committers-src.dot Wed Nov 27 19:12:29 2013 (r258687) @@ -263,6 +263,7 @@ sbruno [label="Sean Bruno\nsbruno@FreeBS scf [label="Sean C. Farley\nscf@FreeBSD.org\n2007/06/24"] schweikh [label="Jens Schweikhardt\nschweikh@FreeBSD.org\n2001/04/06"] scottl [label="Scott Long\nscottl@FreeBSD.org\n2000/09/28"] +se [label="Stefan Esser\nse@FreeBSD.org\n1994/08/26"] sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"] sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 19:51:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A73692CE; Wed, 27 Nov 2013 19:51:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96F512466; Wed, 27 Nov 2013 19:51:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARJppIa014122; Wed, 27 Nov 2013 19:51:51 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARJppI2014118; Wed, 27 Nov 2013 19:51:51 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311271951.rARJppI2014118@svn.freebsd.org> From: Peter Wemm Date: Wed, 27 Nov 2013 19:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258688 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 19:51:51 -0000 Author: peter Date: Wed Nov 27 19:51:50 2013 New Revision: 258688 URL: http://svnweb.freebsd.org/changeset/base/258688 Log: Revert r258672. We clearly don't compile libraries enough times. Modified: head/UPDATING head/share/mk/bsd.own.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Nov 27 19:12:29 2013 (r258687) +++ head/UPDATING Wed Nov 27 19:51:50 2013 (r258688) @@ -31,13 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20131126: - WITH_LIB32 has been changed to WITHOUT_LIB32 by default. You - can set WITH_LIB32=yes in make.conf or src.conf, or if you need - to do a quick 32 bit library build you can do a 'make build32' - and 'make install32' as a separate step AFTER doing a - buildworld/installworld. - 20131108: The WITHOUT_ATF build knob has been removed and its functionality has been subsumed into the more generic WITHOUT_TESTS. If you were Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Nov 27 19:12:29 2013 (r258687) +++ head/share/mk/bsd.own.mk Wed Nov 27 19:51:50 2013 (r258688) @@ -303,6 +303,7 @@ __DEFAULT_YES_OPTIONS = \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ + LIB32 \ LIBPTHREAD \ LIBTHR \ LOCALES \ @@ -368,7 +369,6 @@ __DEFAULT_NO_OPTIONS = \ GPL_DTC \ HESIOD \ INSTALL_AS_USER \ - LIB32 \ LLDB \ NAND \ OFED \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 19:54:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9CE24DC; Wed, 27 Nov 2013 19:54:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B95242484; Wed, 27 Nov 2013 19:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARJsJ0x014446; Wed, 27 Nov 2013 19:54:19 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARJsJ0s014445; Wed, 27 Nov 2013 19:54:19 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201311271954.rARJsJ0s014445@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 27 Nov 2013 19:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258689 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 19:54:19 -0000 Author: np Date: Wed Nov 27 19:54:19 2013 New Revision: 258689 URL: http://svnweb.freebsd.org/changeset/base/258689 Log: Disable an assertion that relies on some code[1] that isn't in HEAD yet. [1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:51:50 2013 (r258688) +++ head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:54:19 2013 (r258689) @@ -1392,7 +1392,7 @@ rxb_free(struct mbuf *m, void *arg1, voi { uma_zone_t zone = arg1; caddr_t cl = arg2; -#ifdef INVARIANTS +#ifdef notyet u_int refcount; refcount = *find_buf_refcnt(cl); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 19:55:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EA2A62C; Wed, 27 Nov 2013 19:55:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E3692497; Wed, 27 Nov 2013 19:55:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARJthS5014695; Wed, 27 Nov 2013 19:55:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARJthPB014693; Wed, 27 Nov 2013 19:55:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311271955.rARJthPB014693@svn.freebsd.org> From: Alexander Motin Date: Wed, 27 Nov 2013 19:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258690 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 19:55:43 -0000 Author: mav Date: Wed Nov 27 19:55:42 2013 New Revision: 258690 URL: http://svnweb.freebsd.org/changeset/base/258690 Log: Fix bug introduced at r252226, when udata argument passed to bucket_alloc() was used without making sure first that it was really passed for us. On some of my systems this bug made user argument passed by ZFS code to uma_zalloc_arg() unexpectedly block UMA per-CPU caches for those zones. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Nov 27 19:54:19 2013 (r258689) +++ head/sys/vm/uma_core.c Wed Nov 27 19:55:42 2013 (r258690) @@ -369,12 +369,13 @@ bucket_alloc(uma_zone_t zone, void *udat * buckets via the allocation path or bucket allocations in the * free path. */ - if ((uintptr_t)udata & UMA_ZFLAG_BUCKET) - return (NULL); if ((zone->uz_flags & UMA_ZFLAG_BUCKET) == 0) udata = (void *)(uintptr_t)zone->uz_flags; - else + else { + if ((uintptr_t)udata & UMA_ZFLAG_BUCKET) + return (NULL); udata = (void *)((uintptr_t)udata | UMA_ZFLAG_BUCKET); + } if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY) flags |= M_NOVM; ubz = bucket_zone_lookup(zone->uz_count); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 19:59:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD68E834 for ; Wed, 27 Nov 2013 19:59:39 +0000 (UTC) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [IPv6:2607:f8b0:400c:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A72824BB for ; Wed, 27 Nov 2013 19:59:39 +0000 (UTC) Received: by mail-ve0-f175.google.com with SMTP id jx11so5372984veb.6 for ; Wed, 27 Nov 2013 11:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G/HST7oGdy+0utsA0jq7ITWrn88cvwz8bQ8csCj/w/A=; b=BsSGwELRNQ6MGQ0QNzR+vv8Az0+0rk5OLA+yGhUgUCkHboHUPsmyb7pskqsGYs7ryJ mkDsqaHg+KBtLU2rwQDioBfgt9uPPYRTVh8V7KAcATsT8pdRUq84SoDZ6CIfqQGKlQD7 fB+yvV2rIk8mWXI3OUhbDzTcYRpJp/nJUxIpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=G/HST7oGdy+0utsA0jq7ITWrn88cvwz8bQ8csCj/w/A=; b=QpZoF8334CEFUfCLydrJReVPUBpablcqVJYkYYpC0JQJ2HSWYPkewf7XEIvxOponBE fsZj1ocWKPR1r5fyJAqJDtHkCCQkkA3dNmW3dhH1Q3ASimirt3DlBlu0SUuUTxJoe/yo Be6hPjZoJ6ZG2miJVFtieEEtJUWRRiOSVeS7adjmhe0FrMvzoID8nHNw6DwqA/qGVn0S LSRH/GJhemiK7cliNJ8/vLZ3Mv9cZTTV8DZ0agQmyffV0iM4sWyUT72s0nsMIxk+dnI7 dfP6r1UEyOspcMXI1qL2ehqT5pCtbZ569oyBa3zulv/9HG357Vhojl4Yyijb8zE+HpWx tZSA== X-Gm-Message-State: ALoCoQlWkJlJ1Y+2LOnTRAUT0vPbFAQEepZ8d9gZFS8GHPLn3B2EYdhUBBSUd5xSeX3eag9+BsBH MIME-Version: 1.0 X-Received: by 10.52.64.140 with SMTP id o12mr1240213vds.40.1385582378350; Wed, 27 Nov 2013 11:59:38 -0800 (PST) Received: by 10.220.167.74 with HTTP; Wed, 27 Nov 2013 11:59:38 -0800 (PST) In-Reply-To: <20131127170039.2da15f21@kalimero.tijl.coosemans.org> References: <201311270454.rAR4sOqI004103@svn.freebsd.org> <20131127050358.GG1710@glenbarber.us> <52959276.7070803@wemm.org> <20131127170039.2da15f21@kalimero.tijl.coosemans.org> Date: Wed, 27 Nov 2013 11:59:38 -0800 Message-ID: Subject: Re: svn commit: r258672 - in head: . share/mk From: Peter Wemm To: Tijl Coosemans Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , Glen Barber , svn-src-all , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 19:59:39 -0000 On Wed, Nov 27, 2013 at 8:00 AM, Tijl Coosemans wrote: > On Tue, 26 Nov 2013 22:34:30 -0800 Peter Wemm wrote: >> A slightly longer explanation of what I was thinking: >> >> - There's a new round of 'make -j' problems lurking in there. We are >> missing chunks of the ordering glue that cause libraries to be built in the >> right order when they depend on each other. >> - It's a waste of cpu time for the usual case, particularly for the 11.x >> cycle for the next 1-2 years. >> - We don't build them properly - we invent cpu flags etc. >> >> The usual use case for 32 bit binaries seems to be: >> - running a 32 bit chroot or jail - this is unaffected. >> - running old binaries, usually from 4.x or 6.x when the 64 bit port was >> really green - WITH_LIB32 doesn't actually help much with this because most >> of the libraries are missing. > > Ugh, please revert this. You forgot about Wine. Done, but nothing prevented you from adding WITH_LIB32=yes yourself, or doing a 'make build32/install32' after buildworld/installworld. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: for when a ' just won\342\200\231t do. From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 20:00:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1A16996; Wed, 27 Nov 2013 20:00:53 +0000 (UTC) Received: from mail-qe0-x235.google.com (mail-qe0-x235.google.com [IPv6:2607:f8b0:400d:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 618A824F5; Wed, 27 Nov 2013 20:00:53 +0000 (UTC) Received: by mail-qe0-f53.google.com with SMTP id nc12so6553839qeb.12 for ; Wed, 27 Nov 2013 12:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=vjcd6LiPa5TOTtXQXI8yWbGN3b1BZq+vUOO0hNL25/0=; b=EhywaS5MSLKDMBSRcg841NTFRJhPcz2yHZVDBXHFTS7f5fAiMaTddXQZNEijdgzMKr ctpuKlwRP/g0HRs8Sbvj4KHVhJjsZdVLJ/lCNUI56z9Lt3/GhdwMObYh3GZ2Z+DYiAhZ fqsomv4aQr/OXcvsKlpTEAUGm6wxG/IbDyIrRJuJN12d18nIbp1W1vrPMTQ1d9TGtZlV oJ/136BpBMNQl3R2qmyvBRobin6pl2VzbIVVR1yEg0qKh7JnDhQegWI60KkaacxrKl4r 9l6PlUlNJk6uMumxrcm74Ofg/Wpwz+43XgnH5wLHPKnsULhFKuI2Egebq0aftwg1VG64 hlvA== MIME-Version: 1.0 X-Received: by 10.49.24.163 with SMTP id v3mr8673934qef.78.1385582452549; Wed, 27 Nov 2013 12:00:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Wed, 27 Nov 2013 12:00:52 -0800 (PST) In-Reply-To: <201311271954.rARJsJ0s014445@svn.freebsd.org> References: <201311271954.rARJsJ0s014445@svn.freebsd.org> Date: Wed, 27 Nov 2013 12:00:52 -0800 X-Google-Sender-Auth: lw9HkgX93JRrZYaDRRQx_gsDhBc Message-ID: Subject: Re: svn commit: r258689 - head/sys/dev/cxgbe From: Adrian Chadd To: Navdeep Parhar Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 20:00:53 -0000 Cool! Would you please bump those two patches of yours from august? I'd like to get those more widely reviewed and then into -HEAD if/when appropriate. Thanks! -a On 27 November 2013 11:54, Navdeep Parhar wrote: > Author: np > Date: Wed Nov 27 19:54:19 2013 > New Revision: 258689 > URL: http://svnweb.freebsd.org/changeset/base/258689 > > Log: > Disable an assertion that relies on some code[1] that isn't in HEAD yet. > > [1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html > > Modified: > head/sys/dev/cxgbe/t4_sge.c > > Modified: head/sys/dev/cxgbe/t4_sge.c > ============================================================================== > --- head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:51:50 2013 (r258688) > +++ head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:54:19 2013 (r258689) > @@ -1392,7 +1392,7 @@ rxb_free(struct mbuf *m, void *arg1, voi > { > uma_zone_t zone = arg1; > caddr_t cl = arg2; > -#ifdef INVARIANTS > +#ifdef notyet > u_int refcount; > > refcount = *find_buf_refcnt(cl); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 20:16:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1C34DFC; Wed, 27 Nov 2013 20:16:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 914A325A7; Wed, 27 Nov 2013 20:16:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARKGI55022040; Wed, 27 Nov 2013 20:16:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARKGIvv022039; Wed, 27 Nov 2013 20:16:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311272016.rARKGIvv022039@svn.freebsd.org> From: Alexander Motin Date: Wed, 27 Nov 2013 20:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258691 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 20:16:18 -0000 Author: mav Date: Wed Nov 27 20:16:18 2013 New Revision: 258691 URL: http://svnweb.freebsd.org/changeset/base/258691 Log: Don't count bucket allocation failures for UMA zones as their own failures. There are good reasons for this to happen, such as recursion prevention, etc. and they are not fatal since buckets are just an optimization mechanism. Real bucket allocation failures are any way counted by the bucket zones themselves, and we don't need double accounting there. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Nov 27 19:55:42 2013 (r258690) +++ head/sys/vm/uma_core.c Wed Nov 27 20:16:18 2013 (r258691) @@ -2509,7 +2509,7 @@ zone_alloc_bucket(uma_zone_t zone, void /* Don't wait for buckets, preserve caller's NOVM setting. */ bucket = bucket_alloc(zone, udata, M_NOWAIT | (flags & M_NOVM)); if (bucket == NULL) - goto out; + return (NULL); max = MIN(bucket->ub_entries, zone->uz_count); bucket->ub_cnt = zone->uz_import(zone->uz_arg, bucket->ub_bucket, @@ -2540,10 +2540,8 @@ zone_alloc_bucket(uma_zone_t zone, void } } -out: - if (bucket == NULL || bucket->ub_cnt == 0) { - if (bucket != NULL) - bucket_free(zone, bucket, udata); + if (bucket->ub_cnt == 0) { + bucket_free(zone, bucket, udata); atomic_add_long(&zone->uz_fails, 1); return (NULL); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 20:20:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB875F91; Wed, 27 Nov 2013 20:20:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA46D25CC; Wed, 27 Nov 2013 20:20:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARKK2R9022543; Wed, 27 Nov 2013 20:20:02 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARKK2Vl022542; Wed, 27 Nov 2013 20:20:02 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201311272020.rARKK2Vl022542@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 27 Nov 2013 20:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258692 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 20:20:03 -0000 Author: gnn Date: Wed Nov 27 20:20:02 2013 New Revision: 258692 URL: http://svnweb.freebsd.org/changeset/base/258692 Log: Add constants for use in interrogating various fiber and copper connectors most often used with network interfaces. The SFF-8472 standard defines the information that can be retrieved from an optic or a copper cable plugged into a NIC, most often referred to as SFP+. Examples of values that can be read include the cable vendor's name, part number, date of manufacture as well as running data such as temperature, voltage and tx and rx power. Copious comments on how to use these values with an I2C interface are given in the header file itself. MFC after: 2 weeks Added: head/sys/net/sff8472.h (contents, props changed) Added: head/sys/net/sff8472.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net/sff8472.h Wed Nov 27 20:20:02 2013 (r258692) @@ -0,0 +1,433 @@ +/*- + * Copyright (c) 2013 George V. Neville-Neil + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * The following set of constants are from Document SFF-8472 + * "Diagnostic Monitoring Interface for Optical Transceivers" revision + * 11.3 published by the SFF Committee on June 11, 2013 + * + * The SFF standard defines two ranges of addresses, each 255 bytes + * long for the storage of data and diagnostics on cables, such as + * SFP+ optics and TwinAx cables. The ranges are defined in the + * following way: + * + * Base Address 0xa0 (Identification Data) + * 0-95 Serial ID Defined by SFP MSA + * 96-127 Vendor Specific Data + * 128-255 Reserved + * + * Base Address 0xa2 (Diagnostic Data) + * 0-55 Alarm and Warning Thresholds + * 56-95 Cal Constants + * 96-119 Real Time Diagnostic Interface + * 120-127 Vendor Specific + * 128-247 User Writable EEPROM + * 248-255 Vendor Specific + * + * Note that not all addresses are supported. Where support is + * optional this is noted and instructions for checking for the + * support are supplied. + * + * All these values are read across an I2C (i squared C) bus. Any + * device wishing to read these addresses must first have support for + * i2c calls. The Chelsio T4/T5 driver (dev/cxgbe) is one such + * driver. + */ + + +/* Table 3.1 Two-wire interface ID: Data Fields */ + +#define SFF_8472_BASE 0xa0 /* Base address for all our queries. */ +#define SFF_8472_ID 0 /* Transceiver Type (Table 3.2) */ +#define SFF_8472_EXT_ID 1 /* Extended transceiver type (Table 3.3) */ +#define SFF_8472_CONNECTOR 2 /* Connector type (Table 3.4) */ +#define SFF_8472_TRANS_START 3 /* Elec or Optical Compatibility + * (Table 3.5) */ +#define SFF_8472_TRANS_END 10 +#define SFF_8472_ENCODING 11 /* Encoding Code for high speed + * serial encoding algorithm (see + * Table 3.6) */ +#define SFF_8472_BITRATE 12 /* Nominal signaling rate, units + * of 100MBd. (see details for + * rates > 25.0Gb/s) */ +#define SFF_8472_RATEID 13 /* Type of rate select + * functionality (see Table + * 3.6a) */ +#define SFF_8472_LEN_SMF_KM 14 /* Link length supported for single + * mode fiber, units of km */ +#define SFF_8472_LEN_SMF 15 /* Link length supported for single + * mode fiber, units of 100 m */ +#define SFF_8472_LEN_50UM 16 /* Link length supported for 50 um + * OM2 fiber, units of 10 m */ +#define SFF_8472_LEN_625UM 17 /* Link length supported for 62.5 + * um OM1 fiber, units of 10 m */ +#define SFF_8472_LEN_OM4 18 /* Link length supported for 50um + * OM4 fiber, units of 10m. + * Alternatively copper or direct + * attach cable, units of m */ +#define SFF_8472_LEN_OM3 19 /* Link length supported for 50 um OM3 fiber, units of 10 m */ +#define SFF_8472_VENDOR_START 20 /* Vendor name [Address A0h, Bytes + * 20-35] */ +#define SFF_8472_VENDOR_END 35 +#define SFF_8472_TRANS 36 /* Transceiver Code for electronic + * or optical compatibility (see + * Table 3.5) */ +#define SFF_8472_VENDOR_OUI_START 37 /* Vendor OUI SFP vendor IEEE + * company ID */ +#define SFF_8472_VENDOR_OUI_END 39 +#define SFF_8472_PN_START 40 /* Vendor PN */ +#define SFF_8472_PN_END 55 +#define SFF_8472_REV_START 56 /* Vendor Revision */ +#define SFF_8472_REV_END 59 +#define SFF_8472_WAVELEN_START 60 /* Wavelength Laser wavelength + * (Passive/Active Cable + * Specification Compliance) */ +#define SFF_8472_WAVELEN_END 61 +#define SFF_8472_CC_BASE 63 /* CC_BASE Check code for Base ID + * Fields (addresses 0 to 62) */ + +/* + * Extension Fields (optional) check the options before reading other + * addresses. + */ +#define SFF_8472_OPTIONS_MSB 64 /* Options Indicates which optional + * transceiver signals are + * implemented */ +#define SFF_8472_OPTIONS_LSB 65 /* (see Table 3.7) */ +#define SFF_8472_BR_MAX 66 /* BR max Upper bit rate margin, + * units of % (see details for + * rates > 25.0Gb/s) */ +#define SFF_8472_BR_MIN 67 /* Lower bit rate margin, units of + * % (see details for rates > + * 25.0Gb/s) */ +#define SFF_8472_SN_START 68 /* Vendor SN [Address A0h, Bytes 68-83] */ +#define SFF_8472_SN_END 83 +#define SFF_8472_DATE_START 84 /* Date code Vendor’s manufacturing + * date code (see Table 3.8) */ +#define SFF_8472_DATE_END 91 +#define SFF_8472_DIAG_TYPE 92 /* Diagnostic Monitoring Type + * Indicates which type of + * diagnostic monitoring is + * implemented (if any) in the + * transceiver (see Table 3.9) + */ +#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ +#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ +#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ +#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ +#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. + * See SFF-8472 doc. */ + +#define SFF_8472_ENHANCED 93 /* Enhanced Options Indicates which + * optional enhanced features are + * implemented (if any) in the + * transceiver (see Table 3.10) */ +#define SFF_8472_COMPLIANCE 94 /* SFF-8472 Compliance Indicates + * which revision of SFF-8472 the + * transceiver complies with. (see + * Table 3.12)*/ +#define SFF_8472_CC_EXT 95 /* Check code for the Extended ID + * Fields (addresses 64 to 94) + */ + +#define SFF_8472_VENDOR_RSRVD_START 96 +#define SFF_8472_VENDOR_RSRVD_END 127 + +#define SFF_8472_RESERVED_START 128 +#define SFF_8472_RESERVED_END 255 + + /* + * Diagnostics are available at the two wire address 0xa2. All + * diagnostics are OPTIONAL so you should check 0xa0 registers 92 to + * see which, if any are supported. + */ + +#define SFF_8472_DIAG 0xa2 /* Base address for diagnostics. */ + + /* + * Table 3.15 Alarm and Warning Thresholds All values are 2 bytes + * and MUST be read in a single read operation starting at the MSB + */ + +#define SFF_8472_TEMP_HIGH_ALM 0 /* Temp High Alarm */ +#define SFF_8472_TEMP_LOW_ALM 2 /* Temp Low Alarm */ +#define SFF_8472_TEMP_HIGH_WARN 4 /* Temp High Warning */ +#define SFF_8472_TEMP_LOW_WARN 6 /* Temp Low Warning */ +#define SFF_8472_VOLTAGE_HIGH_ALM 8 /* Voltage High Alarm */ +#define SFF_8472_VOLTAGE_LOW_ALM 10 /* Voltage Low Alarm */ +#define SFF_8472_VOLTAGE_HIGH_WARN 12 /* Voltage High Warning */ +#define SFF_8472_VOLTAGE_LOW_WARN 14 /* Voltage Low Warning */ +#define SFF_8472_BIAS_HIGH_ALM 16 /* Bias High Alarm */ +#define SFF_8472_BIAS_LOW_ALM 18 /* Bias Low Alarm */ +#define SFF_8472_BIAS_HIGH_WARN 20 /* Bias High Warning */ +#define SFF_8472_BIAS_LOW_WARN 22 /* Bias Low Warning */ +#define SFF_8472_TX_POWER_HIGH_ALM 24 /* TX Power High Alarm */ +#define SFF_8472_TX_POWER_LOW_ALM 26 /* TX Power Low Alarm */ +#define SFF_8472_TX_POWER_HIGH_WARN 28 /* TX Power High Warning */ +#define SFF_8472_TX_POWER_LOW_WARN 30 /* TX Power Low Warning */ +#define SFF_8472_RX_POWER_HIGH_ALM 32 /* RX Power High Alarm */ +#define SFF_8472_RX_POWER_LOW_ALM 34 /* RX Power Low Alarm */ +#define SFF_8472_RX_POWER_HIGH_WARN 36 /* RX Power High Warning */ +#define SFF_8472_RX_POWER_LOW_WARN 38 /* RX Power Low Warning */ + +#define SFF_8472_RX_POWER4 56 /* Rx_PWR(4) Single precision + * floating point calibration data + * - Rx optical power. Bit 7 of + * byte 56 is MSB. Bit 0 of byte + * 59 is LSB. Rx_PWR(4) should be + * set to zero for “internally + * calibrated†devices. */ +#define SFF_8472_RX_POWER3 60 /* Rx_PWR(3) Single precision + * floating point calibration data + * - Rx optical power. Bit 7 of + * byte 60 is MSB. Bit 0 of byte 63 + * is LSB. Rx_PWR(3) should be set + * to zero for “internally + * calibrated†devices.*/ +#define SFF_8472_RX_POWER2 64 /* Rx_PWR(2) Single precision + * floating point calibration data, + * Rx optical power. Bit 7 of byte + * 64 is MSB, bit 0 of byte 67 is + * LSB. Rx_PWR(2) should be set to + * zero for “internally calibrated†+ * devices. */ +#define SFF_8472_RX_POWER1 68 /* Rx_PWR(1) Single precision + * floating point calibration data, + * Rx optical power. Bit 7 of byte + * 68 is MSB, bit 0 of byte 71 is + * LSB. Rx_PWR(1) should be set to + * 1 for “internally calibrated†+ * devices. */ +#define SFF_8472_RX_POWER0 72 /* Rx_PWR(0) Single precision + * floating point calibration data, + * Rx optical power. Bit 7 of byte + * 72 is MSB, bit 0 of byte 75 is + * LSB. Rx_PWR(0) should be set to + * zero for “internally calibrated†+ * devices. */ +#define SFF_8472_TX_I_SLOPE 76 /* Tx_I(Slope) Fixed decimal + * (unsigned) calibration data, + * laser bias current. Bit 7 of + * byte 76 is MSB, bit 0 of byte 77 + * is LSB. Tx_I(Slope) should be + * set to 1 for “internally + * calibrated†devices. */ +#define SFF_8472_TX_I_OFFSET 78 /* Tx_I(Offset) Fixed decimal + * (signed two’s complement) + * calibration data, laser bias + * current. Bit 7 of byte 78 is + * MSB, bit 0 of byte 79 is + * LSB. Tx_I(Offset) should be set + * to zero for “internally + * calibrated†devices. */ +#define SFF_8472_TX_POWER_SLOPE 80 /* Tx_PWR(Slope) Fixed decimal + * (unsigned) calibration data, + * transmitter coupled output + * power. Bit 7 of byte 80 is MSB, + * bit 0 of byte 81 is LSB. + * Tx_PWR(Slope) should be set to 1 + * for “internally calibrated†+ * devices. */ +#define SFF_8472_TX_POWER_OFFSET 82 /* Tx_PWR(Offset) Fixed decimal + * (signed two’s complement) + * calibration data, transmitter + * coupled output power. Bit 7 of + * byte 82 is MSB, bit 0 of byte 83 + * is LSB. Tx_PWR(Offset) should be + * set to zero for “internally + * calibrated†devices. */ +#define SFF_8472_T_SLOPE 84 /* T (Slope) Fixed decimal + * (unsigned) calibration data, + * internal module temperature. Bit + * 7 of byte 84 is MSB, bit 0 of + * byte 85 is LSB. T(Slope) should + * be set to 1 for “internally + * calibrated†devices. */ +#define SFF_8472_T_OFFSET 86 /* T (Offset) Fixed decimal (signed + * two’s complement) calibration + * data, internal module + * temperature. Bit 7 of byte 86 is + * MSB, bit 0 of byte 87 is LSB. + * T(Offset) should be set to zero + * for “internally calibrated†+ * devices. */ +#define SFF_8472_V_SLOPE 88 /* V (Slope) Fixed decimal + * (unsigned) calibration data, + * internal module supply + * voltage. Bit 7 of byte 88 is + * MSB, bit 0 of byte 89 is + * LSB. V(Slope) should be set to 1 + * for “internally calibrated†+ * devices. */ +#define SFF_8472_V_OFFSET 90 /* V (Offset) Fixed decimal (signed + * two’s complement) calibration + * data, internal module supply + * voltage. Bit 7 of byte 90 is + * MSB. Bit 0 of byte 91 is + * LSB. V(Offset) should be set to + * zero for “internally calibrated†+ * devices. */ +#define SFF_8472_CHECKSUM 95 /* Checksum Byte 95 contains the + * low order 8 bits of the sum of + * bytes 0 – 94. */ + /* Internal measurements. */ + +#define SFF_8472_TEMP 96 /* Internally measured module temperature. */ +#define SFF_8472_VCC 98 /* Internally measured supply + * voltage in transceiver. + */ +#define SFF_8472_TX_BIAS 100 /* Internally measured TX Bias Current. */ +#define SFF_8472_TX_POWER 102 /* Measured TX output power. */ +#define SFF_8472_RX_POWER 104 /* Measured RX input power. */ + +#define SFF_8472_STATUS 110 /* See below */ + + /* Status Bits Described */ + +/* + * TX Disable State Digital state of the TX Disable Input Pin. Updated + * within 100ms of change on pin. + */ +#define SFF_8472_STATUS_TX_DISABLE (1 << 7) + +/* + * Select Read/write bit that allows software disable of + * laser. Writing ‘1’ disables laser. See Table 3.11 for + * enable/disable timing requirements. This bit is “ORâ€d with the hard + * TX_DISABLE pin value. Note, per SFP MSA TX_DISABLE pin is default + * enabled unless pulled low by hardware. If Soft TX Disable is not + * implemented, the transceiver ignores the value of this bit. Default + * power up value is zero/low. + */ +#define SFF_8472_STATUS_SOFT_TX_DISABLE (1 << 6) + +/* + * RS(1) State Digital state of SFP input pin AS(1) per SFF-8079 or + * RS(1) per SFF-8431. Updated within 100ms of change on pin. See A2h + * Byte 118, Bit 3 for Soft RS(1) Select control information. + */ +#define SFF_8472_RS_STATE (1 << 5) + +/* + * Rate_Select State [aka. “RS(0)â€] Digital state of the SFP + * Rate_Select Input Pin. Updated within 100ms of change on pin. Note: + * This pin is also known as AS(0) in SFF-8079 and RS(0) in SFF-8431. + */ +#define SFF_8472_STATUS_SELECT_STATE (1 << 4) + +/* + * Read/write bit that allows software rate select control. Writing + * ‘1’ selects full bandwidth operation. This bit is “OR’d with the + * hard Rate_Select, AS(0) or RS(0) pin value. See Table 3.11 for + * timing requirements. Default at power up is logic zero/low. If Soft + * Rate Select is not implemented, the transceiver ignores the value + * of this bit. Note: Specific transceiver behaviors of this bit are + * identified in Table 3.6a and referenced documents. See Table 3.18a, + * byte 118, bit 3 for Soft RS(1) Select. + */ +#define SFF_8472_STATUS_SOFT_RATE_SELECT (1 << 3) + +/* + * TX Fault State Digital state of the TX Fault Output Pin. Updated + * within 100ms of change on pin. + */ +#define SFF_8472_STATUS_TX_FAULT_STATE (1 << 2) + +/* + * Digital state of the RX_LOS Output Pin. Updated within 100ms of + * change on pin. + */ +#define SFF_8472_STATUS_RX_LOS (1 << 1) + +/* + * Indicates transceiver has achieved power up and data is ready. Bit + * remains high until data is ready to be read at which time the + * device sets the bit low. + */ +#define SFF_8472_STATUS_DATA_READY (1 << 0) + +/* Table 3.2 Identifier values */ +#define SFF_8472_ID_UNKNOWN 0x0 /* Unknown or unspecified */ +#define SFF_8472_ID_GBIC 0x1 /* GBIC */ +#define SFF_8472_ID_SFF 0x2 /* Module soldered to motherboard (ex: SFF)*/ +#define SFF_8472_ID_SFP 0x3 /* SFP or SFP “Plus†*/ +#define SFF_8472_ID_XBI 0x4 /* Reserved for “300 pin XBI†devices */ +#define SFF_8472_ID_XENPAK 0x5 /* Reserved for “Xenpak†devices */ +#define SFF_8472_ID_XFP 0x6 /* Reserved for “XFP†devices */ +#define SFF_8472_ID_XFF 0x7 /* Reserved for “XFF†devices */ +#define SFF_8472_ID_XFPE 0x8 /* Reserved for “XFP-E†devices */ +#define SFF_8472_ID_XPAK 0x9 /* Reserved for “XPak†devices */ +#define SFF_8472_ID_X2 0xA /* Reserved for “X2†devices */ +#define SFF_8472_ID_DWDM_SFP 0xB /* Reserved for “DWDM-SFP†devices */ +#define SFF_8472_ID_QSFP 0xC /* Reserved for “QSFP†devices */ +#define SFF_8472_ID_LAST SFF_8472_ID_QSFP + +static char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", + "GBIC", + "SFF", + "SFP", + "XBI", + "Xenpak", + "XFP", + "XFF", + "XFP-E", + "XPak", + "X2", + "DWDM-SFP", + "QSFP"}; + +/* Table 3.13 and 3.14 Temperature Conversion Values */ +#define SFF_8472_TEMP_SIGN (1 << 15) +#define SFF_8472_TEMP_SHIFT 8 +#define SFF_8472_TEMP_MSK 0xEF00 +#define SFF_8472_TEMP_FRAC 0x00FF + +/* Internal Callibration Conversion factors */ + +/* + * Represented as a 16 bit unsigned integer with the voltage defined + * as the full 16 bit value (0 – 65535) with LSB equal to 100 uVolt, + * yielding a total range of 0 to +6.55 Volts. + */ +#define SFF_8472_VCC_FACTOR 10000.0 + +/* + * Represented as a 16 bit unsigned integer with the current defined + * as the full 16 bit value (0 – 65535) with LSB equal to 2 uA, + * yielding a total range of 0 to 131 mA. + */ + +#define SFF_8472_BIAS_FACTOR 2000.0 + +/* + * Represented as a 16 bit unsigned integer with the power defined as + * the full 16 bit value (0 – 65535) with LSB equal to 0.1 uW, + * yielding a total range of 0 to 6.5535 mW (~ -40 to +8.2 dBm). + */ + +#define SFF_8472_POWER_FACTOR 10000.0 From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 20:56:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DF59F7A; Wed, 27 Nov 2013 20:56:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E25227E4; Wed, 27 Nov 2013 20:56:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARKuBSs035884; Wed, 27 Nov 2013 20:56:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARKuBuS035883; Wed, 27 Nov 2013 20:56:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311272056.rARKuBuS035883@svn.freebsd.org> From: Alexander Motin Date: Wed, 27 Nov 2013 20:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258693 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 20:56:17 -0000 Author: mav Date: Wed Nov 27 20:56:10 2013 New Revision: 258693 URL: http://svnweb.freebsd.org/changeset/base/258693 Log: Make UMA to not blindly force offpage slab header allocation for large (> PAGE_SIZE) zones. If zone is not multiple to PAGE_SIZE, there may be enough space for the header at the last page, so we may avoid extra header memory allocation and hash table update/lookup. ZFS creates bunch of odd-sized UMA zones (5120, 6144, 7168, 10240, 14336). This change gives good use to at least some of otherwise lost memory there. Reviewed by: avg Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Wed Nov 27 20:20:02 2013 (r258692) +++ head/sys/vm/uma_core.c Wed Nov 27 20:56:10 2013 (r258693) @@ -1318,6 +1318,7 @@ keg_small_init(uma_keg_t keg) static void keg_large_init(uma_keg_t keg) { + u_int shsize; KASSERT(keg != NULL, ("Keg is null in keg_large_init")); KASSERT((keg->uk_flags & UMA_ZFLAG_CACHEONLY) == 0, @@ -1334,8 +1335,21 @@ keg_large_init(uma_keg_t keg) if (keg->uk_flags & UMA_ZFLAG_INTERNAL) return; - keg->uk_flags |= UMA_ZONE_OFFPAGE; - if ((keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) + /* Check whether we have enough space to not do OFFPAGE. */ + if ((keg->uk_flags & UMA_ZONE_OFFPAGE) == 0) { + shsize = sizeof(struct uma_slab); + if (keg->uk_flags & UMA_ZONE_REFCNT) + shsize += keg->uk_ipers * sizeof(uint32_t); + if (shsize & UMA_ALIGN_PTR) + shsize = (shsize & ~UMA_ALIGN_PTR) + + (UMA_ALIGN_PTR + 1); + + if ((PAGE_SIZE * keg->uk_ppera) - keg->uk_rsize < shsize) + keg->uk_flags |= UMA_ZONE_OFFPAGE; + } + + if ((keg->uk_flags & UMA_ZONE_OFFPAGE) && + (keg->uk_flags & UMA_ZONE_VTOSLAB) == 0) keg->uk_flags |= UMA_ZONE_HASH; } From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 21:51:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5E25426; Wed, 27 Nov 2013 21:51:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4EAE2D77; Wed, 27 Nov 2013 21:51:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARLpYje056186; Wed, 27 Nov 2013 21:51:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARLpY6b056185; Wed, 27 Nov 2013 21:51:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311272151.rARLpY6b056185@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 27 Nov 2013 21:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258694 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 21:51:34 -0000 Author: nwhitehorn Date: Wed Nov 27 21:51:34 2013 New Revision: 258694 URL: http://svnweb.freebsd.org/changeset/base/258694 Log: Make RTAS calls, which call setfault() to recover from machine checks, preserve any existing fault buffer. RTAS calls are meant to be safe from interrupt context (and are indeed used there to implement the xics PIC drvier). Without this, calling into RTAS in interrupt context would have the effect of clearing any existing onfault state of the interrupted thread, potentially leading to a panic. Modified: head/sys/powerpc/ofw/rtas.c Modified: head/sys/powerpc/ofw/rtas.c ============================================================================== --- head/sys/powerpc/ofw/rtas.c Wed Nov 27 20:56:10 2013 (r258693) +++ head/sys/powerpc/ofw/rtas.c Wed Nov 27 21:51:34 2013 (r258694) @@ -192,7 +192,7 @@ int rtas_call_method(cell_t token, int nargs, int nreturns, ...) { vm_offset_t argsptr; - faultbuf env; + faultbuf env, *oldfaultbuf; va_list ap; struct { cell_t token; @@ -221,6 +221,7 @@ rtas_call_method(cell_t token, int nargs /* Get rid of any stale machine checks that have been waiting. */ __asm __volatile ("sync; isync"); + oldfaultbuf = curthread->td_pcb->pcb_onfault; if (!setfault(env)) { __asm __volatile ("sync"); result = rtascall(argsptr, rtas_private_data); @@ -228,7 +229,7 @@ rtas_call_method(cell_t token, int nargs } else { result = RTAS_HW_ERROR; } - curthread->td_pcb->pcb_onfault = 0; + curthread->td_pcb->pcb_onfault = oldfaultbuf; __asm __volatile ("sync"); rtas_real_unmap(argsptr, &args, sizeof(args)); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 21:55:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AE356D9; Wed, 27 Nov 2013 21:55:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 429872DCA; Wed, 27 Nov 2013 21:55:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARLtiaT056744; Wed, 27 Nov 2013 21:55:44 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARLtiib056743; Wed, 27 Nov 2013 21:55:44 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201311272155.rARLtiib056743@svn.freebsd.org> From: Juli Mallett Date: Wed, 27 Nov 2013 21:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258695 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 21:55:44 -0000 Author: jmallett Date: Wed Nov 27 21:55:43 2013 New Revision: 258695 URL: http://svnweb.freebsd.org/changeset/base/258695 Log: Provide a helpful diagnostic when the minimum size rounded to the block size would exceed the maximum size. This can be a difficult problem to diagnose if one is, for instance, using -s with a fixed size in a script and the bsize calculated for a filesystem image changes, necessitating a re-rounding of the image size or a hand-setting of the bsize. Previously one would get a cryptic message about how the size exceeded the maximum size, which normally only happens if the contents of the image are larger than specified. Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Wed Nov 27 21:51:34 2013 (r258694) +++ head/usr.sbin/makefs/ffs.c Wed Nov 27 21:55:43 2013 (r258695) @@ -361,6 +361,13 @@ ffs_validate(const char *dir, fsnode *ro if (ffs_opts->avgfpdir == -1) ffs_opts->avgfpdir = AFPDIR; + if (roundup(fsopts->minsize, ffs_opts->bsize) > fsopts->maxsize) + errx(1, "`%s' minsize of %lld rounded up to ffs bsize of %d " + "exceeds maxsize %lld. Lower bsize, or round the minimum " + "and maximum sizes to bsize.", dir, + (long long)fsopts->minsize, ffs_opts->bsize, + (long long)fsopts->maxsize); + /* calculate size of tree */ ffs_size_dir(root, fsopts); fsopts->inodes += ROOTINO; /* include first two inodes */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 22:01:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1ACB094F; Wed, 27 Nov 2013 22:01:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08BA02E39; Wed, 27 Nov 2013 22:01:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARM1Ai4059670; Wed, 27 Nov 2013 22:01:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARM1AP4059666; Wed, 27 Nov 2013 22:01:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311272201.rARM1AP4059666@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 27 Nov 2013 22:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258696 - in head/sys/powerpc: aim booke powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 22:01:11 -0000 Author: nwhitehorn Date: Wed Nov 27 22:01:09 2013 New Revision: 258696 URL: http://svnweb.freebsd.org/changeset/base/258696 Log: badaddr() is used only in the grackle PCI driver, so move its definition there. Clean up a spurious setfault() declaration as well. Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap.c head/sys/powerpc/booke/trap.c head/sys/powerpc/powermac/grackle.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Wed Nov 27 21:55:43 2013 (r258695) +++ head/sys/powerpc/aim/machdep.c Wed Nov 27 22:01:09 2013 (r258696) @@ -157,8 +157,6 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach uintptr_t powerpc_init(vm_offset_t, vm_offset_t, vm_offset_t, void *); -int setfault(faultbuf); /* defined in locore.S */ - long Maxmem = 0; long realmem = 0; Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Wed Nov 27 21:55:43 2013 (r258695) +++ head/sys/powerpc/aim/trap.c Wed Nov 27 22:01:09 2013 (r258696) @@ -87,12 +87,6 @@ static int handle_user_slb_spill(pmap_t extern int n_slbs; #endif -int setfault(faultbuf); /* defined in locore.S */ - -/* Why are these not defined in a header? */ -int badaddr(void *, size_t); -int badaddr_read(void *, size_t, int *); - struct powerpc_exception { u_int vector; char *name; @@ -690,59 +684,6 @@ trap_pfault(struct trapframe *frame, int return (SIGSEGV); } -int -badaddr(void *addr, size_t size) -{ - return (badaddr_read(addr, size, NULL)); -} - -int -badaddr_read(void *addr, size_t size, int *rptr) -{ - struct thread *td; - faultbuf env; - int x; - - /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); - - td = curthread; - - if (setfault(env)) { - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); - return 1; - } - - __asm __volatile ("sync"); - - switch (size) { - case 1: - x = *(volatile int8_t *)addr; - break; - case 2: - x = *(volatile int16_t *)addr; - break; - case 4: - x = *(volatile int32_t *)addr; - break; - default: - panic("badaddr: invalid size (%zd)", size); - } - - /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); - - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ - - /* Use the value to avoid reorder. */ - if (rptr) - *rptr = x; - - return (0); -} - /* * For now, this only deals with the particular unaligned access case * that gcc tends to generate. Eventually it should handle all of the Modified: head/sys/powerpc/booke/trap.c ============================================================================== --- head/sys/powerpc/booke/trap.c Wed Nov 27 21:55:43 2013 (r258695) +++ head/sys/powerpc/booke/trap.c Wed Nov 27 22:01:09 2013 (r258696) @@ -87,12 +87,6 @@ static int fix_unaligned(struct thread * static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); -int setfault(faultbuf); /* defined in locore.S */ - -/* Why are these not defined in a header? */ -int badaddr(void *, size_t); -int badaddr_read(void *, size_t, int *); - struct powerpc_exception { u_int vector; char *name; @@ -461,60 +455,6 @@ trap_pfault(struct trapframe *frame, int return ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } -int -badaddr(void *addr, size_t size) -{ - - return (badaddr_read(addr, size, NULL)); -} - -int -badaddr_read(void *addr, size_t size, int *rptr) -{ - struct thread *td; - faultbuf env; - int x; - - /* Get rid of any stale machine checks that have been waiting. */ - __asm __volatile ("sync; isync"); - - td = curthread; - - if (setfault(env)) { - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); - return (1); - } - - __asm __volatile ("sync"); - - switch (size) { - case 1: - x = *(volatile int8_t *)addr; - break; - case 2: - x = *(volatile int16_t *)addr; - break; - case 4: - x = *(volatile int32_t *)addr; - break; - default: - panic("badaddr: invalid size (%d)", size); - } - - /* Make sure we took the machine check, if we caused one. */ - __asm __volatile ("sync; isync"); - - td->td_pcb->pcb_onfault = 0; - __asm __volatile ("sync"); /* To be sure. */ - - /* Use the value to avoid reorder. */ - if (rptr) - *rptr = x; - - return (0); -} - /* * For now, this only deals with the particular unaligned access case * that gcc tends to generate. Eventually it should handle all of the Modified: head/sys/powerpc/powermac/grackle.c ============================================================================== --- head/sys/powerpc/powermac/grackle.c Wed Nov 27 21:55:43 2013 (r258695) +++ head/sys/powerpc/powermac/grackle.c Wed Nov 27 22:01:09 2013 (r258696) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -59,8 +60,6 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" -int badaddr(void *, size_t); /* XXX */ - /* * Device interface. */ @@ -81,6 +80,9 @@ static void grackle_write_config(device static int grackle_enable_config(struct grackle_softc *, u_int, u_int, u_int, u_int); static void grackle_disable_config(struct grackle_softc *); +static int badaddr(void *, size_t); + +int setfault(faultbuf); /* defined in locore.S */ /* * Driver methods. @@ -238,6 +240,50 @@ grackle_disable_config(struct grackle_so out32rb(sc->sc_addr, 0); } +static int +badaddr(void *addr, size_t size) +{ + struct thread *td; + faultbuf env, *oldfaultbuf; + int x; + + /* Get rid of any stale machine checks that have been waiting. */ + __asm __volatile ("sync; isync"); + + td = curthread; + + oldfaultbuf = td->td_pcb->pcb_onfault; + if (setfault(env)) { + td->td_pcb->pcb_onfault = oldfaultbuf; + __asm __volatile ("sync"); + return 1; + } + + __asm __volatile ("sync"); + + switch (size) { + case 1: + x = *(volatile int8_t *)addr; + break; + case 2: + x = *(volatile int16_t *)addr; + break; + case 4: + x = *(volatile int32_t *)addr; + break; + default: + panic("badaddr: invalid size (%zd)", size); + } + + /* Make sure we took the machine check, if we caused one. */ + __asm __volatile ("sync; isync"); + + td->td_pcb->pcb_onfault = oldfaultbuf; + __asm __volatile ("sync"); /* To be sure. */ + + return (0); +} + /* * Driver to swallow Grackle host bridges from the PCI bus side. */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 22:02:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA1BAAB1; Wed, 27 Nov 2013 22:02:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 993C22E52; Wed, 27 Nov 2013 22:02:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARM2tdm059983; Wed, 27 Nov 2013 22:02:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARM2tjA059982; Wed, 27 Nov 2013 22:02:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311272202.rARM2tjA059982@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 27 Nov 2013 22:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258697 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 22:02:55 -0000 Author: nwhitehorn Date: Wed Nov 27 22:02:55 2013 New Revision: 258697 URL: http://svnweb.freebsd.org/changeset/base/258697 Log: This driver doesn't need the /options node, so don't check for it. Modified: head/sys/powerpc/pseries/phyp_console.c Modified: head/sys/powerpc/pseries/phyp_console.c ============================================================================== --- head/sys/powerpc/pseries/phyp_console.c Wed Nov 27 22:01:09 2013 (r258696) +++ head/sys/powerpc/pseries/phyp_console.c Wed Nov 27 22:02:55 2013 (r258697) @@ -192,11 +192,9 @@ uart_phyp_cnprobe(struct consdev *cp) { char buf[64]; ihandle_t stdout; - phandle_t input, opts, chosen; + phandle_t input, chosen; static struct uart_phyp_softc sc; - if ((opts = OF_finddevice("/options")) == -1) - goto fail; if ((chosen = OF_finddevice("/chosen")) == -1) goto fail; From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 22:17:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81A071EC; Wed, 27 Nov 2013 22:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 618E42F11; Wed, 27 Nov 2013 22:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARMH1gg065213; Wed, 27 Nov 2013 22:17:01 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARMH1kY065205; Wed, 27 Nov 2013 22:17:01 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201311272217.rARMH1kY065205@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 27 Nov 2013 22:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258698 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 22:17:01 -0000 Author: np Date: Wed Nov 27 22:17:00 2013 New Revision: 258698 URL: http://svnweb.freebsd.org/changeset/base/258698 Log: cxgbetool: "modinfo" command to display SFP+ module information. trantor:~# cxgbetool t5nex0 modinfo 1 ID: SFP Vendor FINISAR CORP. SN AJ10JQR PN FTLX8571D3BCL Rev A Temp: +35C Vcc 3.225600V TX Bias 2.176000uA TX Power 0.588800mW RX Power 0.486400mW Submitted by: gnn Modified: head/tools/tools/cxgbetool/Makefile head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/Makefile ============================================================================== --- head/tools/tools/cxgbetool/Makefile Wed Nov 27 22:02:55 2013 (r258697) +++ head/tools/tools/cxgbetool/Makefile Wed Nov 27 22:17:00 2013 (r258698) @@ -3,7 +3,7 @@ PROG= cxgbetool SRCS= cxgbetool.c NO_MAN= -CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I. +CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. BINDIR?= /usr/sbin .include Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Wed Nov 27 22:02:55 2013 (r258697) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Nov 27 22:17:00 2013 (r258698) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "t4_ioctl.h" @@ -94,6 +95,7 @@ usage(FILE *fp) "\ti2c [] read from i2c device\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" + "\tmodinfo optics/cable information\n" "\treg
[=] read/write register\n" "\treg64
[=] read/write 64 bit register\n" "\tregdump [] ... dump registers\n" @@ -1828,6 +1830,135 @@ set_tracer(uint8_t idx, int argc, const } static int +modinfo(int argc, const char *argv[]) +{ + long port; + char string[16], *p; + struct t4_i2c_data i2cd; + int rc, i; + uint16_t temp, vcc, tx_bias, tx_power, rx_power; + + if (argc != 1) { + warnx("must supply a port"); + return (EINVAL); + } + + p = str_to_number(argv[0], &port, NULL); + if (*p || port > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + + bzero(&i2cd, sizeof(i2cd)); + i2cd.len = 1; + i2cd.port_id = port; + i2cd.dev_addr = SFF_8472_BASE; + + i2cd.offset = SFF_8472_ID; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if (i2cd.data[0] > SFF_8472_ID_LAST) + printf("Unknown ID\n"); + else + printf("ID: %s\n", sff_8472_id[i2cd.data[0]]); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_VENDOR_START; i < SFF_8472_VENDOR_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_VENDOR_START] = i2cd.data[0]; + } + printf("Vendor %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_SN_START; i < SFF_8472_SN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_SN_START] = i2cd.data[0]; + } + printf("SN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_PN_START; i < SFF_8472_PN_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_PN_START] = i2cd.data[0]; + } + printf("PN %s\n", string); + + bzero(&string, sizeof(string)); + for (i = SFF_8472_REV_START; i < SFF_8472_REV_END; i++) { + i2cd.offset = i; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + string[i - SFF_8472_REV_START] = i2cd.data[0]; + } + printf("Rev %s\n", string); + + i2cd.offset = SFF_8472_DIAG_TYPE; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + + if ((char )i2cd.data[0] & (SFF_8472_DIAG_IMPL | + SFF_8472_DIAG_INTERNAL)) { + + /* Switch to reading from the Diagnostic address. */ + i2cd.dev_addr = SFF_8472_DIAG; + i2cd.len = 1; + + i2cd.offset = SFF_8472_TEMP; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + temp = i2cd.data[0] << 8; + printf("Temp: "); + if ((temp & SFF_8472_TEMP_SIGN) == SFF_8472_TEMP_SIGN) + printf("-"); + else + printf("+"); + printf("%dC\n", (temp & SFF_8472_TEMP_MSK) >> + SFF_8472_TEMP_SHIFT); + + i2cd.offset = SFF_8472_VCC; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + vcc = i2cd.data[0] << 8; + printf("Vcc %fV\n", vcc / SFF_8472_VCC_FACTOR); + + i2cd.offset = SFF_8472_TX_BIAS; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_bias = i2cd.data[0] << 8; + printf("TX Bias %fuA\n", tx_bias / SFF_8472_BIAS_FACTOR); + + i2cd.offset = SFF_8472_TX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + tx_power = i2cd.data[0] << 8; + printf("TX Power %fmW\n", tx_power / SFF_8472_POWER_FACTOR); + + i2cd.offset = SFF_8472_RX_POWER; + if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0) + goto fail; + rx_power = i2cd.data[0] << 8; + printf("RX Power %fmW\n", rx_power / SFF_8472_POWER_FACTOR); + + } else + printf("Diagnostics not supported.\n"); + + return(0); + +fail: + if (rc == EPERM) + warnx("No module/cable in port %ld", port); + return (rc); + +} + +static int tracer_cmd(int argc, const char *argv[]) { long long val; @@ -1900,6 +2031,8 @@ run_cmd(int argc, const char *argv[]) rc = clearstats(argc, argv); else if (!strcmp(cmd, "tracer")) rc = tracer_cmd(argc, argv); + else if (!strcmp(cmd, "modinfo")) + rc = modinfo(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 22:18:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 826A4330; Wed, 27 Nov 2013 22:18:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70A072F18; Wed, 27 Nov 2013 22:18:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARMIBIv065402; Wed, 27 Nov 2013 22:18:11 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARMI9Y1065386; Wed, 27 Nov 2013 22:18:09 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311272218.rARMI9Y1065386@svn.freebsd.org> From: Neel Natu Date: Wed, 27 Nov 2013 22:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258699 - in head: sys/amd64/vmm sys/amd64/vmm/io usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 22:18:11 -0000 Author: neel Date: Wed Nov 27 22:18:08 2013 New Revision: 258699 URL: http://svnweb.freebsd.org/changeset/base/258699 Log: Add support for level triggered interrupt pins on the vioapic. Prior to this commit level triggered interrupts would work as long as the pin was not shared among multiple interrupt sources. The vlapic now keeps track of level triggered interrupts in the trigger mode register and will forward the EOI for a level triggered interrupt to the vioapic. The vioapic in turn uses the EOI to sample the level on the pin and re-inject the vector if the pin is still asserted. The vhpet is the first consumer of level triggered interrupts and advertises that it can generate interrupts on pins 20 through 23 of the vioapic. Discussed with: grehan@ Modified: head/sys/amd64/vmm/io/ppt.c head/sys/amd64/vmm/io/vhpet.c head/sys/amd64/vmm/io/vioapic.c head/sys/amd64/vmm/io/vioapic.h head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm_dev.c head/sys/amd64/vmm/vmm_ktr.h head/sys/amd64/vmm/vmm_lapic.c head/sys/amd64/vmm/vmm_lapic.h head/usr.sbin/bhyve/acpi.c head/usr.sbin/bhyve/mptbl.c Modified: head/sys/amd64/vmm/io/ppt.c ============================================================================== --- head/sys/amd64/vmm/io/ppt.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/ppt.c Wed Nov 27 22:18:08 2013 (r258699) @@ -421,7 +421,7 @@ pptintr(void *arg) vec = pptarg->vec; if (ppt->vm != NULL) - (void) lapic_set_intr(ppt->vm, pptarg->vcpu, vec); + lapic_intr_edge(ppt->vm, pptarg->vcpu, vec); else { /* * XXX Modified: head/sys/amd64/vmm/io/vhpet.c ============================================================================== --- head/sys/amd64/vmm/io/vhpet.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/vhpet.c Wed Nov 27 22:18:08 2013 (r258699) @@ -266,14 +266,14 @@ vhpet_timer_interrupt(struct vhpet *vhpe if (apicid != 0xff) { /* unicast */ vcpuid = vm_apicid2vcpuid(vhpet->vm, apicid); - lapic_set_intr(vhpet->vm, vcpuid, vector); + lapic_intr_edge(vhpet->vm, vcpuid, vector); } else { /* broadcast */ dmask = vm_active_cpus(vhpet->vm); while ((vcpuid = CPU_FFS(&dmask)) != 0) { vcpuid--; CPU_CLR(vcpuid, &dmask); - lapic_set_intr(vhpet->vm, vcpuid, vector); + lapic_intr_edge(vhpet->vm, vcpuid, vector); } } return; @@ -725,8 +725,9 @@ done: struct vhpet * vhpet_init(struct vm *vm) { - int i; + int i, pincount; struct vhpet *vhpet; + uint64_t allowed_irqs; struct vhpet_callout_arg *arg; struct bintime bt; @@ -737,12 +738,20 @@ vhpet_init(struct vm *vm) FREQ2BT(HPET_FREQ, &bt); vhpet->freq_sbt = bttosbt(bt); + pincount = vioapic_pincount(vm); + if (pincount >= 24) + allowed_irqs = 0x00f00000; /* irqs 20, 21, 22 and 23 */ + else + allowed_irqs = 0; + /* * Initialize HPET timer hardware state. */ for (i = 0; i < VHPET_NUM_TIMERS; i++) { - vhpet->timer[i].cap_config = 0UL << 32 | - HPET_TCAP_FSB_INT_DEL | HPET_TCAP_PER_INT; + vhpet->timer[i].cap_config = allowed_irqs << 32; + vhpet->timer[i].cap_config |= HPET_TCAP_PER_INT; + vhpet->timer[i].cap_config |= HPET_TCAP_FSB_INT_DEL; + vhpet->timer[i].compval = 0xffffffff; callout_init(&vhpet->timer[i].callout, 1); Modified: head/sys/amd64/vmm/io/vioapic.c ============================================================================== --- head/sys/amd64/vmm/io/vioapic.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/vioapic.c Wed Nov 27 22:18:08 2013 (r258699) @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #define IOREGSEL 0x00 #define IOWIN 0x10 -#define REDIR_ENTRIES 16 -#define INTR_ASSERTED(vioapic, pin) ((vioapic)->rtbl[(pin)].pinstate == true) +#define REDIR_ENTRIES 24 +#define RTBL_RO_BITS ((uint64_t)(IOART_REM_IRR | IOART_DELIVS)) struct vioapic { struct vm *vm; @@ -59,8 +59,7 @@ struct vioapic { uint32_t ioregsel; struct { uint64_t reg; - bool pinstate; - bool pending; + int acnt; /* sum of pin asserts (+1) and deasserts (-1) */ } rtbl[REDIR_ENTRIES]; }; @@ -79,6 +78,9 @@ static MALLOC_DEFINE(M_VIOAPIC, "vioapic #define VIOAPIC_CTR3(vioapic, fmt, a1, a2, a3) \ VM_CTR3((vioapic)->vm, fmt, a1, a2, a3) +#define VIOAPIC_CTR4(vioapic, fmt, a1, a2, a3, a4) \ + VM_CTR4((vioapic)->vm, fmt, a1, a2, a3, a4) + #ifdef KTR static const char * pinstate_str(bool asserted) @@ -89,14 +91,25 @@ pinstate_str(bool asserted) else return ("deasserted"); } + +static const char * +trigger_str(bool level) +{ + + if (level) + return ("level"); + else + return ("edge"); +} #endif static void -vioapic_set_pinstate(struct vioapic *vioapic, int pin, bool newstate) +vioapic_send_intr(struct vioapic *vioapic, int pin) { int vector, apicid, vcpuid; uint32_t low, high; cpuset_t dmask; + bool level; KASSERT(pin >= 0 && pin < REDIR_ENTRIES, ("vioapic_set_pinstate: invalid pin number %d", pin)); @@ -104,62 +117,96 @@ vioapic_set_pinstate(struct vioapic *vio KASSERT(VIOAPIC_LOCKED(vioapic), ("vioapic_set_pinstate: vioapic is not locked")); - VIOAPIC_CTR2(vioapic, "ioapic pin%d %s", pin, pinstate_str(newstate)); + low = vioapic->rtbl[pin].reg; + high = vioapic->rtbl[pin].reg >> 32; - /* Nothing to do if interrupt pin has not changed state */ - if (vioapic->rtbl[pin].pinstate == newstate) + /* + * XXX We only deal with: + * - physical destination + * - fixed delivery mode + */ + if ((low & IOART_DESTMOD) != IOART_DESTPHY) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported dest mode " + "0x%08x", pin, low); return; + } - vioapic->rtbl[pin].pinstate = newstate; /* record it */ + if ((low & IOART_DELMOD) != IOART_DELFIXED) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: unsupported delivery mode " + "0x%08x", pin, low); + return; + } - /* Nothing to do if interrupt pin is deasserted */ - if (!INTR_ASSERTED(vioapic, pin)) + if ((low & IOART_INTMASK) == IOART_INTMSET) { + VIOAPIC_CTR1(vioapic, "ioapic pin%d: masked", pin); return; + } - /* - * XXX - * We only deal with: - * - edge triggered interrupts - * - fixed delivery mode - * Level-triggered sources will work so long as there is no sharing. - */ - low = vioapic->rtbl[pin].reg; - high = vioapic->rtbl[pin].reg >> 32; - if ((low & IOART_INTMASK) == IOART_INTMCLR && - (low & IOART_DESTMOD) == IOART_DESTPHY && - (low & IOART_DELMOD) == IOART_DELFIXED) { - vector = low & IOART_INTVEC; - apicid = high >> APIC_ID_SHIFT; - if (apicid != 0xff) { - /* unicast */ - vcpuid = vm_apicid2vcpuid(vioapic->vm, apicid); - VIOAPIC_CTR3(vioapic, "ioapic pin%d triggering " - "intr vector %d on vcpuid %d", pin, vector, vcpuid); - lapic_set_intr(vioapic->vm, vcpuid, vector); - } else { - /* broadcast */ - VIOAPIC_CTR2(vioapic, "ioapic pin%d triggering intr " - "vector %d on all vcpus", pin, vector); - dmask = vm_active_cpus(vioapic->vm); - while ((vcpuid = CPU_FFS(&dmask)) != 0) { - vcpuid--; - CPU_CLR(vcpuid, &dmask); - lapic_set_intr(vioapic->vm, vcpuid, vector); - } + level = low & IOART_TRGRLVL ? true : false; + if (level) + vioapic->rtbl[pin].reg |= IOART_REM_IRR; + + vector = low & IOART_INTVEC; + apicid = high >> APIC_ID_SHIFT; + if (apicid != 0xff) { + /* unicast */ + vcpuid = vm_apicid2vcpuid(vioapic->vm, apicid); + VIOAPIC_CTR4(vioapic, "ioapic pin%d: %s triggered intr " + "vector %d on vcpuid %d", pin, trigger_str(level), + vector, vcpuid); + lapic_set_intr(vioapic->vm, vcpuid, vector, level); + } else { + /* broadcast */ + VIOAPIC_CTR3(vioapic, "ioapic pin%d: %s triggered intr " + "vector %d on all vcpus", pin, trigger_str(level), vector); + dmask = vm_active_cpus(vioapic->vm); + while ((vcpuid = CPU_FFS(&dmask)) != 0) { + vcpuid--; + CPU_CLR(vcpuid, &dmask); + lapic_set_intr(vioapic->vm, vcpuid, vector, level); } - } else if ((low & IOART_INTMASK) != IOART_INTMCLR && - (low & IOART_TRGRLVL) != 0) { - /* - * For level-triggered interrupts that have been - * masked, set the pending bit so that an interrupt - * will be generated on unmask and if the level is - * still asserted - */ - VIOAPIC_CTR1(vioapic, "ioapic pin%d interrupt pending", pin); - vioapic->rtbl[pin].pending = true; } } +static void +vioapic_set_pinstate(struct vioapic *vioapic, int pin, bool newstate) +{ + int oldcnt, newcnt; + bool needintr; + + KASSERT(pin >= 0 && pin < REDIR_ENTRIES, + ("vioapic_set_pinstate: invalid pin number %d", pin)); + + KASSERT(VIOAPIC_LOCKED(vioapic), + ("vioapic_set_pinstate: vioapic is not locked")); + + oldcnt = vioapic->rtbl[pin].acnt; + if (newstate) + vioapic->rtbl[pin].acnt++; + else + vioapic->rtbl[pin].acnt--; + newcnt = vioapic->rtbl[pin].acnt; + + if (newcnt < 0) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: bad acnt %d", + pin, newcnt); + } + + needintr = false; + if (oldcnt == 0 && newcnt == 1) { + needintr = true; + VIOAPIC_CTR1(vioapic, "ioapic pin%d: asserted", pin); + } else if (oldcnt == 1 && newcnt == 0) { + VIOAPIC_CTR1(vioapic, "ioapic pin%d: deasserted", pin); + } else { + VIOAPIC_CTR3(vioapic, "ioapic pin%d: %s, ignored, acnt %d", + pin, pinstate_str(newstate), newcnt); + } + + if (needintr) + vioapic_send_intr(vioapic, pin); +} + enum irqstate { IRQSTATE_ASSERT, IRQSTATE_DEASSERT, @@ -228,7 +275,7 @@ vioapic_read(struct vioapic *vioapic, ui return (vioapic->id); break; case IOAPIC_VER: - return ((REDIR_ENTRIES << MAXREDIRSHIFT) | 0x11); + return (((REDIR_ENTRIES - 1) << MAXREDIRSHIFT) | 0x11); break; case IOAPIC_ARB: return (vioapic->id); @@ -255,6 +302,7 @@ vioapic_read(struct vioapic *vioapic, ui static void vioapic_write(struct vioapic *vioapic, uint32_t addr, uint32_t data) { + uint64_t data64, mask64; int regnum, pin, lshift; regnum = addr & 0xff; @@ -279,30 +327,26 @@ vioapic_write(struct vioapic *vioapic, u else lshift = 0; - vioapic->rtbl[pin].reg &= ~((uint64_t)0xffffffff << lshift); - vioapic->rtbl[pin].reg |= ((uint64_t)data << lshift); + data64 = (uint64_t)data << lshift; + mask64 = (uint64_t)0xffffffff << lshift; + vioapic->rtbl[pin].reg &= ~mask64 | RTBL_RO_BITS; + vioapic->rtbl[pin].reg |= data64 & ~RTBL_RO_BITS; - VIOAPIC_CTR2(vioapic, "ioapic pin%d redir table entry %#lx", + VIOAPIC_CTR2(vioapic, "ioapic pin%d: redir table entry %#lx", pin, vioapic->rtbl[pin].reg); - if (vioapic->rtbl[pin].pending && - ((vioapic->rtbl[pin].reg & IOART_INTMASK) == - IOART_INTMCLR)) { - vioapic->rtbl[pin].pending = false; - /* - * Inject the deferred level-triggered int if it is - * still asserted. Simulate by toggling the pin - * off and then on. - */ - if (vioapic->rtbl[pin].pinstate == true) { - VIOAPIC_CTR1(vioapic, "ioapic pin%d pending " - "interrupt delivered", pin); - vioapic_set_pinstate(vioapic, pin, false); - vioapic_set_pinstate(vioapic, pin, true); - } else { - VIOAPIC_CTR1(vioapic, "ioapic pin%d pending " - "interrupt dismissed", pin); - } + /* + * Generate an interrupt if the following conditions are met: + * - pin is not masked + * - previous interrupt has been EOIed + * - pin level is asserted + */ + if ((vioapic->rtbl[pin].reg & IOART_INTMASK) == IOART_INTMCLR && + (vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0 && + (vioapic->rtbl[pin].acnt > 0)) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: asserted at rtbl " + "write, acnt %d", pin, vioapic->rtbl[pin].acnt); + vioapic_send_intr(vioapic, pin); } } } @@ -366,6 +410,38 @@ vioapic_mmio_write(void *vm, int vcpuid, return (error); } +void +vioapic_process_eoi(struct vm *vm, int vcpuid, int vector) +{ + struct vioapic *vioapic; + int pin; + + KASSERT(vector >= 0 && vector < 256, + ("vioapic_process_eoi: invalid vector %d", vector)); + + vioapic = vm_ioapic(vm); + VIOAPIC_CTR1(vioapic, "ioapic processing eoi for vector %d", vector); + + /* + * XXX keep track of the pins associated with this vector instead + * of iterating on every single pin each time. + */ + VIOAPIC_LOCK(vioapic); + for (pin = 0; pin < REDIR_ENTRIES; pin++) { + if ((vioapic->rtbl[pin].reg & IOART_REM_IRR) == 0) + continue; + if ((vioapic->rtbl[pin].reg & IOART_INTVEC) != vector) + continue; + vioapic->rtbl[pin].reg &= ~IOART_REM_IRR; + if (vioapic->rtbl[pin].acnt > 0) { + VIOAPIC_CTR2(vioapic, "ioapic pin%d: asserted at eoi, " + "acnt %d", pin, vioapic->rtbl[pin].acnt); + vioapic_send_intr(vioapic, pin); + } + } + VIOAPIC_UNLOCK(vioapic); +} + struct vioapic * vioapic_init(struct vm *vm) { @@ -390,3 +466,10 @@ vioapic_cleanup(struct vioapic *vioapic) free(vioapic, M_VIOAPIC); } + +int +vioapic_pincount(struct vm *vm) +{ + + return (REDIR_ENTRIES); +} Modified: head/sys/amd64/vmm/io/vioapic.h ============================================================================== --- head/sys/amd64/vmm/io/vioapic.h Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/vioapic.h Wed Nov 27 22:18:08 2013 (r258699) @@ -44,4 +44,7 @@ int vioapic_mmio_write(void *vm, int vcp uint64_t wval, int size, void *arg); int vioapic_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *rval, int size, void *arg); + +int vioapic_pincount(struct vm *vm); +void vioapic_process_eoi(struct vm *vm, int vcpuid, int vector); #endif Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/vlapic.c Wed Nov 27 22:18:08 2013 (r258699) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "vmm_lapic.h" #include "vmm_ktr.h" #include "vlapic.h" +#include "vioapic.h" #define VLAPIC_CTR0(vlapic, format) \ VCPU_CTR0((vlapic)->vm, (vlapic)->vcpuid, format) @@ -211,18 +212,32 @@ vlapic_reset(struct vlapic *vlapic) } void -vlapic_set_intr_ready(struct vlapic *vlapic, int vector) +vlapic_set_intr_ready(struct vlapic *vlapic, int vector, bool level) { struct LAPIC *lapic = &vlapic->apic; - uint32_t *irrptr; + uint32_t *irrptr, *tmrptr, mask; int idx; if (vector < 0 || vector >= 256) panic("vlapic_set_intr_ready: invalid vector %d\n", vector); idx = (vector / 32) * 4; + mask = 1 << (vector % 32); + irrptr = &lapic->irr0; - atomic_set_int(&irrptr[idx], 1 << (vector % 32)); + atomic_set_int(&irrptr[idx], mask); + + /* + * Upon acceptance of an interrupt into the IRR the corresponding + * TMR bit is cleared for edge-triggered interrupts and set for + * level-triggered interrupts. + */ + tmrptr = &lapic->tmr0; + if (level) + atomic_set_int(&tmrptr[idx], mask); + else + atomic_clear_int(&tmrptr[idx], mask); + VLAPIC_CTR_IRR(vlapic, "vlapic_set_intr_ready"); } @@ -350,10 +365,11 @@ static void vlapic_process_eoi(struct vlapic *vlapic) { struct LAPIC *lapic = &vlapic->apic; - uint32_t *isrptr; - int i, idx, bitpos; + uint32_t *isrptr, *tmrptr; + int i, idx, bitpos, vector; isrptr = &lapic->isr0; + tmrptr = &lapic->tmr0; /* * The x86 architecture reserves the the first 32 vectors for use @@ -362,15 +378,20 @@ vlapic_process_eoi(struct vlapic *vlapic for (i = 7; i > 0; i--) { idx = i * 4; bitpos = fls(isrptr[idx]); - if (bitpos != 0) { + if (bitpos-- != 0) { if (vlapic->isrvec_stk_top <= 0) { panic("invalid vlapic isrvec_stk_top %d", vlapic->isrvec_stk_top); } - isrptr[idx] &= ~(1 << (bitpos - 1)); + isrptr[idx] &= ~(1 << bitpos); VLAPIC_CTR_ISR(vlapic, "vlapic_process_eoi"); vlapic->isrvec_stk_top--; vlapic_update_ppr(vlapic); + if ((tmrptr[idx] & (1 << bitpos)) != 0) { + vector = i * 32 + bitpos; + vioapic_process_eoi(vlapic->vm, vlapic->vcpuid, + vector); + } return; } } @@ -405,7 +426,7 @@ vlapic_fire_timer(struct vlapic *vlapic) if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); - vlapic_set_intr_ready(vlapic, vector); + vlapic_set_intr_ready(vlapic, vector, false); } } @@ -451,7 +472,7 @@ lapic_process_icr(struct vlapic *vlapic, i--; CPU_CLR(i, &dmask); if (mode == APIC_DELMODE_FIXED) { - lapic_set_intr(vlapic->vm, i, vec); + lapic_intr_edge(vlapic->vm, i, vec); vmm_stat_array_incr(vlapic->vm, vlapic->vcpuid, IPIS_SENT, i, 1); } else Modified: head/sys/amd64/vmm/io/vlapic.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic.h Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/io/vlapic.h Wed Nov 27 22:18:08 2013 (r258699) @@ -94,7 +94,7 @@ int vlapic_write(struct vlapic *vlapic, int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data); int vlapic_pending_intr(struct vlapic *vlapic); void vlapic_intr_accepted(struct vlapic *vlapic, int vector); -void vlapic_set_intr_ready(struct vlapic *vlapic, int vector); +void vlapic_set_intr_ready(struct vlapic *vlapic, int vector, bool level); int vlapic_timer_tick(struct vlapic *vlapic); uint64_t vlapic_get_apicbase(struct vlapic *vlapic); Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/vmm_dev.c Wed Nov 27 22:18:08 2013 (r258699) @@ -294,7 +294,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c break; case VM_LAPIC_IRQ: vmirq = (struct vm_lapic_irq *)data; - error = lapic_set_intr(sc->vm, vmirq->cpuid, vmirq->vector); + error = lapic_intr_edge(sc->vm, vmirq->cpuid, vmirq->vector); break; case VM_IOAPIC_ASSERT_IRQ: ioapic_irq = (struct vm_ioapic_irq *)data; Modified: head/sys/amd64/vmm/vmm_ktr.h ============================================================================== --- head/sys/amd64/vmm/vmm_ktr.h Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/vmm_ktr.h Wed Nov 27 22:18:08 2013 (r258699) @@ -59,4 +59,7 @@ CTR3(KTR_VMM, "vm %s: " format, vm_name( #define VM_CTR3(vm, format, p1, p2, p3) \ CTR4(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3)) + +#define VM_CTR4(vm, format, p1, p2, p3, p4) \ +CTR5(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3), (p4)) #endif Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/vmm_lapic.c Wed Nov 27 22:18:08 2013 (r258699) @@ -62,7 +62,7 @@ lapic_intr_accepted(struct vm *vm, int c } int -lapic_set_intr(struct vm *vm, int cpu, int vector) +lapic_set_intr(struct vm *vm, int cpu, int vector, bool level) { struct vlapic *vlapic; @@ -73,7 +73,7 @@ lapic_set_intr(struct vm *vm, int cpu, i return (EINVAL); vlapic = vm_lapic(vm, cpu); - vlapic_set_intr_ready(vlapic, vector); + vlapic_set_intr_ready(vlapic, vector, level); vm_interrupt_hostcpu(vm, cpu); Modified: head/sys/amd64/vmm/vmm_lapic.h ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.h Wed Nov 27 22:17:00 2013 (r258698) +++ head/sys/amd64/vmm/vmm_lapic.h Wed Nov 27 22:18:08 2013 (r258699) @@ -66,6 +66,22 @@ void lapic_intr_accepted(struct vm *vm, * Signals to the LAPIC that an interrupt at 'vector' needs to be generated * to the 'cpu', the state is recorded in IRR. */ -int lapic_set_intr(struct vm *vm, int cpu, int vector); +int lapic_set_intr(struct vm *vm, int cpu, int vector, bool trig); + +#define LAPIC_TRIG_LEVEL true +#define LAPIC_TRIG_EDGE false +static __inline int +lapic_intr_level(struct vm *vm, int cpu, int vector) +{ + + return (lapic_set_intr(vm, cpu, vector, LAPIC_TRIG_LEVEL)); +} + +static __inline int +lapic_intr_edge(struct vm *vm, int cpu, int vector) +{ + + return (lapic_set_intr(vm, cpu, vector, LAPIC_TRIG_EDGE)); +} #endif Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/usr.sbin/bhyve/acpi.c Wed Nov 27 22:18:08 2013 (r258699) @@ -259,7 +259,7 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, "\n"); } - /* Always a single IOAPIC entry, with ID ncpu+1 */ + /* Always a single IOAPIC entry, with ID 0 */ EFPRINTF(fp, "[0001]\t\tSubtable Type : 01\n"); EFPRINTF(fp, "[0001]\t\tLength : 0C\n"); /* iasl expects a hex value for the i/o apic id */ Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Wed Nov 27 22:17:00 2013 (r258698) +++ head/usr.sbin/bhyve/mptbl.c Wed Nov 27 22:18:08 2013 (r258699) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define MPEP_FEATURES (0xBFEBFBFF) /* XXX Intel i7 */ /* Number of i/o intr entries */ -#define MPEII_MAX_IRQ 16 +#define MPEII_MAX_IRQ 24 /* Define processor entry struct since gets it wrong */ typedef struct BPROCENTRY { From owner-svn-src-head@FreeBSD.ORG Wed Nov 27 23:26:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A848F178; Wed, 27 Nov 2013 23:26:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94388387; Wed, 27 Nov 2013 23:26:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARNQsqF059078; Wed, 27 Nov 2013 23:26:54 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARNQsce059077; Wed, 27 Nov 2013 23:26:54 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201311272326.rARNQsce059077@svn.freebsd.org> From: Mark Peek Date: Wed, 27 Nov 2013 23:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258700 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 23:26:54 -0000 Author: mp Date: Wed Nov 27 23:26:54 2013 New Revision: 258700 URL: http://svnweb.freebsd.org/changeset/base/258700 Log: Add myself to the committers-src list. Modified: head/share/misc/committers-src.dot (contents, props changed) Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Nov 27 22:18:08 2013 (r258699) +++ head/share/misc/committers-src.dot Wed Nov 27 23:26:54 2013 (r258700) @@ -223,6 +223,7 @@ mjacob [label="Matt Jacob\nmjacob@FreeBS mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"] monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"] +mp [label="Mark Peek\nmp@FreeBSD.org\n2001/07/27"] mr [label="Michael Reifenberger\nmr@FreeBSD.org\n2001/09/30"] neel [label="Neel Natu\nneel@FreeBSD.org\n2009/09/20"] netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2005/03/31"] @@ -515,6 +516,7 @@ julian -> davidxu julian -> archie julian -> adrian julian -> zec +julian -> mp kan -> kib From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 06:45:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08513E47; Thu, 28 Nov 2013 06:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E5C3D1889; Thu, 28 Nov 2013 06:45:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS6jU95010616; Thu, 28 Nov 2013 06:45:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS6jUKp010614; Thu, 28 Nov 2013 06:45:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311280645.rAS6jUKp010614@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 28 Nov 2013 06:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258702 - in head: lib/libnetgraph share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 06:45:31 -0000 Author: glebius Date: Thu Nov 28 06:45:30 2013 New Revision: 258702 URL: http://svnweb.freebsd.org/changeset/base/258702 Log: Fix some misinformation in netgraph manual pages. Submitted by: Dmitry Luhtionov Modified: head/lib/libnetgraph/netgraph.3 head/share/man/man4/netgraph.4 Modified: head/lib/libnetgraph/netgraph.3 ============================================================================== --- head/lib/libnetgraph/netgraph.3 Thu Nov 28 05:44:44 2013 (r258701) +++ head/lib/libnetgraph/netgraph.3 Thu Nov 28 06:45:30 2013 (r258702) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $ .\" -.Dd January 27, 2004 +.Dd November 25, 2013 .Dt NETGRAPH 3 .Os .Sh NAME @@ -57,7 +57,7 @@ .Sh LIBRARY .Lb libnetgraph .Sh SYNOPSIS -.In netgraph.h +.In netgraph/netgraph.h .Ft int .Fn NgMkSockNode "const char *name" "int *csp" "int *dsp" .Ft int Modified: head/share/man/man4/netgraph.4 ============================================================================== --- head/share/man/man4/netgraph.4 Thu Nov 28 05:44:44 2013 (r258701) +++ head/share/man/man4/netgraph.4 Thu Nov 28 06:45:30 2013 (r258702) @@ -36,7 +36,7 @@ .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ .\" $FreeBSD$ .\" -.Dd May 25, 2008 +.Dd November 25, 2013 .Dt NETGRAPH 4 .Os .Sh NAME @@ -292,7 +292,7 @@ unless specifically declared to be a rea (See .Dv NGM_READONLY in -.In ng_message.h . ) +.In netgraph/ng_message.h . ) .Pp While this mode of operation results in good performance, it has a few implications for node @@ -840,26 +840,27 @@ and should be used as a starting point f .Ss Netgraph Message Structure Control messages have the following structure: .Bd -literal -#define NG_CMDSTRSIZ 32 /* Max command string (including nul) */ +#define NG_CMDSTRSIZ 32 /* Max command string (including null) */ struct ng_mesg { struct ng_msghdr { u_char version; /* Must equal NG_VERSION */ - u_char spare; /* Pad to 2 bytes */ - u_short arglen; /* Length of cmd/resp data */ - u_long flags; /* Message status flags */ - u_long token; /* Reply should have the same token */ - u_long typecookie; /* Node type understanding this message */ - u_long cmd; /* Command identifier */ - u_char cmdstr[NG_CMDSTRSIZ]; /* Cmd string (for debug) */ + u_char spare; /* Pad to 4 bytes */ + uint16_t spare2; + uint32_t arglen; /* Length of cmd/resp data */ + uint32_t cmd; /* Command identifier */ + uint32_t flags; /* Message status flags */ + uint32_t token; /* Reply should have the same token */ + uint32_t typecookie; /* Node type understanding this message */ + u_char cmdstr[NG_CMDSTRSIZ]; /* cmd string + \0 */ } header; - char data[0]; /* Start of cmd/resp data */ + char data[]; /* placeholder for actual data */ }; -#define NG_ABI_VERSION 5 /* Netgraph kernel ABI version */ -#define NG_VERSION 4 /* Netgraph message version */ -#define NGF_ORIG 0x0000 /* Command */ -#define NGF_RESP 0x0001 /* Response */ +#define NG_ABI_VERSION 12 /* Netgraph kernel ABI version */ +#define NG_VERSION 8 /* Netgraph message version */ +#define NGF_ORIG 0x00000000 /* The msg is the original request */ +#define NGF_RESP 0x00000001 /* The message is a response */ .Ed .Pp Control messages have the fixed header shown above, followed by a @@ -1296,7 +1297,7 @@ Used in conjunction with either .Xr ppp 8 or the -.Pa net/mpd +.Pa net/mpd5 port. .It BRIDGE This node, together with the Ethernet nodes, allows a very flexible From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 07:00:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66FB1CC; Thu, 28 Nov 2013 07:00:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75FFB18FD; Thu, 28 Nov 2013 07:00:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rAS703b7030080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 28 Nov 2013 11:00:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rAS703cH030079; Thu, 28 Nov 2013 11:00:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 28 Nov 2013 11:00:03 +0400 From: Gleb Smirnoff To: Juli Mallett Subject: Re: svn commit: r258686 - head/sbin/fdisk Message-ID: <20131128070003.GY90895@FreeBSD.org> References: <201311271759.rARHxEPE069195@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311271759.rARHxEPE069195@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 07:00:06 -0000 Juli, On Wed, Nov 27, 2013 at 05:59:14PM +0000, Juli Mallett wrote: J> Author: jmallett J> Date: Wed Nov 27 17:59:13 2013 J> New Revision: 258686 J> URL: http://svnweb.freebsd.org/changeset/base/258686 J> J> Log: J> Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than J> only being able to create 1TB partitions: J> o) Use an unsigned 32-bit quantity to store the number of disk sectors. J> o) Detect overflow of said 32-bit quantity and clamp to 2^32. J> o) Rather than returning the disk sector count from get_params, return 0 on J> success, since its return value is only ever compared to -1 to detect J> failure. This would cause returning 2^32 sectors to be interpreted as an J> error. J> J> Reviewed by: bde ("good for a quick fix") What is the reason to use fdisk today, instead of gpart? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 07:39:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 222AFB91 for ; Thu, 28 Nov 2013 07:39:26 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7D71AC4 for ; Thu, 28 Nov 2013 07:39:25 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id hp15so3994700lab.27 for ; Wed, 27 Nov 2013 23:39:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=WMkjAgP1XYCwMkun7AjO+P5TcCowx90lWdGDrKLnGnI=; b=fJAudCFT/6Ut3FZje/GiC7UFhneDeFWR/mqLaycHhoq4o8gXPbP9CSeGKyYrlv0iaV wsR+RmPtfAWc0/dhsPo2l0WXzjaSbkubjqeGqiQsngHa3XrMcz4dc0JCF0kH/7AJcZv/ bnyrFUzPjXdLJpSCuf0IlL2z2C2dVkIi6QHUZstEwMQCEu8MVv+qrt0KEEHUcjGfxvsK brj9HD/9jvJP3aA0mnNQ3MBdMg5BSuxyVTnTkOOyvvJyL9AHrIslznYG9LEvHWiGHt65 NlCRzPdHfZS9e94hb+0g71AOk5GSQNk6AwWreOO2F7sF1acPBZicV9Fu1vMON3m4o2ld llCQ== X-Gm-Message-State: ALoCoQmwXZPvQfIENjR8xngC6CW1dFoqoTbDzrbQlPotlBVgpdTPgK8tbiSeJjGQ8PkXC8Bq3nQY X-Received: by 10.152.28.230 with SMTP id e6mr26427228lah.3.1385624363230; Wed, 27 Nov 2013 23:39:23 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.234.12 with HTTP; Wed, 27 Nov 2013 23:39:02 -0800 (PST) In-Reply-To: <20131128070003.GY90895@FreeBSD.org> References: <201311271759.rARHxEPE069195@svn.freebsd.org> <20131128070003.GY90895@FreeBSD.org> From: Juli Mallett Date: Wed, 27 Nov 2013 23:39:02 -0800 X-Google-Sender-Auth: g6o0NvG9wyJZHOJmYEWPN7ChsHE Message-ID: Subject: Re: svn commit: r258686 - head/sbin/fdisk To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 07:39:26 -0000 On Wed, Nov 27, 2013 at 11:00 PM, Gleb Smirnoff wrote: > Juli, > > On Wed, Nov 27, 2013 at 05:59:14PM +0000, Juli Mallett wrote: > J> Author: jmallett > J> Date: Wed Nov 27 17:59:13 2013 > J> New Revision: 258686 > J> URL: http://svnweb.freebsd.org/changeset/base/258686 > J> > J> Log: > J> Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, > rather than > J> only being able to create 1TB partitions: > J> o) Use an unsigned 32-bit quantity to store the number of disk > sectors. > J> o) Detect overflow of said 32-bit quantity and clamp to 2^32. > J> o) Rather than returning the disk sector count from get_params, > return 0 on > J> success, since its return value is only ever compared to -1 to > detect > J> failure. This would cause returning 2^32 sectors to be > interpreted as an > J> error. > J> > J> Reviewed by: bde ("good for a quick fix") > > What is the reason to use fdisk today, instead of gpart? > Habit? Hysterical reasons? Ease-of-use? (The fact that I find fdisk(8) easier to use than gpart(8) is probably a bug in me and not in gpart(8), but it always takes me too many steps to get things done with gpart(8), including some manpage reading.) Being fairly self-contained so that one can use it in automated systems without worrying about which geom(4) modules are in the host system's kernel is probably the most-reasonable version. If it's so deprecated that leaving bugs in it is desirable, please remove it from the tree entirely :) Thanks, Juli. From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 08:48:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97FD6B9E; Thu, 28 Nov 2013 08:48:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 837421E33; Thu, 28 Nov 2013 08:48:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS8mngo052301; Thu, 28 Nov 2013 08:48:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS8mn76052300; Thu, 28 Nov 2013 08:48:49 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311280848.rAS8mn76052300@svn.freebsd.org> From: Andriy Gapon Date: Thu, 28 Nov 2013 08:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258704 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 08:48:49 -0000 Author: avg Date: Thu Nov 28 08:48:49 2013 New Revision: 258704 URL: http://svnweb.freebsd.org/changeset/base/258704 Log: fix a serious bug in r258632: offset parameter must be set in zio In illumos all ioctl zio-s are "global" at the moment. That is they act on a whole disk, e.g. a cache flush command, and thus do not need either offset or size parameters. FreeBSD, on the other hand, has support for TRIM command and that command requires proper offset and size parameters. Without this fix all TRIM commands act on the start of any disk or partition used by ZFS destroying any data there. Pointyhat to: avg Tested by: sbruno MFC after: 3 days X-MFC with: r258632 Sponsored by: HybridCluster Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Nov 28 07:09:58 2013 (r258703) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Nov 28 08:48:49 2013 (r258704) @@ -843,7 +843,7 @@ zio_ioctl(zio_t *pio, spa_t *spa, vdev_t if (vd->vdev_children == 0) { zio = zio_create(pio, spa, 0, NULL, NULL, size, done, private, - ZIO_TYPE_IOCTL, ZIO_PRIORITY_NOW, flags, vd, 0, NULL, + ZIO_TYPE_IOCTL, ZIO_PRIORITY_NOW, flags, vd, offset, NULL, ZIO_STAGE_OPEN, ZIO_IOCTL_PIPELINE); zio->io_cmd = cmd; From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 08:53:10 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B0EAD71; Thu, 28 Nov 2013 08:53:10 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 96B851E81; Thu, 28 Nov 2013 08:53:08 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA19929; Thu, 28 Nov 2013 10:53:06 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlxLN-0009d1-Ql; Thu, 28 Nov 2013 10:53:05 +0200 Message-ID: <52970439.3070406@FreeBSD.org> Date: Thu, 28 Nov 2013 10:52:09 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, FreeBSD Current , freebsd-fs@FreeBSD.org Subject: Re: [HEADSUP!!!] do not upgrade to or past r258632 if you use ZFS + TRIM References: <201311260957.rAQ9vF6d004168@svn.freebsd.org> <52961B2E.1080602@FreeBSD.org> In-Reply-To: <52961B2E.1080602@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 08:53:10 -0000 on 27/11/2013 18:17 Andriy Gapon said the following: > on 26/11/2013 11:57 Andriy Gapon said the following: >> Author: avg >> Date: Tue Nov 26 09:57:14 2013 >> New Revision: 258632 >> URL: http://svnweb.freebsd.org/changeset/base/258632 >> >> Log: >> MFV r255255: 4045 zfs write throttle & i/o scheduler performance work >> >> illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e >> >> Please note the following changes: >> - zio_ioctl has lost its priority parameter and now TRIM is executed >> with 'now' priority >> - some knobs are gone and some new knobs are added; not all of them are >> exposed as tunables / sysctls yet >> >> MFC after: 10 days >> Sponsored by: HybridCluster [merge] > > I think that I've introduced a very serious bug when merging this change. > Please do not upgrade to this revision if you use ZFS with SSDs and have TRIM > support enabled. > > If you have already upgraded, please disable TRIM support ASAP and roll back to > a previous version of kernel and then check integrity of your pools. The issue should be fixed in r258704. Yes, the bug was that simple and that serious. My apologies to all who were affected. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 08:54:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACCFFC3; Thu, 28 Nov 2013 08:54:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED371E98; Thu, 28 Nov 2013 08:54:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS8sFXx055091; Thu, 28 Nov 2013 08:54:15 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS8sFjq055090; Thu, 28 Nov 2013 08:54:15 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201311280854.rAS8sFjq055090@svn.freebsd.org> From: Nick Hibma Date: Thu, 28 Nov 2013 08:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258705 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 08:54:15 -0000 Author: n_hibma Date: Thu Nov 28 08:54:15 2013 New Revision: 258705 URL: http://svnweb.freebsd.org/changeset/base/258705 Log: Do a parallel buildworld & buildkernel (using NANO_PMAKE), but use a single threaded installworld, installkernel and distribution (using NANO_MAKE). Setting NANO_PMAKE to 'make -j 12' would otherwise bomb during installation of world. MFC after: 2 weeks Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 08:48:49 2013 (r258704) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 08:54:15 2013 (r258705) @@ -57,7 +57,8 @@ NANO_PACKAGE_LIST="*" # default is ${NANO_OBJ} #NANO_DISKIMGDIR="" -# Parallel Make +# Make & parallel Make +NANO_MAKE="make" NANO_PMAKE="make -j 3" # The default name for any image we create. @@ -254,7 +255,7 @@ install_world ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.iw 2>&1 chflags -R noschg ${NANO_WORLDDIR} @@ -267,7 +268,7 @@ install_etc ( ) ( cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} \ - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ + ${NANO_MAKE} __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${NANO_OBJ}/_.etc 2>&1 # make.conf doesn't get created by default, but some ports need it @@ -288,7 +289,7 @@ install_kernel ( ) ( fi cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ ${kernconfdir:+"KERNCONFDIR="}${kernconfdir} \ @@ -878,6 +879,7 @@ fi if $do_clean ; then true else + NANO_MAKE="${NANO_MAKE} -DNO_CLEAN" NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" fi @@ -897,6 +899,7 @@ export NANO_DRIVE export NANO_HEADS export NANO_IMAGES export NANO_IMGNAME +export NANO_MAKE export NANO_MAKE_CONF_BUILD export NANO_MAKE_CONF_INSTALL export NANO_MEDIASIZE From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 09:57:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF8DE38D; Thu, 28 Nov 2013 09:57:32 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6D77B124B; Thu, 28 Nov 2013 09:57:32 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 3CCD36335; Thu, 28 Nov 2013 09:57:31 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id E44EE1397; Thu, 28 Nov 2013 10:57:36 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff Subject: Re: svn commit: r258686 - head/sbin/fdisk References: <201311271759.rARHxEPE069195@svn.freebsd.org> <20131128070003.GY90895@FreeBSD.org> Date: Thu, 28 Nov 2013 10:57:36 +0100 In-Reply-To: <20131128070003.GY90895@FreeBSD.org> (Gleb Smirnoff's message of "Thu, 28 Nov 2013 11:00:03 +0400") Message-ID: <868uw8df1r.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Juli Mallett , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 09:57:32 -0000 Gleb Smirnoff writes: > What is the reason to use fdisk today, instead of gpart? For one, fdisk doesn't require you to grep through the kernel source code to figure out the magic incantations required to create FAT partitions. That is, of course, fixable :) (and while you're there, it would be nice if gpart gave a sensible error message when you mistype a GPT UUID) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 10:28:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A54DBC8; Thu, 28 Nov 2013 10:28:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45EEF13E3; Thu, 28 Nov 2013 10:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASASTKB086576; Thu, 28 Nov 2013 10:28:29 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASASSoE086573; Thu, 28 Nov 2013 10:28:28 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201311281028.rASASSoE086573@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 28 Nov 2013 10:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258708 - in head: sbin/ipfw sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 10:28:29 -0000 Author: melifaro Date: Thu Nov 28 10:28:28 2013 New Revision: 258708 URL: http://svnweb.freebsd.org/changeset/base/258708 Log: Check ipfw table numbers in both user and kernel space before rule addition. Found by: Saychik Pavel MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Thu Nov 28 10:04:53 2013 (r258707) +++ head/sbin/ipfw/ipfw2.c Thu Nov 28 10:28:28 2013 (r258708) @@ -60,6 +60,8 @@ int resvd_set_number = RESVD_SET; int ipfw_socket = -1; +uint32_t ipfw_tables_max = 0; /* Number of tables supported by kernel */ + #ifndef s6_addr32 #define s6_addr32 __u6_addr.__u6_addr32 #endif @@ -2203,6 +2205,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int { int len = 0; uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; + uint32_t tables_max; cmd->o.len &= ~F_LEN_MASK; /* zero len */ @@ -2221,6 +2224,10 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int *p++ = '\0'; cmd->o.opcode = O_IP_DST_LOOKUP; cmd->o.arg1 = strtoul(av + 6, NULL, 0); + tables_max = ipfw_get_tables_max(); + if (cmd->o.arg1 > tables_max) + errx(EX_USAGE, "The table number exceeds the maximum " + "allowed value (%u)", tables_max - 1); if (p) { cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); d[0] = strtoul(p, NULL, 0); @@ -4119,6 +4126,33 @@ static void table_list(uint16_t num, int static void table_fill_xentry(char *arg, ipfw_table_xentry *xent); /* + * Retrieve maximum number of tables supported by ipfw(4) module. + */ +uint32_t +ipfw_get_tables_max() +{ + size_t len; + uint32_t tables_max; + + if (ipfw_tables_max != 0) + return (ipfw_tables_max); + + len = sizeof(tables_max); + if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, + NULL, 0) == -1) { + if (co.test_only) + tables_max = 128; /* Old conservative default */ + else + errx(1, "Can't determine maximum number of ipfw tables." + " Perhaps you forgot to load ipfw module?"); + } + + ipfw_tables_max = tables_max; + + return (ipfw_tables_max); +} + +/* * This one handles all table-related commands * ipfw table N add addr[/masklen] [value] * ipfw table N delete addr[/masklen] @@ -4131,19 +4165,10 @@ ipfw_table_handler(int ac, char *av[]) ipfw_table_xentry xent; int do_add; int is_all; - size_t len; uint32_t a; uint32_t tables_max; - len = sizeof(tables_max); - if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, - NULL, 0) == -1) { - if (co.test_only) - tables_max = 128; /* Old conservative default */ - else - errx(1, "Can't determine maximum number of ipfw tables." - " Perhaps you forgot to load ipfw module?"); - } + tables_max = ipfw_get_tables_max(); memset(&xent, 0, sizeof(xent)); Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Thu Nov 28 10:04:53 2013 (r258707) +++ head/sbin/ipfw/ipfw2.h Thu Nov 28 10:28:28 2013 (r258708) @@ -228,6 +228,8 @@ char const *match_value(struct _s_x *p, int do_cmd(int optname, void *optval, uintptr_t optlen); +uint32_t ipfw_get_tables_max(void); + struct in6_addr; void n2mask(struct in6_addr *mask, int n); int contigmask(uint8_t *p, int len); Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Nov 28 10:04:53 2013 (r258707) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Nov 28 10:28:28 2013 (r258708) @@ -653,7 +653,7 @@ check_ipfw_struct(struct ip_fw *rule, in case O_IP_SRC_LOOKUP: case O_IP_DST_LOOKUP: - if (cmd->arg1 >= IPFW_TABLES_MAX) { + if (cmd->arg1 >= V_fw_tables_max) { printf("ipfw: invalid table number %d\n", cmd->arg1); return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 11:06:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 338F13F4; Thu, 28 Nov 2013 11:06:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07702169D; Thu, 28 Nov 2013 11:06:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASB6IXW099659; Thu, 28 Nov 2013 11:06:18 GMT (envelope-from mr@svn.freebsd.org) Received: (from mr@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASB6IT6099658; Thu, 28 Nov 2013 11:06:18 GMT (envelope-from mr@svn.freebsd.org) Message-Id: <201311281106.rASB6IT6099658@svn.freebsd.org> From: Michael Reifenberger Date: Thu, 28 Nov 2013 11:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258709 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 11:06:19 -0000 Author: mr Date: Thu Nov 28 11:06:18 2013 New Revision: 258709 URL: http://svnweb.freebsd.org/changeset/base/258709 Log: Add package additions support for pkgng by adding a new function cust_pkgng(): first bootstrap the pkg package (must be contained in the Pkg/ dir) then add the other packages Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 10:28:28 2013 (r258708) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Nov 28 11:06:18 2013 (r258709) @@ -734,6 +734,77 @@ cust_pkg () ( rm -rf ${NANO_WORLDDIR}/Pkg ) +cust_pkgng () ( + + # If the package directory doesn't exist, we're done. + if [ ! -d ${NANO_PACKAGE_DIR} ]; then + echo "DONE 0 packages" + return 0 + fi + + # Find a pkg-* package + for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do + _NANO_PKG_PACKAGE=`basename "$x"` + done + if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then + echo "FAILED: need a pkg/ package for bootstrapping" + exit 2 + fi + + # Copy packages into chroot + mkdir -p ${NANO_WORLDDIR}/Pkg + ( + cd ${NANO_PACKAGE_DIR} + find ${NANO_PACKAGE_LIST} -print | + cpio -Ldumpv ${NANO_WORLDDIR}/Pkg + ) + + #Bootstrap pkg + chroot ${NANO_WORLDDIR} sh -c \ + "env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /Pkg/${_NANO_PKG_PACKAGE}" + chroot ${NANO_WORLDDIR} sh -c "pkg -N >/dev/null 2>&1;" + if [ "$?" -ne "0" ]; then + echo "FAILED: pkg bootstrapping faied" + exit 2 + fi + rm -f ${NANO_WORLDDIR}/Pkg/pkg-* + + # Count & report how many we have to install + todo=`ls ${NANO_WORLDDIR}/Pkg | /usr/bin/wc -l` + todo=$(expr $todo + 1) # add one for pkg since it is installed already + echo "=== TODO: $todo" + ls ${NANO_WORLDDIR}/Pkg + echo "===" + while true + do + # Record how many we have now + have=`chroot ${NANO_WORLDDIR} sh -c \ + 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l'` + + # Attempt to install more packages + # ...but no more than 200 at a time due to (XXX still the case?) pkg_add's internal + # limitations. + chroot ${NANO_WORLDDIR} sh -c \ + 'ls Pkg/*txz | xargs -n 200 env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg add ' || true + + # See what that got us + now=`chroot ${NANO_WORLDDIR} sh -c \ + 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l'` + echo "=== NOW $now" + chroot ${NANO_WORLDDIR} sh -c \ + 'env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info' + echo "===" + if [ $now -eq $todo ] ; then + echo "DONE $now packages" + break + elif [ $now -eq $have ] ; then + echo "FAILED: Nothing happened on this pass" + exit 2 + fi + done + rm -rf ${NANO_WORLDDIR}/Pkg +) + ####################################################################### # Convenience function: # Register all args as customize function. From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 14:23:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7FE9C06; Thu, 28 Nov 2013 14:23:25 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9535310C0; Thu, 28 Nov 2013 14:23:25 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id CA0A066ED; Thu, 28 Nov 2013 14:23:18 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 9C74F14C2; Thu, 28 Nov 2013 15:23:24 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev Subject: Re: svn commit: r258678 - head/sys/boot/fdt/dts References: <201311271212.rARCCbjY052381@svn.freebsd.org> <20131127122131.GA97570@FreeBSD.org> Date: Thu, 28 Nov 2013 15:23:24 +0100 In-Reply-To: <20131127122131.GA97570@FreeBSD.org> (Alexey Dokuchaev's message of "Wed, 27 Nov 2013 12:21:31 +0000") Message-ID: <864n6wd2qr.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 14:23:25 -0000 Alexey Dokuchaev writes: > Folks, please, write your commit logs in ASCII. Pretty please. ITYM "UTF-8". HTH, HAND! DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 15:28:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8017E2F4; Thu, 28 Nov 2013 15:28:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B9011471; Thu, 28 Nov 2013 15:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASFSq40088503; Thu, 28 Nov 2013 15:28:52 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASFSqlU088502; Thu, 28 Nov 2013 15:28:52 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201311281528.rASFSqlU088502@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 28 Nov 2013 15:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258711 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 15:28:52 -0000 Author: melifaro Date: Thu Nov 28 15:28:51 2013 New Revision: 258711 URL: http://svnweb.freebsd.org/changeset/base/258711 Log: Simplify O_NAT opcode handling. MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Nov 28 14:24:26 2013 (r258710) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Nov 28 15:28:51 2013 (r258711) @@ -2413,38 +2413,35 @@ do { \ } case O_NAT: + l = 0; /* exit inner loop */ + done = 1; /* exit outer loop */ if (!IPFW_NAT_LOADED) { retval = IP_FW_DENY; - } else { - struct cfg_nat *t; - int nat_id; + break; + } - set_match(args, f_pos, chain); - /* Check if this is 'global' nat rule */ - if (cmd->arg1 == 0) { - retval = ipfw_nat_ptr(args, NULL, m); - l = 0; - done = 1; - break; - } - t = ((ipfw_insn_nat *)cmd)->nat; - if (t == NULL) { + struct cfg_nat *t; + int nat_id; + + set_match(args, f_pos, chain); + /* Check if this is 'global' nat rule */ + if (cmd->arg1 == 0) { + retval = ipfw_nat_ptr(args, NULL, m); + break; + } + t = ((ipfw_insn_nat *)cmd)->nat; + if (t == NULL) { nat_id = IP_FW_ARG_TABLEARG(cmd->arg1); t = (*lookup_nat_ptr)(&chain->nat, nat_id); if (t == NULL) { retval = IP_FW_DENY; - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ break; } if (cmd->arg1 != IP_FW_TABLEARG) ((ipfw_insn_nat *)cmd)->nat = t; - } - retval = ipfw_nat_ptr(args, t, m); } - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ + retval = ipfw_nat_ptr(args, t, m); break; case O_REASS: { From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 16:36:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D72434C; Thu, 28 Nov 2013 16:36:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89C321804; Thu, 28 Nov 2013 16:36:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASGa3WU012332; Thu, 28 Nov 2013 16:36:03 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASGa3EG012331; Thu, 28 Nov 2013 16:36:03 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311281636.rASGa3EG012331@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 28 Nov 2013 16:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258712 - head/contrib/gcclibs/libcpp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 16:36:03 -0000 Author: pfg Date: Thu Nov 28 16:36:03 2013 New Revision: 258712 URL: http://svnweb.freebsd.org/changeset/base/258712 Log: libcpp: fix an underflow. Obtained from: OpenBSD (Rev 1.2) MFC after: 2 weeks Modified: head/contrib/gcclibs/libcpp/charset.c Modified: head/contrib/gcclibs/libcpp/charset.c ============================================================================== --- head/contrib/gcclibs/libcpp/charset.c Thu Nov 28 15:28:51 2013 (r258711) +++ head/contrib/gcclibs/libcpp/charset.c Thu Nov 28 16:36:03 2013 (r258712) @@ -1628,7 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the "No newline at end of file" diagnostic. */ - if (to.text[to.len - 1] == '\r') + if (to.len > 0 && to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else to.text[to.len] = '\n'; From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 18:56:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7F8514E; Thu, 28 Nov 2013 18:56:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AAB91F09; Thu, 28 Nov 2013 18:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASIuZev059701; Thu, 28 Nov 2013 18:56:35 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASIuZu8059699; Thu, 28 Nov 2013 18:56:35 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311281856.rASIuZu8059699@svn.freebsd.org> From: Andriy Gapon Date: Thu, 28 Nov 2013 18:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258713 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 18:56:35 -0000 Author: avg Date: Thu Nov 28 18:56:34 2013 New Revision: 258713 URL: http://svnweb.freebsd.org/changeset/base/258713 Log: add taskqueue_drain_all This API has semantics similar to that of taskqueue_drain but acts on all tasks that might be queued or running on a taskqueue. A caller must ensure that no new tasks are being enqueued otherwise this call would be totally meaningless. For example, if the tasks are enqueued by an interrupt filter then its interrupt must be disabled. MFC after: 10 days Modified: head/sys/kern/subr_taskqueue.c head/sys/sys/taskqueue.h Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Thu Nov 28 16:36:03 2013 (r258712) +++ head/sys/kern/subr_taskqueue.c Thu Nov 28 18:56:34 2013 (r258713) @@ -300,6 +300,15 @@ taskqueue_enqueue_timeout(struct taskque return (res); } +static void +taskqueue_drain_running(struct taskqueue *queue) +{ + + while (!TAILQ_EMPTY(&queue->tq_active)) + TQ_SLEEP(queue, &queue->tq_active, &queue->tq_mutex, + PWAIT, "-", 0); +} + void taskqueue_block(struct taskqueue *queue) { @@ -350,6 +359,8 @@ taskqueue_run_locked(struct taskqueue *q wakeup(task); } TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); + if (TAILQ_EMPTY(&queue->tq_active)) + wakeup(&queue->tq_active); } void @@ -434,6 +445,25 @@ taskqueue_drain(struct taskqueue *queue, } void +taskqueue_drain_all(struct taskqueue *queue) +{ + struct task *task; + + if (!queue->tq_spin) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); + + TQ_LOCK(queue); + task = STAILQ_LAST(&queue->tq_queue, task, ta_link); + if (task != NULL) + while (task->ta_pending != 0) + TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, "-", 0); + taskqueue_drain_running(queue); + KASSERT(STAILQ_EMPTY(&queue->tq_queue), + ("taskqueue queue is not empty after draining")); + TQ_UNLOCK(queue); +} + +void taskqueue_drain_timeout(struct taskqueue *queue, struct timeout_task *timeout_task) { Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Thu Nov 28 16:36:03 2013 (r258712) +++ head/sys/sys/taskqueue.h Thu Nov 28 18:56:34 2013 (r258713) @@ -81,6 +81,7 @@ int taskqueue_cancel_timeout(struct task void taskqueue_drain(struct taskqueue *queue, struct task *task); void taskqueue_drain_timeout(struct taskqueue *queue, struct timeout_task *timeout_task); +void taskqueue_drain_all(struct taskqueue *queue); void taskqueue_free(struct taskqueue *queue); void taskqueue_run(struct taskqueue *queue); void taskqueue_block(struct taskqueue *queue); From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:13:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6753649C; Thu, 28 Nov 2013 19:13:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5313D1FCE; Thu, 28 Nov 2013 19:13:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJD6H6066493; Thu, 28 Nov 2013 19:13:06 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJD6vC066492; Thu, 28 Nov 2013 19:13:06 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311281913.rASJD6vC066492@svn.freebsd.org> From: Craig Rodrigues Date: Thu, 28 Nov 2013 19:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258714 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:13:06 -0000 Author: rodrigc Date: Thu Nov 28 19:13:05 2013 New Revision: 258714 URL: http://svnweb.freebsd.org/changeset/base/258714 Log: Add some text to clarify that nslookup and dig are no longer in the base system after the removal of BIND. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Nov 28 18:56:34 2013 (r258713) +++ head/UPDATING Thu Nov 28 19:13:05 2013 (r258714) @@ -76,7 +76,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 BIND has been removed from the base system. If all you need is a local resolver, simply enable and start the local_unbound service instead. Otherwise, several versions of BIND are - available in the ports tree. + available in the ports tree. The dns/bind99 port is one example. + + With this change, nslookup(1) and dig(1) are no longer in the base + system. Users should instead use host(1) which is still + in the base system. Alternatively, nslookup and dig can + be obtained by installing the dns/bind-tools port. 20130916: With the addition of unbound(8), a new unbound user is now From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:17:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4D48612; Thu, 28 Nov 2013 19:17:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0F951FE7; Thu, 28 Nov 2013 19:17:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJHB9r067079; Thu, 28 Nov 2013 19:17:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJHB1K067077; Thu, 28 Nov 2013 19:17:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311281917.rASJHB1K067077@svn.freebsd.org> From: Andriy Gapon Date: Thu, 28 Nov 2013 19:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258715 - head/sys/cddl/compat/opensolaris/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:17:11 -0000 Author: avg Date: Thu Nov 28 19:17:11 2013 New Revision: 258715 URL: http://svnweb.freebsd.org/changeset/base/258715 Log: opensolaris compat: add taskq_wait emulation MFC after: 10 days Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Thu Nov 28 19:13:05 2013 (r258714) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Thu Nov 28 19:17:11 2013 (r258715) @@ -166,3 +166,9 @@ taskq_dispatch_ent(taskq_t *tq, task_fun TASK_INIT(&task->tqent_task, prio, taskq_run_ent, task); taskqueue_enqueue(tq->tq_queue, &task->tqent_task); } + +void +taskq_wait(taskq_t *tq) +{ + taskqueue_drain_all(tq->tq_queue); +} From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:20:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEE74818; Thu, 28 Nov 2013 19:20:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 913B7102E; Thu, 28 Nov 2013 19:20:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJKnpV069608; Thu, 28 Nov 2013 19:20:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJKnR2069606; Thu, 28 Nov 2013 19:20:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311281920.rASJKnR2069606@svn.freebsd.org> From: Alexander Motin Date: Thu, 28 Nov 2013 19:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258716 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:20:49 -0000 Author: mav Date: Thu Nov 28 19:20:49 2013 New Revision: 258716 URL: http://svnweb.freebsd.org/changeset/base/258716 Log: - Add bucket size column to `show uma` DDB command. - Add `show umacache` command to show alike stats for cache-only UMA zones. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Thu Nov 28 19:17:11 2013 (r258715) +++ head/sys/vm/uma_core.c Thu Nov 28 19:20:49 2013 (r258716) @@ -131,6 +131,10 @@ static int bucketdisable = 1; /* Linked list of all kegs in the system */ static LIST_HEAD(,uma_keg) uma_kegs = LIST_HEAD_INITIALIZER(uma_kegs); +/* Linked list of all cache-only zones in the system */ +static LIST_HEAD(,uma_zone) uma_cachezones = + LIST_HEAD_INITIALIZER(uma_cachezones); + /* This mutex protects the keg list */ static struct mtx_padalign uma_mtx; @@ -1590,6 +1594,9 @@ zone_ctor(void *mem, int size, void *uda zone->uz_release = arg->release; zone->uz_arg = arg->arg; zone->uz_lockptr = &zone->uz_lock; + mtx_lock(&uma_mtx); + LIST_INSERT_HEAD(&uma_cachezones, zone, uz_link); + mtx_unlock(&uma_mtx); goto out; } @@ -3466,8 +3473,8 @@ DB_SHOW_COMMAND(uma, db_show_uma) uma_zone_t z; int cachefree; - db_printf("%18s %8s %8s %8s %12s %8s\n", "Zone", "Size", "Used", "Free", - "Requests", "Sleeps"); + db_printf("%18s %8s %8s %8s %12s %8s %8s\n", "Zone", "Size", "Used", + "Free", "Requests", "Sleeps", "Bucket"); LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) { if (kz->uk_flags & UMA_ZFLAG_INTERNAL) { @@ -3483,13 +3490,35 @@ DB_SHOW_COMMAND(uma, db_show_uma) cachefree += kz->uk_free; LIST_FOREACH(bucket, &z->uz_buckets, ub_link) cachefree += bucket->ub_cnt; - db_printf("%18s %8ju %8jd %8d %12ju %8ju\n", z->uz_name, - (uintmax_t)kz->uk_size, + db_printf("%18s %8ju %8jd %8d %12ju %8ju %8u\n", + z->uz_name, (uintmax_t)kz->uk_size, (intmax_t)(allocs - frees), cachefree, - (uintmax_t)allocs, sleeps); + (uintmax_t)allocs, sleeps, z->uz_count); if (db_pager_quit) return; } } } + +DB_SHOW_COMMAND(umacache, db_show_umacache) +{ + uint64_t allocs, frees; + uma_bucket_t bucket; + uma_zone_t z; + int cachefree; + + db_printf("%18s %8s %8s %8s %12s %8s\n", "Zone", "Size", "Used", "Free", + "Requests", "Bucket"); + LIST_FOREACH(z, &uma_cachezones, uz_link) { + uma_zone_sumstat(z, &cachefree, &allocs, &frees, NULL); + LIST_FOREACH(bucket, &z->uz_buckets, ub_link) + cachefree += bucket->ub_cnt; + db_printf("%18s %8ju %8jd %8d %12ju %8u\n", + z->uz_name, (uintmax_t)z->uz_size, + (intmax_t)(allocs - frees), cachefree, + (uintmax_t)allocs, z->uz_count); + if (db_pager_quit) + return; + } +} #endif From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:37:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 074DFBBB; Thu, 28 Nov 2013 19:37:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3FDD10D1; Thu, 28 Nov 2013 19:37:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJbOXk073845; Thu, 28 Nov 2013 19:37:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJbNRa073828; Thu, 28 Nov 2013 19:37:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311281937.rASJbNRa073828@svn.freebsd.org> From: Andriy Gapon Date: Thu, 28 Nov 2013 19:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258717 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/openso... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:37:25 -0000 Author: avg Date: Thu Nov 28 19:37:22 2013 New Revision: 258717 URL: http://svnweb.freebsd.org/changeset/base/258717 Log: MFV r258371,r258372: 4101 metaslab_debug should allow for fine-grained control 4101 metaslab_debug should allow for fine-grained control 4102 space_maps should store more information about themselves 4103 space map object blocksize should be increased 4104 ::spa_space no longer works 4105 removing a mirrored log device results in a leaked object 4106 asynchronously load metaslab illumos/illumos-gate@0713e232b7712cd27d99e1e935ebb8d5de61c57d Note that some tunables have been removed and some new tunables have been added. Of particular note, FreeBSD-only knob vfs.zfs.space_map_last_hope is removed as it was a nop for some time now (after one of the previous merges from upstream). MFC after: 11 days Sponsored by: HybridCluster [merge] Added: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h (contents, props changed) head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_reftree.h (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c head/sys/conf/files Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 28 19:20:49 2013 (r258716) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Nov 28 19:37:22 2013 (r258717) @@ -242,7 +242,7 @@ const char histo_stars[] = "************ const int histo_width = sizeof (histo_stars) - 1; static void -dump_histogram(const uint64_t *histo, int size) +dump_histogram(const uint64_t *histo, int size, int offset) { int i; int minidx = size - 1; @@ -263,7 +263,7 @@ dump_histogram(const uint64_t *histo, in for (i = minidx; i <= maxidx; i++) { (void) printf("\t\t\t%3u: %6llu %s\n", - i, (u_longlong_t)histo[i], + i + offset, (u_longlong_t)histo[i], &histo_stars[(max - histo[i]) * histo_width / max]); } } @@ -316,19 +316,19 @@ dump_zap_stats(objset_t *os, uint64_t ob (u_longlong_t)zs.zs_salt); (void) printf("\t\tLeafs with 2^n pointers:\n"); - dump_histogram(zs.zs_leafs_with_2n_pointers, ZAP_HISTOGRAM_SIZE); + dump_histogram(zs.zs_leafs_with_2n_pointers, ZAP_HISTOGRAM_SIZE, 0); (void) printf("\t\tBlocks with n*5 entries:\n"); - dump_histogram(zs.zs_blocks_with_n5_entries, ZAP_HISTOGRAM_SIZE); + dump_histogram(zs.zs_blocks_with_n5_entries, ZAP_HISTOGRAM_SIZE, 0); (void) printf("\t\tBlocks n/10 full:\n"); - dump_histogram(zs.zs_blocks_n_tenths_full, ZAP_HISTOGRAM_SIZE); + dump_histogram(zs.zs_blocks_n_tenths_full, ZAP_HISTOGRAM_SIZE, 0); (void) printf("\t\tEntries with n chunks:\n"); - dump_histogram(zs.zs_entries_using_n_chunks, ZAP_HISTOGRAM_SIZE); + dump_histogram(zs.zs_entries_using_n_chunks, ZAP_HISTOGRAM_SIZE, 0); (void) printf("\t\tBuckets with n entries:\n"); - dump_histogram(zs.zs_buckets_with_n_entries, ZAP_HISTOGRAM_SIZE); + dump_histogram(zs.zs_buckets_with_n_entries, ZAP_HISTOGRAM_SIZE, 0); } /*ARGSUSED*/ @@ -517,26 +517,85 @@ dump_zpldir(objset_t *os, uint64_t objec zap_cursor_fini(&zc); } +int +get_dtl_refcount(vdev_t *vd) +{ + int refcount = 0; + + if (vd->vdev_ops->vdev_op_leaf) { + space_map_t *sm = vd->vdev_dtl_sm; + + if (sm != NULL && + sm->sm_dbuf->db_size == sizeof (space_map_phys_t)) + return (1); + return (0); + } + + for (int c = 0; c < vd->vdev_children; c++) + refcount += get_dtl_refcount(vd->vdev_child[c]); + return (refcount); +} + +int +get_metaslab_refcount(vdev_t *vd) +{ + int refcount = 0; + + if (vd->vdev_top == vd) { + for (int m = 0; m < vd->vdev_ms_count; m++) { + space_map_t *sm = vd->vdev_ms[m]->ms_sm; + + if (sm != NULL && + sm->sm_dbuf->db_size == sizeof (space_map_phys_t)) + refcount++; + } + } + for (int c = 0; c < vd->vdev_children; c++) + refcount += get_metaslab_refcount(vd->vdev_child[c]); + + return (refcount); +} + +static int +verify_spacemap_refcounts(spa_t *spa) +{ + int expected_refcount, actual_refcount; + + expected_refcount = spa_feature_get_refcount(spa, + &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM]); + actual_refcount = get_dtl_refcount(spa->spa_root_vdev); + actual_refcount += get_metaslab_refcount(spa->spa_root_vdev); + + if (expected_refcount != actual_refcount) { + (void) printf("space map refcount mismatch: expected %d != " + "actual %d\n", expected_refcount, actual_refcount); + return (2); + } + return (0); +} + static void -dump_spacemap(objset_t *os, space_map_obj_t *smo, space_map_t *sm) +dump_spacemap(objset_t *os, space_map_t *sm) { uint64_t alloc, offset, entry; - uint8_t mapshift = sm->sm_shift; - uint64_t mapstart = sm->sm_start; char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" }; - if (smo->smo_object == 0) + if (sm == NULL) return; /* * Print out the freelist entries in both encoded and decoded form. */ alloc = 0; - for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) { - VERIFY3U(0, ==, dmu_read(os, smo->smo_object, offset, + for (offset = 0; offset < space_map_length(sm); + offset += sizeof (entry)) { + uint8_t mapshift = sm->sm_shift; + + VERIFY0(dmu_read(os, space_map_object(sm), offset, sizeof (entry), &entry, DMU_READ_PREFETCH)); if (SM_DEBUG_DECODE(entry)) { + (void) printf("\t [%6llu] %s: txg %llu, pass %llu\n", (u_longlong_t)(offset / sizeof (entry)), ddata[SM_DEBUG_ACTION_DECODE(entry)], @@ -548,10 +607,10 @@ dump_spacemap(objset_t *os, space_map_ob (u_longlong_t)(offset / sizeof (entry)), SM_TYPE_DECODE(entry) == SM_ALLOC ? 'A' : 'F', (u_longlong_t)((SM_OFFSET_DECODE(entry) << - mapshift) + mapstart), + mapshift) + sm->sm_start), (u_longlong_t)((SM_OFFSET_DECODE(entry) << - mapshift) + mapstart + (SM_RUN_DECODE(entry) << - mapshift)), + mapshift) + sm->sm_start + + (SM_RUN_DECODE(entry) << mapshift)), (u_longlong_t)(SM_RUN_DECODE(entry) << mapshift)); if (SM_TYPE_DECODE(entry) == SM_ALLOC) alloc += SM_RUN_DECODE(entry) << mapshift; @@ -559,10 +618,10 @@ dump_spacemap(objset_t *os, space_map_ob alloc -= SM_RUN_DECODE(entry) << mapshift; } } - if (alloc != smo->smo_alloc) { + if (alloc != space_map_allocated(sm)) { (void) printf("space_map_object alloc (%llu) INCONSISTENT " "with space map summary (%llu)\n", - (u_longlong_t)smo->smo_alloc, (u_longlong_t)alloc); + (u_longlong_t)space_map_allocated(sm), (u_longlong_t)alloc); } } @@ -570,15 +629,17 @@ static void dump_metaslab_stats(metaslab_t *msp) { char maxbuf[32]; - space_map_t *sm = msp->ms_map; - avl_tree_t *t = sm->sm_pp_root; - int free_pct = sm->sm_space * 100 / sm->sm_size; + range_tree_t *rt = msp->ms_tree; + avl_tree_t *t = &msp->ms_size_tree; + int free_pct = range_tree_space(rt) * 100 / msp->ms_size; - zdb_nicenum(space_map_maxsize(sm), maxbuf); + zdb_nicenum(metaslab_block_maxsize(msp), maxbuf); (void) printf("\t %25s %10lu %7s %6s %4s %4d%%\n", "segments", avl_numnodes(t), "maxsize", maxbuf, "freepct", free_pct); + (void) printf("\tIn-memory histogram:\n"); + dump_histogram(rt->rt_histogram, RANGE_TREE_HISTOGRAM_SIZE, 0); } static void @@ -586,33 +647,45 @@ dump_metaslab(metaslab_t *msp) { vdev_t *vd = msp->ms_group->mg_vd; spa_t *spa = vd->vdev_spa; - space_map_t *sm = msp->ms_map; - space_map_obj_t *smo = &msp->ms_smo; + space_map_t *sm = msp->ms_sm; char freebuf[32]; - zdb_nicenum(sm->sm_size - smo->smo_alloc, freebuf); + zdb_nicenum(msp->ms_size - space_map_allocated(sm), freebuf); (void) printf( "\tmetaslab %6llu offset %12llx spacemap %6llu free %5s\n", - (u_longlong_t)(sm->sm_start / sm->sm_size), - (u_longlong_t)sm->sm_start, (u_longlong_t)smo->smo_object, freebuf); + (u_longlong_t)msp->ms_id, (u_longlong_t)msp->ms_start, + (u_longlong_t)space_map_object(sm), freebuf); - if (dump_opt['m'] > 1 && !dump_opt['L']) { + if (dump_opt['m'] > 2 && !dump_opt['L']) { mutex_enter(&msp->ms_lock); - space_map_load_wait(sm); - if (!sm->sm_loaded) - VERIFY(space_map_load(sm, zfs_metaslab_ops, - SM_FREE, smo, spa->spa_meta_objset) == 0); + metaslab_load_wait(msp); + if (!msp->ms_loaded) { + VERIFY0(metaslab_load(msp)); + range_tree_stat_verify(msp->ms_tree); + } dump_metaslab_stats(msp); - space_map_unload(sm); + metaslab_unload(msp); mutex_exit(&msp->ms_lock); } - if (dump_opt['d'] > 5 || dump_opt['m'] > 2) { - ASSERT(sm->sm_size == (1ULL << vd->vdev_ms_shift)); + if (dump_opt['m'] > 1 && sm != NULL && + spa_feature_is_active(spa, + &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM])) { + /* + * The space map histogram represents free space in chunks + * of sm_shift (i.e. bucket 0 refers to 2^sm_shift). + */ + (void) printf("\tOn-disk histogram:\n"); + dump_histogram(sm->sm_phys->smp_histogram, + SPACE_MAP_HISTOGRAM_SIZE(sm), sm->sm_shift); + } + + if (dump_opt['d'] > 5 || dump_opt['m'] > 3) { + ASSERT(msp->ms_size == (1ULL << vd->vdev_ms_shift)); mutex_enter(&msp->ms_lock); - dump_spacemap(spa->spa_meta_objset, smo, sm); + dump_spacemap(spa->spa_meta_objset, msp->ms_sm); mutex_exit(&msp->ms_lock); } } @@ -801,9 +874,9 @@ dump_all_ddts(spa_t *spa) } static void -dump_dtl_seg(space_map_t *sm, uint64_t start, uint64_t size) +dump_dtl_seg(void *arg, uint64_t start, uint64_t size) { - char *prefix = (void *)sm; + char *prefix = arg; (void) printf("%s [%llu,%llu) length %llu\n", prefix, @@ -833,17 +906,16 @@ dump_dtl(vdev_t *vd, int indent) required ? "DTL-required" : "DTL-expendable"); for (int t = 0; t < DTL_TYPES; t++) { - space_map_t *sm = &vd->vdev_dtl[t]; - if (sm->sm_space == 0) + range_tree_t *rt = vd->vdev_dtl[t]; + if (range_tree_space(rt) == 0) continue; (void) snprintf(prefix, sizeof (prefix), "\t%*s%s", indent + 2, "", name[t]); - mutex_enter(sm->sm_lock); - space_map_walk(sm, dump_dtl_seg, (void *)prefix); - mutex_exit(sm->sm_lock); + mutex_enter(rt->rt_lock); + range_tree_walk(rt, dump_dtl_seg, prefix); + mutex_exit(rt->rt_lock); if (dump_opt['d'] > 5 && vd->vdev_children == 0) - dump_spacemap(spa->spa_meta_objset, - &vd->vdev_dtl_smo, sm); + dump_spacemap(spa->spa_meta_objset, vd->vdev_dtl_sm); } for (int c = 0; c < vd->vdev_children; c++) @@ -2172,39 +2244,17 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog } static void -zdb_leak(space_map_t *sm, uint64_t start, uint64_t size) +zdb_leak(void *arg, uint64_t start, uint64_t size) { - vdev_t *vd = sm->sm_ppd; + vdev_t *vd = arg; (void) printf("leaked space: vdev %llu, offset 0x%llx, size %llu\n", (u_longlong_t)vd->vdev_id, (u_longlong_t)start, (u_longlong_t)size); } -/* ARGSUSED */ -static void -zdb_space_map_load(space_map_t *sm) -{ -} - -static void -zdb_space_map_unload(space_map_t *sm) -{ - space_map_vacate(sm, zdb_leak, sm); -} - -/* ARGSUSED */ -static void -zdb_space_map_claim(space_map_t *sm, uint64_t start, uint64_t size) -{ -} - -static space_map_ops_t zdb_space_map_ops = { - zdb_space_map_load, - zdb_space_map_unload, +static metaslab_ops_t zdb_metaslab_ops = { NULL, /* alloc */ - zdb_space_map_claim, - NULL, /* free */ - NULL /* maxsize */ + NULL /* fragmented */ }; static void @@ -2259,11 +2309,21 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) for (int m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); - space_map_unload(msp->ms_map); - VERIFY(space_map_load(msp->ms_map, - &zdb_space_map_ops, SM_ALLOC, &msp->ms_smo, - spa->spa_meta_objset) == 0); - msp->ms_map->sm_ppd = vd; + metaslab_unload(msp); + + /* + * For leak detection, we overload the metaslab + * ms_tree to contain allocated segments + * instead of free segments. As a result, + * we can't use the normal metaslab_load/unload + * interfaces. + */ + if (msp->ms_sm != NULL) { + msp->ms_ops = &zdb_metaslab_ops; + VERIFY0(space_map_load(msp->ms_sm, + msp->ms_tree, SM_ALLOC)); + msp->ms_loaded = B_TRUE; + } mutex_exit(&msp->ms_lock); } } @@ -2286,7 +2346,20 @@ zdb_leak_fini(spa_t *spa) for (int m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); - space_map_unload(msp->ms_map); + + /* + * The ms_tree has been overloaded to + * contain allocated segments. Now that we + * finished traversing all blocks, any + * block that remains in the ms_tree + * represents an allocated block that we + * did not claim during the traversal. + * Claimed blocks would have been removed + * from the ms_tree. + */ + range_tree_vacate(msp->ms_tree, zdb_leak, vd); + msp->ms_loaded = B_FALSE; + mutex_exit(&msp->ms_lock); } } @@ -2489,7 +2562,7 @@ dump_block_stats(spa_t *spa) "(in 512-byte sectors): " "number of blocks\n"); dump_histogram(zb->zb_psize_histogram, - PSIZE_HISTO_SIZE); + PSIZE_HISTO_SIZE, 0); } } } @@ -2659,6 +2732,9 @@ dump_zpool(spa_t *spa) if (dump_opt['b'] || dump_opt['c']) rc = dump_block_stats(spa); + if (rc == 0) + rc = verify_spacemap_refcounts(spa); + if (dump_opt['s']) show_pool_stats(spa); Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Thu Nov 28 19:20:49 2013 (r258716) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Thu Nov 28 19:37:22 2013 (r258717) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2013 +.Dd October 08, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -251,6 +251,24 @@ configuration. .\" .Xr dumpon 8 .\" command to configure a .\" dump device on a pool comprised of multiple vdevs. +.It Sy spacemap_histogram +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:spacemap_histogram" +.It GUID Ta com.delphix:spacemap_histogram +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta none +.El +.Pp +This features allows ZFS to maintain more information about how free space +is organized within the pool. If this feature is +.Sy enabled , +ZFS will +set this feature to +.Sy active +when a new space map object is created or +an existing space map is upgraded to the new format. +Once the feature is +.Sy active , +it will remain in that state until the pool is destroyed. .El .Sh SEE ALSO .Xr zpool 8 Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 28 19:20:49 2013 (r258716) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Nov 28 19:37:22 2013 (r258717) @@ -5339,7 +5339,7 @@ ztest_deadman_thread(void *arg) * vdev_deadman() discovers that there hasn't been any recent * I/Os then it will end up aborting the tests. */ - if (spa_suspended(spa)) { + if (spa_suspended(spa) || spa->spa_root_vdev == NULL) { fatal(0, "aborting test after %llu seconds because " "pool has transitioned to a suspended state.", zfs_deadman_synctime_ms / 1000); Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Thu Nov 28 19:20:49 2013 (r258716) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Thu Nov 28 19:37:22 2013 (r258717) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -163,4 +163,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, "com.joyent:multi_vdev_crash_dump", "multi_vdev_crash_dump", "Crash dumps to multiple vdev pools.", B_FALSE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_SPACEMAP_HISTOGRAM, + "com.delphix:spacemap_histogram", "spacemap_histogram", + "Spacemaps maintain space histograms.", B_TRUE, B_FALSE, NULL); } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Thu Nov 28 19:20:49 2013 (r258716) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h Thu Nov 28 19:37:22 2013 (r258717) @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -55,6 +55,7 @@ static enum spa_feature { SPA_FEATURE_EMPTY_BPOBJ, SPA_FEATURE_LZ4_COMPRESS, SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, + SPA_FEATURE_SPACEMAP_HISTOGRAM, SPA_FEATURES } spa_feature_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Thu Nov 28 19:20:49 2013 (r258716) +++ head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Thu Nov 28 19:37:22 2013 (r258717) @@ -21,7 +21,8 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2013 by Delphix. All rights reserved. # Copyright (c) 2013 by Saso Kiselkov. All rights reserved. # # @@ -62,6 +63,7 @@ ZFS_COMMON_OBJS += \ lz4.o \ lzjb.o \ metaslab.o \ + range_tree.o \ refcount.o \ rrwlock.o \ sa.o \ @@ -72,6 +74,7 @@ ZFS_COMMON_OBJS += \ spa_history.o \ spa_misc.o \ space_map.o \ + space_reftree.o \ txg.o \ uberblock.o \ unique.o \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Nov 28 19:20:49 2013 (r258716) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Nov 28 19:37:22 2013 (r258717) @@ -1339,7 +1339,7 @@ dnode_set_blksz(dnode_t *dn, uint64_t si rw_enter(&dn->dn_struct_rwlock, RW_WRITER); /* Check for any allocated blocks beyond the first */ - if (dn->dn_phys->dn_maxblkid != 0) + if (dn->dn_maxblkid != 0) goto fail; mutex_enter(&dn->dn_dbufs_mtx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Nov 28 19:20:49 2013 (r258716) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Nov 28 19:37:22 2013 (r258717) @@ -31,6 +31,7 @@ #include #include #include +#include SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab"); @@ -47,6 +48,11 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab (!((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER | \ METASLAB_GANG_AVOID))) +#define METASLAB_WEIGHT_PRIMARY (1ULL << 63) +#define METASLAB_WEIGHT_SECONDARY (1ULL << 62) +#define METASLAB_ACTIVE_MASK \ + (METASLAB_WEIGHT_PRIMARY | METASLAB_WEIGHT_SECONDARY) + uint64_t metaslab_aliquot = 512ULL << 10; uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ TUNABLE_QUAD("vfs.zfs.metaslab.gang_bang", &metaslab_gang_bang); @@ -61,6 +67,11 @@ SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, * Values should be greater than or equal to 100. */ int zfs_condense_pct = 200; +TUNABLE_INT("vfs.zfs.condense_pct", &zfs_condense_pct); +SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_pct, CTLFLAG_RWTUN, + &zfs_condense_pct, 0, + "Condense on-disk spacemap when it is more than this many percents" + " of in-memory counterpart"); /* * This value defines the number of allowed allocation failures per vdev. @@ -88,15 +99,29 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_ * no metaslab group will be excluded based on this criterion. */ int zfs_mg_noalloc_threshold = 0; +TUNABLE_INT("vfs.zfs.mg_noalloc_threshold", &zfs_mg_noalloc_threshold); +SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_noalloc_threshold, CTLFLAG_RWTUN, + &zfs_mg_noalloc_threshold, 0, + "Percentage of metaslab group size that should be free" + " to make it eligible for allocation"); /* - * Metaslab debugging: when set, keeps all space maps in core to verify frees. + * When set will load all metaslabs when pool is first opened. */ -static int metaslab_debug = 0; -TUNABLE_INT("vfs.zfs.metaslab.debug", &metaslab_debug); -SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, debug, CTLFLAG_RWTUN, &metaslab_debug, - 0, - "Metaslab debugging: when set, keeps all space maps in core to verify frees"); +int metaslab_debug_load = 0; +TUNABLE_INT("vfs.zfs.metaslab.debug_load", &metaslab_debug_load); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, debug_load, CTLFLAG_RWTUN, + &metaslab_debug_load, 0, + "Load all metaslabs when pool is first opened"); + +/* + * When set will prevent metaslabs from being unloaded. + */ +int metaslab_debug_unload = 0; +TUNABLE_INT("vfs.zfs.metaslab.debug_unload", &metaslab_debug_unload); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, debug_unload, CTLFLAG_RWTUN, + &metaslab_debug_unload, 0, + "Prevent metaslabs from being unloaded"); /* * Minimum size which forces the dynamic allocator to change @@ -135,20 +160,24 @@ SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, "A metaslab is considered \"free\" if it contains a contiguous segment which is greater than vfs.zfs.metaslab.min_alloc_size"); /* - * Max number of space_maps to prefetch. - */ -int metaslab_prefetch_limit = SPA_DVAS_PER_BP; -TUNABLE_INT("vfs.zfs.metaslab.prefetch_limit", &metaslab_prefetch_limit); -SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, prefetch_limit, CTLFLAG_RWTUN, - &metaslab_prefetch_limit, 0, "Maximum number of space_maps to prefetch"); - -/* - * Percentage bonus multiplier for metaslabs that are in the bonus area. + * Percentage of all cpus that can be used by the metaslab taskq. */ -int metaslab_smo_bonus_pct = 150; -TUNABLE_INT("vfs.zfs.metaslab.smo_bonus_pct", &metaslab_smo_bonus_pct); -SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, smo_bonus_pct, CTLFLAG_RWTUN, - &metaslab_smo_bonus_pct, 0, "Maximum number of space_maps to prefetch"); +int metaslab_load_pct = 50; +TUNABLE_INT("vfs.zfs.metaslab.load_pct", &metaslab_load_pct); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, load_pct, CTLFLAG_RWTUN, + &metaslab_load_pct, 0, + "Percentage of cpus that can be used by the metaslab taskq"); + +/* + * Determines how many txgs a metaslab may remain loaded without having any + * allocations from it. As long as a metaslab continues to be used we will + * keep it loaded. + */ +int metaslab_unload_delay = TXG_SIZE * 2; +TUNABLE_INT("vfs.zfs.metaslab.unload_delay", &metaslab_unload_delay); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, unload_delay, CTLFLAG_RWTUN, + &metaslab_unload_delay, 0, + "Number of TXGs that an unused metaslab can be kept in memory"); /* * Should we be willing to write data to degraded vdevs? @@ -159,12 +188,41 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, write_to_ TUNABLE_INT("vfs.zfs.write_to_degraded", &zfs_write_to_degraded); /* + * Max number of metaslabs per group to preload. + */ +int metaslab_preload_limit = SPA_DVAS_PER_BP; +TUNABLE_INT("vfs.zfs.metaslab.preload_limit", &metaslab_preload_limit); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, preload_limit, CTLFLAG_RWTUN, + &metaslab_preload_limit, 0, + "Max number of metaslabs per group to preload"); + +/* + * Enable/disable preloading of metaslab. + */ +boolean_t metaslab_preload_enabled = B_TRUE; +TUNABLE_INT("vfs.zfs.metaslab.preload_enabled", &metaslab_preload_enabled); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, preload_enabled, CTLFLAG_RWTUN, + &metaslab_preload_enabled, 0, + "Max number of metaslabs per group to preload"); + +/* + * Enable/disable additional weight factor for each metaslab. + */ +boolean_t metaslab_weight_factor_enable = B_FALSE; +TUNABLE_INT("vfs.zfs.metaslab.weight_factor_enable", + &metaslab_weight_factor_enable); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, weight_factor_enable, CTLFLAG_RWTUN, + &metaslab_weight_factor_enable, 0, + "Enable additional weight factor for each metaslab"); + + +/* * ========================================================================== * Metaslab classes * ========================================================================== */ metaslab_class_t * -metaslab_class_create(spa_t *spa, space_map_ops_t *ops) +metaslab_class_create(spa_t *spa, metaslab_ops_t *ops) { metaslab_class_t *mc; @@ -295,9 +353,9 @@ metaslab_compare(const void *x1, const v /* * If the weights are identical, use the offset to force uniqueness. */ - if (m1->ms_map->sm_start < m2->ms_map->sm_start) + if (m1->ms_start < m2->ms_start) return (-1); - if (m1->ms_map->sm_start > m2->ms_map->sm_start) + if (m1->ms_start > m2->ms_start) return (1); ASSERT3P(m1, ==, m2); @@ -365,6 +423,9 @@ metaslab_group_create(metaslab_class_t * mg->mg_class = mc; mg->mg_activation_count = 0; + mg->mg_taskq = taskq_create("metaslab_group_tasksq", metaslab_load_pct, + minclsyspri, 10, INT_MAX, TASKQ_THREADS_CPU_PCT); + return (mg); } @@ -434,6 +495,8 @@ metaslab_group_passivate(metaslab_group_ return; } + taskq_wait(mg->mg_taskq); + mgprev = mg->mg_prev; mgnext = mg->mg_next; @@ -514,130 +577,200 @@ metaslab_group_allocatable(metaslab_grou /* * ========================================================================== - * Common allocator routines + * Range tree callbacks * ========================================================================== */ + +/* + * Comparison function for the private size-ordered tree. Tree is sorted + * by size, larger sizes at the end of the tree. + */ static int -metaslab_segsize_compare(const void *x1, const void *x2) +metaslab_rangesize_compare(const void *x1, const void *x2) { - const space_seg_t *s1 = x1; - const space_seg_t *s2 = x2; - uint64_t ss_size1 = s1->ss_end - s1->ss_start; - uint64_t ss_size2 = s2->ss_end - s2->ss_start; + const range_seg_t *r1 = x1; + const range_seg_t *r2 = x2; + uint64_t rs_size1 = r1->rs_end - r1->rs_start; + uint64_t rs_size2 = r2->rs_end - r2->rs_start; - if (ss_size1 < ss_size2) + if (rs_size1 < rs_size2) return (-1); - if (ss_size1 > ss_size2) + if (rs_size1 > rs_size2) return (1); - if (s1->ss_start < s2->ss_start) + if (r1->rs_start < r2->rs_start) return (-1); - if (s1->ss_start > s2->ss_start) + + if (r1->rs_start > r2->rs_start) return (1); return (0); } /* - * This is a helper function that can be used by the allocator to find - * a suitable block to allocate. This will search the specified AVL - * tree looking for a block that matches the specified criteria. + * Create any block allocator specific components. The current allocators + * rely on using both a size-ordered range_tree_t and an array of uint64_t's. */ -static uint64_t -metaslab_block_picker(avl_tree_t *t, uint64_t *cursor, uint64_t size, - uint64_t align) +static void +metaslab_rt_create(range_tree_t *rt, void *arg) { - space_seg_t *ss, ssearch; - avl_index_t where; - - ssearch.ss_start = *cursor; - ssearch.ss_end = *cursor + size; + metaslab_t *msp = arg; - ss = avl_find(t, &ssearch, &where); - if (ss == NULL) - ss = avl_nearest(t, where, AVL_AFTER); + ASSERT3P(rt->rt_arg, ==, msp); + ASSERT(msp->ms_tree == NULL); - while (ss != NULL) { - uint64_t offset = P2ROUNDUP(ss->ss_start, align); - - if (offset + size <= ss->ss_end) { - *cursor = offset + size; - return (offset); - } - ss = AVL_NEXT(t, ss); - } - - /* - * If we know we've searched the whole map (*cursor == 0), give up. - * Otherwise, reset the cursor to the beginning and try again. - */ - if (*cursor == 0) - return (-1ULL); - - *cursor = 0; - return (metaslab_block_picker(t, cursor, size, align)); + avl_create(&msp->ms_size_tree, metaslab_rangesize_compare, + sizeof (range_seg_t), offsetof(range_seg_t, rs_pp_node)); } +/* + * Destroy the block allocator specific components. + */ static void -metaslab_pp_load(space_map_t *sm) +metaslab_rt_destroy(range_tree_t *rt, void *arg) { - space_seg_t *ss; - - ASSERT(sm->sm_ppd == NULL); - sm->sm_ppd = kmem_zalloc(64 * sizeof (uint64_t), KM_SLEEP); + metaslab_t *msp = arg; - sm->sm_pp_root = kmem_alloc(sizeof (avl_tree_t), KM_SLEEP); - avl_create(sm->sm_pp_root, metaslab_segsize_compare, - sizeof (space_seg_t), offsetof(struct space_seg, ss_pp_node)); + ASSERT3P(rt->rt_arg, ==, msp); + ASSERT3P(msp->ms_tree, ==, rt); + ASSERT0(avl_numnodes(&msp->ms_size_tree)); - for (ss = avl_first(&sm->sm_root); ss; ss = AVL_NEXT(&sm->sm_root, ss)) - avl_add(sm->sm_pp_root, ss); + avl_destroy(&msp->ms_size_tree); } static void -metaslab_pp_unload(space_map_t *sm) +metaslab_rt_add(range_tree_t *rt, range_seg_t *rs, void *arg) { - void *cookie = NULL; - - kmem_free(sm->sm_ppd, 64 * sizeof (uint64_t)); - sm->sm_ppd = NULL; - - while (avl_destroy_nodes(sm->sm_pp_root, &cookie) != NULL) { - /* tear down the tree */ - } + metaslab_t *msp = arg; - avl_destroy(sm->sm_pp_root); - kmem_free(sm->sm_pp_root, sizeof (avl_tree_t)); - sm->sm_pp_root = NULL; + ASSERT3P(rt->rt_arg, ==, msp); + ASSERT3P(msp->ms_tree, ==, rt); + VERIFY(!msp->ms_condensing); + avl_add(&msp->ms_size_tree, rs); } -/* ARGSUSED */ static void -metaslab_pp_claim(space_map_t *sm, uint64_t start, uint64_t size) +metaslab_rt_remove(range_tree_t *rt, range_seg_t *rs, void *arg) { - /* No need to update cursor */ + metaslab_t *msp = arg; + + ASSERT3P(rt->rt_arg, ==, msp); + ASSERT3P(msp->ms_tree, ==, rt); + VERIFY(!msp->ms_condensing); + avl_remove(&msp->ms_size_tree, rs); } -/* ARGSUSED */ static void -metaslab_pp_free(space_map_t *sm, uint64_t start, uint64_t size) +metaslab_rt_vacate(range_tree_t *rt, void *arg) { - /* No need to update cursor */ + metaslab_t *msp = arg; + + ASSERT3P(rt->rt_arg, ==, msp); + ASSERT3P(msp->ms_tree, ==, rt); + + /* + * Normally one would walk the tree freeing nodes along the way. + * Since the nodes are shared with the range trees we can avoid + * walking all nodes and just reinitialize the avl tree. The nodes + * will be freed by the range tree, so we don't want to free them here. + */ + avl_create(&msp->ms_size_tree, metaslab_rangesize_compare, + sizeof (range_seg_t), offsetof(range_seg_t, rs_pp_node)); } +static range_tree_ops_t metaslab_rt_ops = { + metaslab_rt_create, + metaslab_rt_destroy, + metaslab_rt_add, + metaslab_rt_remove, + metaslab_rt_vacate +}; + +/* + * ========================================================================== + * Metaslab block operations + * ========================================================================== + */ + /* * Return the maximum contiguous segment within the metaslab. */ uint64_t -metaslab_pp_maxsize(space_map_t *sm) +metaslab_block_maxsize(metaslab_t *msp) { - avl_tree_t *t = sm->sm_pp_root; - space_seg_t *ss; + avl_tree_t *t = &msp->ms_size_tree; + range_seg_t *rs; - if (t == NULL || (ss = avl_last(t)) == NULL) + if (t == NULL || (rs = avl_last(t)) == NULL) return (0ULL); - return (ss->ss_end - ss->ss_start); + return (rs->rs_end - rs->rs_start); +} + +uint64_t +metaslab_block_alloc(metaslab_t *msp, uint64_t size) +{ + uint64_t start; + range_tree_t *rt = msp->ms_tree; + + VERIFY(!msp->ms_condensing); + + start = msp->ms_ops->msop_alloc(msp, size); + if (start != -1ULL) { + vdev_t *vd = msp->ms_group->mg_vd; + + VERIFY0(P2PHASE(start, 1ULL << vd->vdev_ashift)); + VERIFY0(P2PHASE(size, 1ULL << vd->vdev_ashift)); + VERIFY3U(range_tree_space(rt) - size, <=, msp->ms_size); + range_tree_remove(rt, start, size); + } + return (start); +} + +/* + * ========================================================================== + * Common allocator routines + * ========================================================================== + */ + +/* + * This is a helper function that can be used by the allocator to find + * a suitable block to allocate. This will search the specified AVL + * tree looking for a block that matches the specified criteria. + */ +static uint64_t +metaslab_block_picker(avl_tree_t *t, uint64_t *cursor, uint64_t size, + uint64_t align) +{ + range_seg_t *rs, rsearch; + avl_index_t where; + + rsearch.rs_start = *cursor; + rsearch.rs_end = *cursor + size; + + rs = avl_find(t, &rsearch, &where); + if (rs == NULL) + rs = avl_nearest(t, where, AVL_AFTER); + + while (rs != NULL) { + uint64_t offset = P2ROUNDUP(rs->rs_start, align); + + if (offset + size <= rs->rs_end) { + *cursor = offset + size; + return (offset); + } + rs = AVL_NEXT(t, rs); + } + + /* + * If we know we've searched the whole map (*cursor == 0), give up. + * Otherwise, reset the cursor to the beginning and try again. + */ + if (*cursor == 0) + return (-1ULL); + + *cursor = 0; + return (metaslab_block_picker(t, cursor, size, align)); } /* @@ -646,29 +779,31 @@ metaslab_pp_maxsize(space_map_t *sm) * ========================================================================== */ static uint64_t -metaslab_ff_alloc(space_map_t *sm, uint64_t size) +metaslab_ff_alloc(metaslab_t *msp, uint64_t size) { - avl_tree_t *t = &sm->sm_root; + /* + * Find the largest power of 2 block size that evenly divides the + * requested size. This is used to try to allocate blocks with similar + * alignment from the same area of the metaslab (i.e. same cursor + * bucket) but it does not guarantee that other allocations sizes + * may exist in the same region. + */ uint64_t align = size & -size; - uint64_t *cursor = (uint64_t *)sm->sm_ppd + highbit(align) - 1; + uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + avl_tree_t *t = &msp->ms_tree->rt_root; return (metaslab_block_picker(t, cursor, size, align)); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:40:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6BBBD2E; Thu, 28 Nov 2013 19:40:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A283A110E; Thu, 28 Nov 2013 19:40:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJeYiv075790; Thu, 28 Nov 2013 19:40:34 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJeYvS075788; Thu, 28 Nov 2013 19:40:34 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311281940.rASJeYvS075788@svn.freebsd.org> From: Peter Wemm Date: Thu, 28 Nov 2013 19:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258718 - in head/sys: compat/freebsd32 kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:40:34 -0000 Author: peter Date: Thu Nov 28 19:40:33 2013 New Revision: 258718 URL: http://svnweb.freebsd.org/changeset/base/258718 Log: jail_v0.ip_number was always in host byte order. This was handled in one of the many layers of indirection and shims through stable/7 in jail_handle_ips(). When it was cleaned up and unified through kern_jail() for 8.x, the byte order swap was lost. This only matters for ancient binaries that call jail(2) themselves internally. Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_jail.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 28 19:37:22 2013 (r258717) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 28 19:40:33 2013 (r258718) @@ -1928,7 +1928,7 @@ freebsd32_jail(struct thread *td, struct CP(j32_v0, j, version); PTRIN_CP(j32_v0, j, path); PTRIN_CP(j32_v0, j, hostname); - j.ip4s = j32_v0.ip_number; + j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */ break; } Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Nov 28 19:37:22 2013 (r258717) +++ head/sys/kern/kern_jail.c Thu Nov 28 19:40:33 2013 (r258718) @@ -314,7 +314,7 @@ sys_jail(struct thread *td, struct jail_ j.version = j0.version; j.path = j0.path; j.hostname = j0.hostname; - j.ip4s = j0.ip_number; + j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */ break; } From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:41:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C3F1E6A; Thu, 28 Nov 2013 19:41:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 189861114; Thu, 28 Nov 2013 19:41:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJf3uA076420; Thu, 28 Nov 2013 19:41:03 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJf3mo076419; Thu, 28 Nov 2013 19:41:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311281941.rASJf3mo076419@svn.freebsd.org> From: Ed Maste Date: Thu, 28 Nov 2013 19:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258719 - head/sys/boot/i386/efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:41:04 -0000 Author: emaste Date: Thu Nov 28 19:41:03 2013 New Revision: 258719 URL: http://svnweb.freebsd.org/changeset/base/258719 Log: Purely cosmetic change: order DT_REL* and DT_RELA* consistently. From projects/uefi, r246107 Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/i386/efi/reloc.c Modified: head/sys/boot/i386/efi/reloc.c ============================================================================== --- head/sys/boot/i386/efi/reloc.c Thu Nov 28 19:40:33 2013 (r258718) +++ head/sys/boot/i386/efi/reloc.c Thu Nov 28 19:41:03 2013 (r258719) @@ -61,8 +61,8 @@ _reloc(unsigned long ImageBase, ElfW_Dyn relent = 0; for (dynp = dynamic; dynp->d_tag != DT_NULL; dynp++) { switch (dynp->d_tag) { - case DT_RELA: case DT_REL: + case DT_RELA: rel = (ElfW_Rel *) ((unsigned long) dynp->d_un.d_ptr + ImageBase); break; From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 19:44:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6169EFDC; Thu, 28 Nov 2013 19:44:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C68D112D; Thu, 28 Nov 2013 19:44:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASJib8b076926; Thu, 28 Nov 2013 19:44:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASJia6s076923; Thu, 28 Nov 2013 19:44:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311281944.rASJia6s076923@svn.freebsd.org> From: Andriy Gapon Date: Thu, 28 Nov 2013 19:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258720 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 19:44:37 -0000 Author: avg Date: Thu Nov 28 19:44:36 2013 New Revision: 258720 URL: http://svnweb.freebsd.org/changeset/base/258720 Log: MFV r258665: 4347 ZPL can use dmu_tx_assign(TXG_WAIT) illumos/illumos-gate@e722410c49fe67cbf0f639cbcc288bd6cbcf7dd1 MFC after: 9 days X-MFC after: r258632 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Thu Nov 28 19:41:03 2013 (r258719) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Thu Nov 28 19:44:36 2013 (r258720) @@ -951,7 +951,6 @@ zfs_make_xattrdir(znode_t *zp, vattr_t * return (SET_ERROR(EDQUOT)); } -top: tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes + ZFS_SA_BASE_ATTR_SIZE); @@ -960,13 +959,8 @@ top: fuid_dirtied = zfsvfs->z_fuid_dirty; if (fuid_dirtied) zfs_fuid_txhold(zfsvfs, tx); - error = dmu_tx_assign(tx, TXG_NOWAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto top; - } zfs_acl_ids_free(&acl_ids); dmu_tx_abort(tx); return (error); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 28 19:41:03 2013 (r258719) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 28 19:44:36 2013 (r258720) @@ -107,11 +107,18 @@ * (3) All range locks must be grabbed before calling dmu_tx_assign(), * as they can span dmu_tx_assign() calls. * - * (4) Always pass TXG_NOWAIT as the second argument to dmu_tx_assign(). - * This is critical because we don't want to block while holding locks. - * Note, in particular, that if a lock is sometimes acquired before - * the tx assigns, and sometimes after (e.g. z_lock), then failing to - * use a non-blocking assign can deadlock the system. The scenario: + * (4) If ZPL locks are held, pass TXG_NOWAIT as the second argument to + * dmu_tx_assign(). This is critical because we don't want to block + * while holding locks. + * + * If no ZPL locks are held (aside from ZFS_ENTER()), use TXG_WAIT. This + * reduces lock contention and CPU usage when we must wait (note that if + * throughput is constrained by the storage, nearly every transaction + * must wait). + * + * Note, in particular, that if a lock is sometimes acquired before + * the tx assigns, and sometimes after (e.g. z_lock), then failing + * to use a non-blocking assign can deadlock the system. The scenario: * * Thread A has grabbed a lock before calling dmu_tx_assign(). * Thread B is in an already-assigned tx, and blocks for this lock. @@ -968,7 +975,6 @@ zfs_write(vnode_t *vp, uio_t *uio, int i while (n > 0) { abuf = NULL; woff = uio->uio_loffset; -again: if (zfs_owner_overquota(zfsvfs, zp, B_FALSE) || zfs_owner_overquota(zfsvfs, zp, B_TRUE)) { if (abuf != NULL) @@ -1020,13 +1026,8 @@ again: dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); dmu_tx_hold_write(tx, zp->z_id, woff, MIN(n, max_blksz)); zfs_sa_upgrade_txholds(tx, zp); - error = dmu_tx_assign(tx, TXG_NOWAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto again; - } dmu_tx_abort(tx); if (abuf != NULL) dmu_return_arcbuf(abuf); @@ -3410,12 +3411,9 @@ top: zfs_sa_upgrade_txholds(tx, zp); - err = dmu_tx_assign(tx, TXG_NOWAIT); - if (err) { - if (err == ERESTART) - dmu_tx_wait(tx); + err = dmu_tx_assign(tx, TXG_WAIT); + if (err) goto out; - } count = 0; /* @@ -4528,19 +4526,13 @@ zfs_putapage(vnode_t *vp, page_t *pp, u_ err = SET_ERROR(EDQUOT); goto out; } -top: tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_write(tx, zp->z_id, off, len); dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); zfs_sa_upgrade_txholds(tx, zp); - err = dmu_tx_assign(tx, TXG_NOWAIT); + err = dmu_tx_assign(tx, TXG_WAIT); if (err != 0) { - if (err == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto top; - } dmu_tx_abort(tx); goto out; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Nov 28 19:41:03 2013 (r258719) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Thu Nov 28 19:44:36 2013 (r258720) @@ -1536,7 +1536,6 @@ zfs_extend(znode_t *zp, uint64_t end) zfs_range_unlock(rl); return (0); } -top: tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); zfs_sa_upgrade_txholds(tx, zp); @@ -1556,13 +1555,8 @@ top: newblksz = 0; } - error = dmu_tx_assign(tx, TXG_NOWAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto top; - } dmu_tx_abort(tx); zfs_range_unlock(rl); return (error); @@ -1670,17 +1664,11 @@ zfs_trunc(znode_t *zp, uint64_t end) zfs_range_unlock(rl); return (error); } -top: tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); zfs_sa_upgrade_txholds(tx, zp); - error = dmu_tx_assign(tx, TXG_NOWAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto top; - } dmu_tx_abort(tx); zfs_range_unlock(rl); return (error); @@ -1771,13 +1759,8 @@ log: tx = dmu_tx_create(zfsvfs->z_os); dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); zfs_sa_upgrade_txholds(tx, zp); - error = dmu_tx_assign(tx, TXG_NOWAIT); + error = dmu_tx_assign(tx, TXG_WAIT); if (error) { - if (error == ERESTART) { - dmu_tx_wait(tx); - dmu_tx_abort(tx); - goto log; - } dmu_tx_abort(tx); return (error); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 21:57:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 895AF8A1; Thu, 28 Nov 2013 21:57:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59F41172F; Thu, 28 Nov 2013 21:57:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASLvIax021402; Thu, 28 Nov 2013 21:57:18 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASLvImF021401; Thu, 28 Nov 2013 21:57:18 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201311282157.rASLvImF021401@svn.freebsd.org> From: Andreas Tobler Date: Thu, 28 Nov 2013 21:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258722 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 21:57:18 -0000 Author: andreast Date: Thu Nov 28 21:57:17 2013 New Revision: 258722 URL: http://svnweb.freebsd.org/changeset/base/258722 Log: Give some output about the CPU clock on IBMPOWER machines, currently read from OF. Linux does it similar, means they also read the OF values and display them. Tested under qemu and real hardware: cpu0: IBM POWER5+ revision 2.0, 1898.10 MHz Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Thu Nov 28 19:55:07 2013 (r258721) +++ head/sys/powerpc/powerpc/cpu.c Thu Nov 28 21:57:17 2013 (r258722) @@ -74,6 +74,8 @@ #include #include +#include + static void cpu_6xx_setup(int cpuid, uint16_t vers); static void cpu_970_setup(int cpuid, uint16_t vers); static void cpu_booke_setup(int cpuid, uint16_t vers); @@ -273,6 +275,10 @@ cpu_est_clockrate(int cpu_id, uint64_t * { uint16_t vers; register_t msr; + phandle_t cpu, dev, root; + uint32_t freq[2]; + int res = 0; + char buf[8]; vers = mfpvr() >> 16; msr = mfmsr(); @@ -316,6 +322,41 @@ cpu_est_clockrate(int cpu_id, uint64_t * mtmsr(msr); return (0); + + case IBMPOWER5: + case IBMPOWER5PLUS: + case IBMPOWER6: + case IBMPOWER7: + case IBMPOWER7PLUS: + case IBMPOWER8: + root = OF_peer(0); + dev = OF_child(root); + while (dev != 0) { + res = OF_getprop(dev, "name", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpus") == 0) + break; + dev = OF_peer(dev); + } + cpu = OF_child(dev); + while (cpu != 0) { + res = OF_getprop(cpu, "device_type", buf, + sizeof(buf)); + if (res > 0 && strcmp(buf, "cpu") == 0) + break; + cpu = OF_peer(cpu); + } + if (cpu == 0) + return (ENOENT); + if (OF_getprop(cpu, "clock-frequency", &freq[0], + sizeof(freq[0]))) + *cps = freq[0]; + else if (OF_getprop(cpu, "ibm,extended-clock-frequency", + &freq, sizeof(freq))) + *cps = freq[1]; + else + *cps = 0; + + return(0); } return (ENXIO); From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 23:42:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D137E0C for ; Thu, 28 Nov 2013 23:42:41 +0000 (UTC) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [IPv6:2607:f8b0:400c:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 517911BB4 for ; Thu, 28 Nov 2013 23:42:41 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id jy13so6677514veb.27 for ; Thu, 28 Nov 2013 15:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GQfU73PJjez2sNzgXUMYIuCqQHvsVWQ+7rJCVoNeepE=; b=i4AeaXXFCU11gsufIbV0mLMVUN4h5wtP3IhyOXY8topSj7wZv0FcDYH9rBQZODWR7i YNrlgzDCoSmQ2UjXpYmESODauyy0U/Z3EUpQpgqIfkDaGe+EE6QOguExlmiqxeDJLTzD vI9+N0BM4M6we91/XBiX85v9tPzSoU92avslI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=GQfU73PJjez2sNzgXUMYIuCqQHvsVWQ+7rJCVoNeepE=; b=JNl8kxLmrDL3KApdH6aJ1a2zlja3lEBtmuxiHamu/sf2lWJ4BWMOZnECmbDVEKZxzL HLSW0DD2qWFLVeGs0yLDa8sB/VCelGb8k7WGP/Tei65bhlh8sFZWsxrspFateZkdHuKo wcfzn5JE4Hl7P52iUh0jF2SLrO7ubrn7VG5FBMSnkS5eILh3QFAz5eVU5ZftxYZUVdd+ 6AsWeZGfl5zsdXNW0uvhgY5Xf8k+iez/aiO66kvIW1F/yKJWTkwwgp+WXSit6AJg10BQ lWGhy/1w6z8ieuHZsIeJxAdyoKZL3NRTcXTyBRLzsQ9LpXEe7+amLEsSqZrRMLN+sjva b7ag== X-Gm-Message-State: ALoCoQkXv5w7/j+M6bwRvmHuzVakGNOTnw8eOvRJt2DjVgBSqR0E48NxbBSMlKCVPOHO6zfRAfxe MIME-Version: 1.0 X-Received: by 10.220.86.69 with SMTP id r5mr40475301vcl.9.1385682159765; Thu, 28 Nov 2013 15:42:39 -0800 (PST) Received: by 10.220.167.74 with HTTP; Thu, 28 Nov 2013 15:42:39 -0800 (PST) In-Reply-To: <201311281913.rASJD6vC066492@svn.freebsd.org> References: <201311281913.rASJD6vC066492@svn.freebsd.org> Date: Thu, 28 Nov 2013 15:42:39 -0800 Message-ID: Subject: Re: svn commit: r258714 - head From: Peter Wemm To: Craig Rodrigues Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 23:42:41 -0000 On Thu, Nov 28, 2013 at 11:13 AM, Craig Rodrigues wrote: > Author: rodrigc > Date: Thu Nov 28 19:13:05 2013 > New Revision: 258714 > URL: http://svnweb.freebsd.org/changeset/base/258714 > > Log: > Add some text to clarify that nslookup and dig are no longer in the base system > after the removal of BIND. .. > - available in the ports tree. > + available in the ports tree. The dns/bind99 port is one example. > + > + With this change, nslookup(1) and dig(1) are no longer in the base > + system. Users should instead use host(1) which is still > + in the base system. Alternatively, nslookup and dig can > + be obtained by installing the dns/bind-tools port. It might also be worth pointing to drill(1). It can be used as a partial alternative for dig in some common use cases. It does different things but it does understand some common dig syntax. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: for when a ' just won\342\200\231t do. ZFS must be the bacon of file systems. "everything's better with ZFS" From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 00:40:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5308E7F3; Fri, 29 Nov 2013 00:40:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 270841E0E; Fri, 29 Nov 2013 00:40:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT0eXP6088170; Fri, 29 Nov 2013 00:40:33 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT0eXxs088169; Fri, 29 Nov 2013 00:40:33 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201311290040.rAT0eXxs088169@svn.freebsd.org> From: Rui Paulo Date: Fri, 29 Nov 2013 00:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258726 - head/sys/powerpc/wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 00:40:33 -0000 Author: rpaulo Date: Fri Nov 29 00:40:32 2013 New Revision: 258726 URL: http://svnweb.freebsd.org/changeset/base/258726 Log: Add an interface for the Wii IOS kernels. Multiple IOS interfaces can exist at the same time. Added: head/sys/powerpc/wii/ios_if.m (contents, props changed) Added: head/sys/powerpc/wii/ios_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/wii/ios_if.m Fri Nov 29 00:40:32 2013 (r258726) @@ -0,0 +1,64 @@ +#- +# Copyright (c) 2013 Rui Paulo +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include +#include + +INTERFACE ios; + +METHOD int open { + device_t dev; + const char *path; + int mode; +}; + +METHOD int close { + device_t dev; + int fd; +}; + +METHOD int ioctl { + device_t dev; + int fd; + unsigned int request; + void *ibuf; + size_t ilen; + void *obuf; + size_t olen; +}; + +METHOD int ioctlv { + device_t dev; + int fd; + unsigned int request; + struct iovec *in; + size_t ilen; + struct iovec *out; + size_t olen; +}; + From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 04:08:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B90319B2; Fri, 29 Nov 2013 04:08:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A533D1AF5; Fri, 29 Nov 2013 04:08:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT48Le5058766; Fri, 29 Nov 2013 04:08:21 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT48L3w058765; Fri, 29 Nov 2013 04:08:21 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311290408.rAT48L3w058765@svn.freebsd.org> From: Devin Teske Date: Fri, 29 Nov 2013 04:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258727 - head/usr.sbin/bsdconfig/includes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 04:08:21 -0000 Author: dteske Date: Fri Nov 29 04:08:21 2013 New Revision: 258727 URL: http://svnweb.freebsd.org/changeset/base/258727 Log: Fix an issue where the leading `+' sign before a function name was not displayed unless color was requested. Modified: head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Fri Nov 29 00:40:32 2013 (r258726) +++ head/usr.sbin/bsdconfig/includes/includes Fri Nov 29 04:08:21 2013 (r258727) @@ -78,7 +78,7 @@ show_include() substr($0, 2 + RSTART, RLENGTH), substr($0, 2 + RSTART + RLENGTH) else - print substr($0, 2) + print "+" substr($0, 2) if (show_desc) print_more = 1 else From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 04:09:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05CE7B15; Fri, 29 Nov 2013 04:09:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E62B61AFE; Fri, 29 Nov 2013 04:09:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT49P5R058961; Fri, 29 Nov 2013 04:09:25 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT49Pnk058960; Fri, 29 Nov 2013 04:09:25 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311290409.rAT49Pnk058960@svn.freebsd.org> From: Devin Teske Date: Fri, 29 Nov 2013 04:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258728 - head/usr.sbin/bsdconfig/includes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 04:09:26 -0000 Author: dteske Date: Fri Nov 29 04:09:25 2013 New Revision: 258728 URL: http://svnweb.freebsd.org/changeset/base/258728 Log: Fix an issue where additional lines of a function definition didn't line up with the primary (leading) line of syntax. Modified: head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Fri Nov 29 04:08:21 2013 (r258727) +++ head/usr.sbin/bsdconfig/includes/includes Fri Nov 29 04:09:25 2013 (r258728) @@ -87,13 +87,13 @@ show_include() if (show_desc && print_more) { getline while ($0 ~ /^#/) { - print substr($0, 2) + print " " substr($0, 2) getline } print_more = 0 } else while (print_more) { getline - print substr($0, 2) + print " " substr($0, 2) print_more = substr($0, length($0)) == "\\" } }' "$file" ) From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 05:00:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E7223AF; Fri, 29 Nov 2013 05:00:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 171E51D36; Fri, 29 Nov 2013 05:00:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT508xa075835; Fri, 29 Nov 2013 05:00:08 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT507MZ075828; Fri, 29 Nov 2013 05:00:07 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311290500.rAT507MZ075828@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 29 Nov 2013 05:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258731 - in head/contrib/gcc: . cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 05:00:09 -0000 Author: pfg Date: Fri Nov 29 05:00:07 2013 New Revision: 258731 URL: http://svnweb.freebsd.org/changeset/base/258731 Log: gcc: Make use of TREE_OVERFLOW_P. While it was brought in r258179 only to fix a build issue, bringing the rest of the change has the advantage of fixing GCC/19978. Obtained from: gcc 4.3 (rev. 120505; GPLv2) MFC after: 1 week Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/c-common.c head/contrib/gcc/c-typeck.c head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/semantics.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Fri Nov 29 04:29:01 2013 (r258730) +++ head/contrib/gcc/ChangeLog.gcc43 Fri Nov 29 05:00:07 2013 (r258731) @@ -340,6 +340,16 @@ * config.gcc: Support core2 processor. +2007-01-05 Manuel Lopez-Ibanez + + PR c/19978 + * tree.h (TREE_OVERFLOW_P): New. + * c-typeck.c (parser_build_unary_op): Warn only if result + overflowed and operands did not. + (parser_build_binary_op): Likewise. + (convert_for_assignment): Remove redundant overflow_warning. + * c-common.c (overflow_warning): Don't check or set TREE_OVERFLOW. + 2006-12-13 Ian Lance Taylor (r119855) PR c++/19564 Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Fri Nov 29 04:29:01 2013 (r258730) +++ head/contrib/gcc/c-common.c Fri Nov 29 05:00:07 2013 (r258731) @@ -916,39 +916,45 @@ constant_expression_warning (tree value) pedwarn ("overflow in constant expression"); } -/* Print a warning if an expression had overflow in folding. +/* Print a warning if an expression had overflow in folding and its + operands hadn't. + Invoke this function on every expression that (1) appears in the source code, and - (2) might be a constant expression that overflowed, and + (2) is a constant expression that overflowed, and (3) is not already checked by convert_and_check; - however, do not invoke this function on operands of explicit casts. */ + however, do not invoke this function on operands of explicit casts + or when the expression is the result of an operator and any operand + already overflowed. */ void overflow_warning (tree value) { - if ((TREE_CODE (value) == INTEGER_CST - || (TREE_CODE (value) == COMPLEX_CST - && TREE_CODE (TREE_REALPART (value)) == INTEGER_CST)) - && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "integer overflow in expression"); - } - else if ((TREE_CODE (value) == REAL_CST - || (TREE_CODE (value) == COMPLEX_CST - && TREE_CODE (TREE_REALPART (value)) == REAL_CST)) - && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "floating point overflow in expression"); - } - else if (TREE_CODE (value) == VECTOR_CST && TREE_OVERFLOW (value)) - { - TREE_OVERFLOW (value) = 0; - if (skip_evaluation == 0) - warning (OPT_Woverflow, "vector overflow in expression"); + if (skip_evaluation) return; + + switch (TREE_CODE (value)) + { + case INTEGER_CST: + warning (OPT_Woverflow, "integer overflow in expression"); + break; + + case REAL_CST: + warning (OPT_Woverflow, "floating point overflow in expression"); + break; + + case VECTOR_CST: + warning (OPT_Woverflow, "vector overflow in expression"); + break; + + case COMPLEX_CST: + if (TREE_CODE (TREE_REALPART (value)) == INTEGER_CST) + warning (OPT_Woverflow, "complex integer overflow in expression"); + else if (TREE_CODE (TREE_REALPART (value)) == REAL_CST) + warning (OPT_Woverflow, "complex floating point overflow in expression"); + break; + + default: + break; } } Modified: head/contrib/gcc/c-typeck.c ============================================================================== --- head/contrib/gcc/c-typeck.c Fri Nov 29 04:29:01 2013 (r258730) +++ head/contrib/gcc/c-typeck.c Fri Nov 29 05:00:07 2013 (r258731) @@ -2616,7 +2616,10 @@ parser_build_unary_op (enum tree_code co result.original_code = ERROR_MARK; result.value = build_unary_op (code, arg.value, 0); - overflow_warning (result.value); + + if (TREE_OVERFLOW_P (result.value) && !TREE_OVERFLOW_P (arg.value)) + overflow_warning (result.value); + return result; } @@ -2660,7 +2663,10 @@ parser_build_binary_op (enum tree_code c warning (OPT_Waddress, "comparison with string literal results in unspecified behaviour"); - overflow_warning (result.value); + if (TREE_OVERFLOW_P (result.value) + && !TREE_OVERFLOW_P (arg1.value) + && !TREE_OVERFLOW_P (arg2.value)) + overflow_warning (result.value); return result; } @@ -3847,10 +3853,7 @@ convert_for_assignment (tree type, tree } if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype)) - { - overflow_warning (rhs); - return rhs; - } + return rhs; if (coder == VOID_TYPE) { Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Fri Nov 29 04:29:01 2013 (r258730) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Fri Nov 29 05:00:07 2013 (r258731) @@ -20,6 +20,12 @@ TREE_OVERFLOW_P is true for the result and not for any of the operands. +2007-01-05 Manuel Lopez-Ibanez + + PR c/19978 + * semantics.c (finish_unary_op_expr): Warn only if result + overflowed and operands did not. + 2006-10-31 Geoffrey Keating (r118360) * name-lookup.c (get_anonymous_namespace_name): New. Modified: head/contrib/gcc/cp/semantics.c ============================================================================== --- head/contrib/gcc/cp/semantics.c Fri Nov 29 04:29:01 2013 (r258730) +++ head/contrib/gcc/cp/semantics.c Fri Nov 29 05:00:07 2013 (r258731) @@ -2012,7 +2012,9 @@ finish_unary_op_expr (enum tree_code cod result = copy_node (result); TREE_NEGATED_INT (result) = 1; } - overflow_warning (result); + if (TREE_OVERFLOW_P (result) && !TREE_OVERFLOW_P (expr)) + overflow_warning (result); + return result; } From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 06:10:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC2EBAC0; Fri, 29 Nov 2013 06:10:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C3361FDB; Fri, 29 Nov 2013 06:10:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT6AiwJ001398; Fri, 29 Nov 2013 06:10:44 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT6Aiux001397; Fri, 29 Nov 2013 06:10:44 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201311290610.rAT6Aiux001397@svn.freebsd.org> From: Kevin Lo Date: Fri, 29 Nov 2013 06:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258732 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 06:10:44 -0000 Author: kevlo Date: Fri Nov 29 06:10:44 2013 New Revision: 258732 URL: http://svnweb.freebsd.org/changeset/base/258732 Log: On the RT2870, rf registers are now 64-bit, not 32-bit after r257955. Committed over a Buffalo WLI-UC-AG300N (RT2870). Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Nov 29 05:00:07 2013 (r258731) +++ head/sys/dev/usb/wlan/if_run.c Fri Nov 29 06:10:44 2013 (r258732) @@ -1293,10 +1293,7 @@ run_rt2870_rf_write(struct run_softc *sc if (ntries == 10) return (ETIMEDOUT); - /* RF registers are 24-bit on the RT2860 */ - tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | - (val & 0x3fffff) << 2 | (reg & 3); - return (run_write(sc, RT2860_RF_CSR_CFG0, tmp)); + return (run_write(sc, RT2860_RF_CSR_CFG0, val)); } static int @@ -3649,45 +3646,61 @@ run_rt2870_set_chan(struct run_softc *sc r2 = rfprog[i].r2; if (sc->ntxchains == 1) - r2 |= 1 << 12; /* 1T: disable Tx chain 2 */ + r2 |= 1 << 14; /* 1T: disable Tx chain 2 */ if (sc->nrxchains == 1) - r2 |= 1 << 15 | 1 << 4; /* 1R: disable Rx chains 2 & 3 */ + r2 |= 1 << 17 | 1 << 6; /* 1R: disable Rx chains 2 & 3 */ else if (sc->nrxchains == 2) - r2 |= 1 << 4; /* 2R: disable Rx chain 3 */ + r2 |= 1 << 6; /* 2R: disable Rx chain 3 */ /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; txpow2 = sc->txpow2[i]; + + /* Initialize RF R3 and R4. */ + r3 = rfprog[i].r3 & 0xffffc1ff; + r4 = (rfprog[i].r4 & ~(0x001f87c0)) | (sc->freq << 15); if (chan > 14) { - if (txpow1 >= 0) - txpow1 = txpow1 << 1 | 1; - else - txpow1 = (7 + txpow1) << 1; - if (txpow2 >= 0) - txpow2 = txpow2 << 1 | 1; - else - txpow2 = (7 + txpow2) << 1; + if (txpow1 >= 0) { + txpow1 = (txpow1 > 0xf) ? (0xf) : (txpow1); + r3 |= (txpow1 << 10) | (1 << 9); + } else { + txpow1 += 7; + + /* txpow1 is not possible larger than 15. */ + r3 |= (txpow1 << 10); + } + if (txpow2 >= 0) { + txpow2 = (txpow2 > 0xf) ? (0xf) : (txpow2); + r4 |= (txpow1 << 7) | (1 << 6); + } else { + txpow2 += 7; + r4 |= (txpow2 << 7); + } + } else { + /* Set Tx0 power. */ + r3 |= (txpow1 << 9); + + /* Set frequency offset and Tx1 power. */ + r4 |= (txpow2 << 6); } - r3 = rfprog[i].r3 | txpow1 << 7; - r4 = rfprog[i].r4 | sc->freq << 13 | txpow2 << 4; run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3); + run_rt2870_rf_write(sc, RT2860_RF3, r3 & ~(1 << 2)); run_rt2870_rf_write(sc, RT2860_RF4, r4); run_delay(sc, 10); run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3 | 1); + run_rt2870_rf_write(sc, RT2860_RF3, r3 | (1 << 2)); run_rt2870_rf_write(sc, RT2860_RF4, r4); run_delay(sc, 10); run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3); + run_rt2870_rf_write(sc, RT2860_RF3, r3 & ~(1 << 2)); run_rt2870_rf_write(sc, RT2860_RF4, r4); } From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 07:08:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 865194B3; Fri, 29 Nov 2013 07:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6733C1230; Fri, 29 Nov 2013 07:08:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT78IXo019514; Fri, 29 Nov 2013 07:08:18 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT78Hhq019511; Fri, 29 Nov 2013 07:08:17 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201311290708.rAT78Hhq019511@svn.freebsd.org> From: Kevin Lo Date: Fri, 29 Nov 2013 07:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258733 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 07:08:18 -0000 Author: kevlo Date: Fri Nov 29 07:08:17 2013 New Revision: 258733 URL: http://svnweb.freebsd.org/changeset/base/258733 Log: Change run_rt2870_rf_write() prototype (no functional change) Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runreg.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Nov 29 06:10:44 2013 (r258732) +++ head/sys/dev/usb/wlan/if_run.c Fri Nov 29 07:08:17 2013 (r258733) @@ -344,7 +344,7 @@ static int run_write_region_1(struct run static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, int); static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t *); -static int run_rt2870_rf_write(struct run_softc *, uint8_t, uint32_t); +static int run_rt2870_rf_write(struct run_softc *, uint32_t); static int run_rt3070_rf_read(struct run_softc *, uint8_t, uint8_t *); static int run_rt3070_rf_write(struct run_softc *, uint8_t, uint8_t); static int run_bbp_read(struct run_softc *, uint8_t, uint8_t *); @@ -1279,7 +1279,7 @@ run_srom_read(struct run_softc *sc, uint } static int -run_rt2870_rf_write(struct run_softc *sc, uint8_t reg, uint32_t val) +run_rt2870_rf_write(struct run_softc *sc, uint32_t val) { uint32_t tmp; int error, ntries; @@ -3684,24 +3684,24 @@ run_rt2870_set_chan(struct run_softc *sc r4 |= (txpow2 << 6); } - run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); - run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3 & ~(1 << 2)); - run_rt2870_rf_write(sc, RT2860_RF4, r4); + run_rt2870_rf_write(sc, rfprog[i].r1); + run_rt2870_rf_write(sc, r2); + run_rt2870_rf_write(sc, r3 & ~(1 << 2)); + run_rt2870_rf_write(sc, r4); run_delay(sc, 10); - run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); - run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3 | (1 << 2)); - run_rt2870_rf_write(sc, RT2860_RF4, r4); + run_rt2870_rf_write(sc, rfprog[i].r1); + run_rt2870_rf_write(sc, r2); + run_rt2870_rf_write(sc, r3 | (1 << 2)); + run_rt2870_rf_write(sc, r4); run_delay(sc, 10); - run_rt2870_rf_write(sc, RT2860_RF1, rfprog[i].r1); - run_rt2870_rf_write(sc, RT2860_RF2, r2); - run_rt2870_rf_write(sc, RT2860_RF3, r3 & ~(1 << 2)); - run_rt2870_rf_write(sc, RT2860_RF4, r4); + run_rt2870_rf_write(sc, rfprog[i].r1); + run_rt2870_rf_write(sc, r2); + run_rt2870_rf_write(sc, r3 & ~(1 << 2)); + run_rt2870_rf_write(sc, r4); } static void Modified: head/sys/dev/usb/wlan/if_runreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_runreg.h Fri Nov 29 06:10:44 2013 (r258732) +++ head/sys/dev/usb/wlan/if_runreg.h Fri Nov 29 07:08:17 2013 (r258733) @@ -844,11 +844,6 @@ struct rt2860_rxwi { sizeof (struct ieee80211_htframe) + \ sizeof (uint16_t)) -#define RT2860_RF1 0 -#define RT2860_RF2 2 -#define RT2860_RF3 1 -#define RT2860_RF4 3 - #define RT2860_RF_2820 0x0001 /* 2T3R */ #define RT2860_RF_2850 0x0002 /* dual-band 2T3R */ #define RT2860_RF_2720 0x0003 /* 1T2R */ From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 07:29:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51394CFF; Fri, 29 Nov 2013 07:29:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF82131D; Fri, 29 Nov 2013 07:29:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT7T0hG026788; Fri, 29 Nov 2013 07:29:00 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT7SxXQ026780; Fri, 29 Nov 2013 07:28:59 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201311290728.rAT7SxXQ026780@svn.freebsd.org> From: Rui Paulo Date: Fri, 29 Nov 2013 07:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258735 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 07:29:00 -0000 Author: rpaulo Date: Fri Nov 29 07:28:59 2013 New Revision: 258735 URL: http://svnweb.freebsd.org/changeset/base/258735 Log: Move KDTRACE_FRAME to "options" since it's used by kern.pre.mk. Modified: head/sys/conf/options head/sys/conf/options.amd64 Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Nov 29 07:12:10 2013 (r258734) +++ head/sys/conf/options Fri Nov 29 07:28:59 2013 (r258735) @@ -127,6 +127,7 @@ GEOM_VIRSTOR opt_geom.h GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h KDTRACE_HOOKS opt_global.h +KDTRACE_FRAME opt_kdtrace.h KSTACK_MAX_PAGES KSTACK_PAGES KTRACE Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Fri Nov 29 07:12:10 2013 (r258734) +++ head/sys/conf/options.amd64 Fri Nov 29 07:28:59 2013 (r258735) @@ -58,9 +58,6 @@ PSM_RESETAFTERSUSPEND opt_psm.h PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h -# Debugging -KDTRACE_FRAME opt_kdtrace.h - # BPF just-in-time compiler BPF_JITTER opt_bpf.h From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 07:55:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8A64DB; Fri, 29 Nov 2013 07:55:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6BA3214BD; Fri, 29 Nov 2013 07:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT7tjHb036642; Fri, 29 Nov 2013 07:55:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT7tjaf036641; Fri, 29 Nov 2013 07:55:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201311290755.rAT7tjaf036641@svn.freebsd.org> From: Rui Paulo Date: Fri, 29 Nov 2013 07:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258736 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 07:55:45 -0000 Author: rpaulo Date: Fri Nov 29 07:55:44 2013 New Revision: 258736 URL: http://svnweb.freebsd.org/changeset/base/258736 Log: Fix typo in comment. Modified: head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Fri Nov 29 07:28:59 2013 (r258735) +++ head/sys/net80211/ieee80211_scan_sta.c Fri Nov 29 07:55:44 2013 (r258736) @@ -733,7 +733,7 @@ sta_cancel(struct ieee80211_scan_state * return 0; } -/* unalligned little endian access */ +/* unaligned little endian access */ #define LE_READ_2(p) \ ((uint16_t) \ ((((const uint8_t *)(p))[0] ) | \ From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 08:04:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBAD670D; Fri, 29 Nov 2013 08:04:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C88D91554; Fri, 29 Nov 2013 08:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT84jAL040066; Fri, 29 Nov 2013 08:04:45 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT84jKl040065; Fri, 29 Nov 2013 08:04:45 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311290804.rAT84jKl040065@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 29 Nov 2013 08:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258737 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 08:04:45 -0000 Author: rodrigc Date: Fri Nov 29 08:04:45 2013 New Revision: 258737 URL: http://svnweb.freebsd.org/changeset/base/258737 Log: In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty" message printed to the console. This makes it easier to track down the source of certain memory leaks. Suggested by: adrian Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Nov 29 07:55:44 2013 (r258736) +++ head/sys/vm/uma_core.c Fri Nov 29 08:04:45 2013 (r258737) @@ -1689,8 +1689,9 @@ keg_dtor(void *arg, int size, void *udat keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 08:22:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 651EBE09; Fri, 29 Nov 2013 08:22:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 524FE1656; Fri, 29 Nov 2013 08:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT8MnCq046922; Fri, 29 Nov 2013 08:22:49 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT8Mn1R046921; Fri, 29 Nov 2013 08:22:49 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311290822.rAT8Mn1R046921@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 29 Nov 2013 08:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258738 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 08:22:49 -0000 Author: rodrigc Date: Fri Nov 29 08:22:48 2013 New Revision: 258738 URL: http://svnweb.freebsd.org/changeset/base/258738 Log: Also mention that drill(1) can be used, now that nslookup and dig are no longer in the base system. Suggested by: peter Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Nov 29 08:04:45 2013 (r258737) +++ head/UPDATING Fri Nov 29 08:22:48 2013 (r258738) @@ -79,7 +79,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 available in the ports tree. The dns/bind99 port is one example. With this change, nslookup(1) and dig(1) are no longer in the base - system. Users should instead use host(1) which is still + system. Users should instead use host(1) and drill(1) which are in the base system. Alternatively, nslookup and dig can be obtained by installing the dns/bind-tools port. From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 12:19:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF70A6D5; Fri, 29 Nov 2013 12:19:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C85D12AA; Fri, 29 Nov 2013 12:19:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATCJqiZ026574; Fri, 29 Nov 2013 12:19:52 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATCJqF0026573; Fri, 29 Nov 2013 12:19:52 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311291219.rATCJqF0026573@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Nov 2013 12:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258739 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 12:19:52 -0000 Author: avg Date: Fri Nov 29 12:19:52 2013 New Revision: 258739 URL: http://svnweb.freebsd.org/changeset/base/258739 Log: zfs mappedread_sf: assert that a page is never partially valid ZFS never partially validates or invalidates a page. The higher level VM should not do that either. mappedread_sf correct operation depends on a page being either fully valid or invalid. MFC after: 7 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 08:22:48 2013 (r258738) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 12:19:52 2013 (r258739) @@ -587,8 +587,10 @@ mappedread_sf(vnode_t *vp, int nbytes, u vm_page_activate(pp); } vm_page_unlock(pp); - } else + } else { + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_page_sunbusy(pp); + } if (error) break; uio->uio_resid -= bytes; From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 14:23:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D0E3638; Fri, 29 Nov 2013 14:23:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4945E197E; Fri, 29 Nov 2013 14:23:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATENNvJ069901; Fri, 29 Nov 2013 14:23:23 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATENNvg069900; Fri, 29 Nov 2013 14:23:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311291423.rATENNvg069900@svn.freebsd.org> From: Ian Lepore Date: Fri, 29 Nov 2013 14:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258740 - head/sys/dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 14:23:23 -0000 Author: ian Date: Fri Nov 29 14:23:22 2013 New Revision: 258740 URL: http://svnweb.freebsd.org/changeset/base/258740 Log: Look up a nand chip by id in the static table before trying to obtain ONFI parameters. This allows a static table entry to provide valid data for chips known to provide invalid ONFI data. Modified: head/sys/dev/nand/nandbus.c Modified: head/sys/dev/nand/nandbus.c ============================================================================== --- head/sys/dev/nand/nandbus.c Fri Nov 29 12:19:52 2013 (r258739) +++ head/sys/dev/nand/nandbus.c Fri Nov 29 14:23:22 2013 (r258740) @@ -195,8 +195,27 @@ nandbus_attach(device_t dev) if (chip_id.man_id == 0xff) continue; - /* Check if chip is ONFI compliant */ - if (nand_probe_onfi(dev, &onfi) != 0) { + /* + * First try to get info from the table. If that fails, see if + * the chip can provide ONFI info. We check the table first to + * allow table entries to override info from chips that are + * known to provide bad ONFI data. + */ + onfi = 0; + chip_params = nand_get_params(&chip_id); + if (chip_params == NULL) { + nand_probe_onfi(dev, &onfi); + } + + /* + * At this point it appears there is a chip at this chipselect, + * so if we can't work with it, whine about it. + */ + if (chip_params == NULL && onfi == 0) { + if (bootverbose || (nand_debug_flag & NDBG_BUS)) + printf("Chip params not found, chipsel: %d " + "(manuf: 0x%0x, chipid: 0x%0x, onfi: %d)\n", + cs, chip_id.man_id, chip_id.dev_id, onfi); continue; } @@ -218,15 +237,6 @@ nandbus_attach(device_t dev) continue; } - chip_params = nand_get_params(&chip_id); - if (chip_params == NULL) { - nand_debug(NDBG_BUS,"Chip description not found! " - "(manuf: 0x%0x, chipid: 0x%0x)\n", - chip_id.man_id, chip_id.dev_id); - free(ivar, M_NAND); - continue; - } - ivar->cs = cs; ivar->cols = 1; ivar->rows = 2; From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:05:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B6FE270; Fri, 29 Nov 2013 15:05:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 263141BBE; Fri, 29 Nov 2013 15:05:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATF5o6f083930; Fri, 29 Nov 2013 15:05:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATF5oVM083929; Fri, 29 Nov 2013 15:05:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311291505.rATF5oVM083929@svn.freebsd.org> From: Ed Maste Date: Fri, 29 Nov 2013 15:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258741 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:05:50 -0000 Author: emaste Date: Fri Nov 29 15:05:49 2013 New Revision: 258741 URL: http://svnweb.freebsd.org/changeset/base/258741 Log: Note that libstand is 32-bit on amd64 and powerpc64 Sponsored by: The FreeBSD Foundation Modified: head/lib/libstand/libstand.3 Modified: head/lib/libstand/libstand.3 ============================================================================== --- head/lib/libstand/libstand.3 Fri Nov 29 14:23:22 2013 (r258740) +++ head/lib/libstand/libstand.3 Fri Nov 29 15:05:49 2013 (r258741) @@ -674,3 +674,7 @@ the environment functions and this manpa .An Mike Smith Aq msmith@FreeBSD.org . .Sh BUGS The lack of detailed memory usage data is unhelpful. +.Pp +On the amd64 and powerpc64 architectures +.Nm +is a 32-bit library. From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:06:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AE813B2; Fri, 29 Nov 2013 15:06:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 179891BC8; Fri, 29 Nov 2013 15:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATF6Bc2084044; Fri, 29 Nov 2013 15:06:11 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATF6Bbw084043; Fri, 29 Nov 2013 15:06:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311291506.rATF6Bbw084043@svn.freebsd.org> From: Ian Lepore Date: Fri, 29 Nov 2013 15:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258742 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:06:12 -0000 Author: ian Date: Fri Nov 29 15:06:11 2013 New Revision: 258742 URL: http://svnweb.freebsd.org/changeset/base/258742 Log: Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write. Reviewed by: zbb@ Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Nov 29 15:05:49 2013 (r258741) +++ head/sys/arm/arm/pmap-v6.c Fri Nov 29 15:06:11 2013 (r258742) @@ -3092,6 +3092,7 @@ validate: if (prot & VM_PROT_WRITE) { if ((m->oflags & VPO_UNMANAGED) == 0) { + vm_page_aflag_set(m, PGA_WRITEABLE); /* * Enable write permission if the access type * indicates write intention. Emulate modified @@ -3099,7 +3100,6 @@ validate: */ if ((access & VM_PROT_WRITE) != 0) { npte &= ~(L2_APX); - vm_page_aflag_set(m, PGA_WRITEABLE); /* * The access type and permissions * indicate that the page will be From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:32:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B284ABCC; Fri, 29 Nov 2013 15:32:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD511D52; Fri, 29 Nov 2013 15:32:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATFWrUt094163; Fri, 29 Nov 2013 15:32:53 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATFWrmK094162; Fri, 29 Nov 2013 15:32:53 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311291532.rATFWrmK094162@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Nov 2013 15:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258743 - head/sys/cddl/contrib/opensolaris/uts/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:32:53 -0000 Author: avg Date: Fri Nov 29 15:32:53 2013 New Revision: 258743 URL: http://svnweb.freebsd.org/changeset/base/258743 Log: drop ZUT_OBJ, zfs unit testing driver never materialzied in freebsd MFC after: 5 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Modified: head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Fri Nov 29 15:06:11 2013 (r258742) +++ head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Fri Nov 29 15:32:53 2013 (r258743) @@ -129,6 +129,3 @@ ZFS_OBJS += \ zfs_vfsops.o \ zfs_vnops.o \ zvol.o - -ZUT_OBJS += \ - zut.o From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:33:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67E42D13; Fri, 29 Nov 2013 15:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 397B51D5E; Fri, 29 Nov 2013 15:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATFXfUQ094352; Fri, 29 Nov 2013 15:33:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATFXebw094350; Fri, 29 Nov 2013 15:33:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311291533.rATFXebw094350@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Nov 2013 15:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258744 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:33:41 -0000 Author: avg Date: Fri Nov 29 15:33:40 2013 New Revision: 258744 URL: http://svnweb.freebsd.org/changeset/base/258744 Log: zfs: make zfs_map_page / zfs_unmap_page public MFC after: 15 days Modified: head/sys/cddl/compat/opensolaris/sys/vm.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/compat/opensolaris/sys/vm.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vm.h Fri Nov 29 15:32:53 2013 (r258743) +++ head/sys/cddl/compat/opensolaris/sys/vm.h Fri Nov 29 15:33:40 2013 (r258744) @@ -31,6 +31,8 @@ #ifdef _KERNEL +#include + extern const int zfs_vm_pagerret_bad; extern const int zfs_vm_pagerret_error; extern const int zfs_vm_pagerret_ok; @@ -39,6 +41,19 @@ void zfs_vmobject_assert_wlocked(vm_obje void zfs_vmobject_wlock(vm_object_t object); void zfs_vmobject_wunlock(vm_object_t object); +static inline caddr_t +zfs_map_page(vm_page_t pp, struct sf_buf **sfp) +{ + *sfp = sf_buf_alloc(pp, 0); + return ((caddr_t)sf_buf_kva(*sfp)); +} + +static inline void +zfs_unmap_page(struct sf_buf *sf) +{ + sf_buf_free(sf); +} + #endif /* _KERNEL */ #endif /* _OPENSOLARIS_SYS_VM_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 15:32:53 2013 (r258743) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 15:33:40 2013 (r258744) @@ -71,7 +71,6 @@ #include #include #include -#include #include #include #include @@ -452,21 +451,6 @@ page_unhold(vm_page_t pp) vm_page_unlock(pp); } -static caddr_t -zfs_map_page(vm_page_t pp, struct sf_buf **sfp) -{ - - *sfp = sf_buf_alloc(pp, 0); - return ((caddr_t)sf_buf_kva(*sfp)); -} - -static void -zfs_unmap_page(struct sf_buf *sf) -{ - - sf_buf_free(sf); -} - /* * When a file is memory mapped, we must keep the IO data synchronized * between the DMU cache and the memory mapped pages. What this means: From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:34:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36F42E6B; Fri, 29 Nov 2013 15:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 222D41D6E; Fri, 29 Nov 2013 15:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATFYimg094517; Fri, 29 Nov 2013 15:34:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATFYhg3094515; Fri, 29 Nov 2013 15:34:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311291534.rATFYhg3094515@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Nov 2013 15:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258745 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:34:44 -0000 Author: avg Date: Fri Nov 29 15:34:43 2013 New Revision: 258745 URL: http://svnweb.freebsd.org/changeset/base/258745 Log: zfs: add dmu_write_pages variant for freebsd The freebsd variant of dmu_write_pages is hidden under _KERNEL to avoid needlessly pulling in vm_page_t declaration. Besides, this function seems to be useless for ZFS userland counterpart. MFC after: 15 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Nov 29 15:33:40 2013 (r258744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Nov 29 15:34:43 2013 (r258745) @@ -45,6 +45,7 @@ #include #include #ifdef _KERNEL +#include #include #endif @@ -1184,6 +1185,64 @@ dmu_write_pages(objset_t *os, uint64_t o dmu_buf_rele_array(dbp, numbufs, FTAG); return (err); } + +#else + +int +dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, + vm_page_t *ma, dmu_tx_t *tx) +{ + dmu_buf_t **dbp; + struct sf_buf *sf; + int numbufs, i; + int err; + + if (size == 0) + return (0); + + err = dmu_buf_hold_array(os, object, offset, size, + FALSE, FTAG, &numbufs, &dbp); + if (err) + return (err); + + for (i = 0; i < numbufs; i++) { + int tocpy, copied, thiscpy; + int bufoff; + dmu_buf_t *db = dbp[i]; + caddr_t va; + + ASSERT(size > 0); + ASSERT3U(db->db_size, >=, PAGESIZE); + + bufoff = offset - db->db_offset; + tocpy = (int)MIN(db->db_size - bufoff, size); + + ASSERT(i == 0 || i == numbufs-1 || tocpy == db->db_size); + + if (tocpy == db->db_size) + dmu_buf_will_fill(db, tx); + else + dmu_buf_will_dirty(db, tx); + + for (copied = 0; copied < tocpy; copied += PAGESIZE) { + ASSERT3U(ptoa((*ma)->pindex), ==, db->db_offset + bufoff); + thiscpy = MIN(PAGESIZE, tocpy - copied); + va = zfs_map_page(*ma, &sf); + bcopy(va, (char *)db->db_data + bufoff, thiscpy); + zfs_unmap_page(sf); + ma += 1; + bufoff += PAGESIZE; + } + + if (tocpy == db->db_size) + dmu_buf_fill_done(db, tx); + + offset += tocpy; + size -= tocpy; + } + dmu_buf_rele_array(dbp, numbufs, FTAG); + return (err); +} #endif /* sun */ #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Fri Nov 29 15:33:40 2013 (r258744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Fri Nov 29 15:34:43 2013 (r258745) @@ -606,8 +606,15 @@ int dmu_write_uio(objset_t *os, uint64_t dmu_tx_t *tx); int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, dmu_tx_t *tx); +#ifdef _KERNEL +#ifdef sun int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, struct page *pp, dmu_tx_t *tx); +#else +int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, + uint64_t size, struct vm_page **ppa, dmu_tx_t *tx); +#endif +#endif struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size); void dmu_return_arcbuf(struct arc_buf *buf); void dmu_assign_arcbuf(dmu_buf_t *handle, uint64_t offset, struct arc_buf *buf, From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 15:39:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 829C5FDF; Fri, 29 Nov 2013 15:39:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 636D61D8D; Fri, 29 Nov 2013 15:39:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATFdenv095137; Fri, 29 Nov 2013 15:39:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATFddap095134; Fri, 29 Nov 2013 15:39:39 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311291539.rATFddap095134@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Nov 2013 15:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258746 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 15:39:40 -0000 Author: avg Date: Fri Nov 29 15:39:39 2013 New Revision: 258746 URL: http://svnweb.freebsd.org/changeset/base/258746 Log: zfs: add zfs_freebsd_putpages this should be more optimal than writing pages one-by-one via zfs_write -> update_pages in the case of multi-page putpages call MFC after: 16 days Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c head/sys/cddl/compat/opensolaris/sys/vm.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Fri Nov 29 15:34:43 2013 (r258745) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Fri Nov 29 15:39:39 2013 (r258746) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); const int zfs_vm_pagerret_bad = VM_PAGER_BAD; const int zfs_vm_pagerret_error = VM_PAGER_ERROR; const int zfs_vm_pagerret_ok = VM_PAGER_OK; +const int zfs_vm_pagerput_sync = VM_PAGER_PUT_SYNC; +const int zfs_vm_pagerput_inval = VM_PAGER_PUT_INVAL; void zfs_vmobject_assert_wlocked(vm_object_t object) Modified: head/sys/cddl/compat/opensolaris/sys/vm.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vm.h Fri Nov 29 15:34:43 2013 (r258745) +++ head/sys/cddl/compat/opensolaris/sys/vm.h Fri Nov 29 15:39:39 2013 (r258746) @@ -36,6 +36,8 @@ extern const int zfs_vm_pagerret_bad; extern const int zfs_vm_pagerret_error; extern const int zfs_vm_pagerret_ok; +extern const int zfs_vm_pagerput_sync; +extern const int zfs_vm_pagerput_inval; void zfs_vmobject_assert_wlocked(vm_object_t object); void zfs_vmobject_wlock(vm_object_t object); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 15:34:43 2013 (r258745) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Nov 29 15:39:39 2013 (r258746) @@ -467,6 +467,7 @@ update_pages(vnode_t *vp, int64_t start, caddr_t va; int off; + ASSERT(segflg != UIO_NOCOPY); ASSERT(vp->v_mount != NULL); obj = vp->v_object; ASSERT(obj != NULL); @@ -477,27 +478,7 @@ update_pages(vnode_t *vp, int64_t start, vm_page_t pp; int nbytes = imin(PAGESIZE - off, len); - if (segflg == UIO_NOCOPY) { - pp = vm_page_lookup(obj, OFF_TO_IDX(start)); - KASSERT(pp != NULL, - ("zfs update_pages: NULL page in putpages case")); - KASSERT(off == 0, - ("zfs update_pages: unaligned data in putpages case")); - KASSERT(pp->valid == VM_PAGE_BITS_ALL, - ("zfs update_pages: invalid page in putpages case")); - KASSERT(vm_page_sbusied(pp), - ("zfs update_pages: unbusy page in putpages case")); - KASSERT(!pmap_page_is_write_mapped(pp), - ("zfs update_pages: writable page in putpages case")); - zfs_vmobject_wunlock(obj); - - va = zfs_map_page(pp, &sf); - (void) dmu_write(os, oid, start, nbytes, va, tx); - zfs_unmap_page(sf); - - zfs_vmobject_wlock(obj); - vm_page_undirty(pp); - } else if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { + if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); @@ -511,8 +492,7 @@ update_pages(vnode_t *vp, int64_t start, len -= nbytes; off = 0; } - if (segflg != UIO_NOCOPY) - vm_object_pip_wakeupn(obj, 0); + vm_object_pip_wakeupn(obj, 0); zfs_vmobject_wunlock(obj); } @@ -5804,6 +5784,168 @@ zfs_freebsd_getpages(ap) } static int +zfs_putpages(struct vnode *vp, vm_page_t *ma, size_t len, int flags, + int *rtvals) +{ + znode_t *zp = VTOZ(vp); + zfsvfs_t *zfsvfs = zp->z_zfsvfs; + rl_t *rl; + dmu_tx_t *tx; + struct sf_buf *sf; + vm_object_t object; + vm_page_t m; + caddr_t va; + size_t tocopy; + size_t lo_len; + vm_ooffset_t lo_off; + vm_ooffset_t off; + uint_t blksz; + int ncount; + int pcount; + int err; + int i; + + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + + object = vp->v_object; + pcount = btoc(len); + ncount = pcount; + + KASSERT(ma[0]->object == object, ("mismatching object")); + KASSERT(len > 0 && (len & PAGE_MASK) == 0, ("unexpected length")); + + for (i = 0; i < pcount; i++) + rtvals[i] = zfs_vm_pagerret_error; + + off = IDX_TO_OFF(ma[0]->pindex); + blksz = zp->z_blksz; + lo_off = rounddown(off, blksz); + lo_len = roundup(len + (off - lo_off), blksz); + rl = zfs_range_lock(zp, lo_off, lo_len, RL_WRITER); + + zfs_vmobject_wlock(object); + if (len + off > object->un_pager.vnp.vnp_size) { + if (object->un_pager.vnp.vnp_size > off) { + int pgoff; + + len = object->un_pager.vnp.vnp_size - off; + ncount = btoc(len); + if ((pgoff = (int)len & PAGE_MASK) != 0) { + /* + * If the object is locked and the following + * conditions hold, then the page's dirty + * field cannot be concurrently changed by a + * pmap operation. + */ + m = ma[ncount - 1]; + vm_page_assert_sbusied(m); + KASSERT(!pmap_page_is_write_mapped(m), + ("zfs_putpages: page %p is not read-only", m)); + vm_page_clear_dirty(m, pgoff, PAGE_SIZE - + pgoff); + } + } else { + len = 0; + ncount = 0; + } + if (ncount < pcount) { + for (i = ncount; i < pcount; i++) { + rtvals[i] = zfs_vm_pagerret_bad; + } + } + } + zfs_vmobject_wunlock(object); + + if (ncount == 0) + goto out; + + if (zfs_owner_overquota(zfsvfs, zp, B_FALSE) || + zfs_owner_overquota(zfsvfs, zp, B_TRUE)) { + goto out; + } + +top: + tx = dmu_tx_create(zfsvfs->z_os); + dmu_tx_hold_write(tx, zp->z_id, off, len); + + dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); + zfs_sa_upgrade_txholds(tx, zp); + err = dmu_tx_assign(tx, TXG_NOWAIT); + if (err != 0) { + if (err == ERESTART) { + dmu_tx_wait(tx); + dmu_tx_abort(tx); + goto top; + } + dmu_tx_abort(tx); + goto out; + } + + if (zp->z_blksz < PAGE_SIZE) { + i = 0; + for (i = 0; len > 0; off += tocopy, len -= tocopy, i++) { + tocopy = len > PAGE_SIZE ? PAGE_SIZE : len; + va = zfs_map_page(ma[i], &sf); + dmu_write(zfsvfs->z_os, zp->z_id, off, tocopy, va, tx); + zfs_unmap_page(sf); + } + } else { + err = dmu_write_pages(zfsvfs->z_os, zp->z_id, off, len, ma, tx); + } + + if (err == 0) { + uint64_t mtime[2], ctime[2]; + sa_bulk_attr_t bulk[3]; + int count = 0; + + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, + &mtime, 16); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, + &ctime, 16); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_FLAGS(zfsvfs), NULL, + &zp->z_pflags, 8); + zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime, + B_TRUE); + zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, 0); + + zfs_vmobject_wlock(object); + for (i = 0; i < ncount; i++) { + rtvals[i] = zfs_vm_pagerret_ok; + vm_page_undirty(ma[i]); + } + zfs_vmobject_wunlock(object); + PCPU_INC(cnt.v_vnodeout); + PCPU_ADD(cnt.v_vnodepgsout, ncount); + } + dmu_tx_commit(tx); + +out: + zfs_range_unlock(rl); + if ((flags & (zfs_vm_pagerput_sync | zfs_vm_pagerput_inval)) != 0 || + zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) + zil_commit(zfsvfs->z_log, zp->z_id); + ZFS_EXIT(zfsvfs); + return (rtvals[0]); +} + +int +zfs_freebsd_putpages(ap) + struct vop_putpages_args /* { + struct vnode *a_vp; + vm_page_t *a_m; + int a_count; + int a_sync; + int *a_rtvals; + vm_ooffset_t a_offset; + } */ *ap; +{ + + return (zfs_putpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_sync, + ap->a_rtvals)); +} + +static int zfs_freebsd_bmap(ap) struct vop_bmap_args /* { struct vnode *a_vp; @@ -6949,6 +7091,7 @@ struct vop_vector zfs_vnodeops = { .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, .vop_getpages = zfs_freebsd_getpages, + .vop_putpages = zfs_freebsd_putpages, }; struct vop_vector zfs_fifoops = { From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 18:46:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC7FABF3; Fri, 29 Nov 2013 18:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7B3B18B5; Fri, 29 Nov 2013 18:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATIk5Pu061744; Fri, 29 Nov 2013 18:46:05 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATIk2T2061721; Fri, 29 Nov 2013 18:46:02 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311291846.rATIk2T2061721@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 29 Nov 2013 18:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258748 - in head/contrib/gcc: . cp doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 18:46:05 -0000 Author: pfg Date: Fri Nov 29 18:46:02 2013 New Revision: 258748 URL: http://svnweb.freebsd.org/changeset/base/258748 Log: gcc: upstream alignment cleanups. This solves GCC/32617 and contributes to reduce differences with Apple's gcc42. Complete some references in the ChangeLog while here. Obtained from: gcc 4.3 (rev. 126529, 126588; GPLv2) MFC after: 3 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/builtins.c head/contrib/gcc/c-common.c head/contrib/gcc/c-decl.c head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/decl.c head/contrib/gcc/cp/typeck.c head/contrib/gcc/doc/extend.texi head/contrib/gcc/flags.h head/contrib/gcc/print-tree.c head/contrib/gcc/toplev.c head/contrib/gcc/tree.c head/contrib/gcc/tree.h head/contrib/gcc/varasm.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/ChangeLog.gcc43 Fri Nov 29 18:46:02 2013 (r258748) @@ -4,6 +4,47 @@ * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New. * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New. +2007-07-12 Geoffrey Keating (r126588) + + * builtins.c (get_pointer_alignment): Honor DECL_ALIGN on a + FUNCTION_DECL. + * tree.c (build_decl_stat): Move code from here... + (make_node_stat): ... to here. Don't uselessly clear DECL_USER_ALIGN. + (expr_align): Honor DECL_ALIGN on a FUNCTION_DECL. Add comment + about using DECL_ALIGN of LABEL_DECL and CONST_DECL. + * tree.h (DECL_USER_ALIGN): Fix misplaced comment. + * varasm.c (assemble_start_function): Use DECL_ALIGN instead of + FUNCTION_BOUNDARY. + +2007-07-09 Geoffrey Keating (r126529) + + PR 32617 + * c-common.c (c_alignof_expr): Look at DECL_ALIGN of + FUNCTION_DECLs. + (handle_aligned_attribute): Allow use on FUNCTION_DECLs. + * varasm.c (assemble_start_function): Honor DECL_ALIGN + for FUNCTION_DECLs. Don't use align_functions_log if + DECL_USER_ALIGN. + * print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN + even for FUNCTION_DECLs. + * c-decl.c (merge_decls): Propagate DECL_ALIGN even for + FUNCTION_DECLs. + * tree.h (DECL_ALIGN): Update for new location of 'align'. + (DECL_FUNCTION_CODE): Update for new location and name of + 'function_code'. + (DECL_OFFSET_ALIGN): Update for new location of 'off_align'. + (struct tree_decl_common): Move 'align' and 'off_align' out + of union, ensure they're still on a 32-bit boundary. Remove + other fields in union 'u1'. + (struct tree_function_decl): Add field 'function_code' replacing + 'u1.f' in tree_decl_common. + * tree.c (build_decl_stat): Set initial value of DECL_ALIGN. + * doc/extend.texi (Function Attributes): Add 'aligned' attribute. + (Variable Attributes): Cross-reference 'aligned' attribute + to Function Attributes. + * flags.h (force_align_functions_log): Delete. + * toplev.c (force_align_functions_log): Delete. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -60,7 +101,7 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. -2007-04-16 Lawrence Crowl +2007-04-16 Lawrence Crowl (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options -femit-struct-debug-baseonly, @@ -139,7 +180,7 @@ * config/i386/i386.c (override_options): Likewise. * doc/invoke.texi: Likewise. -2007-03-12 Seongbae Park +2007-03-12 Seongbae Park (r122851) * c-decl.c (warn_variable_length_array): New function. Refactored from grokdeclarator to handle warn_vla @@ -340,7 +381,7 @@ * config.gcc: Support core2 processor. -2007-01-05 Manuel Lopez-Ibanez +2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 * tree.h (TREE_OVERFLOW_P): New. Modified: head/contrib/gcc/builtins.c ============================================================================== --- head/contrib/gcc/builtins.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/builtins.c Fri Nov 29 18:46:02 2013 (r258748) @@ -315,9 +315,7 @@ get_pointer_alignment (tree exp, unsigne else if (offset) inner = MIN (inner, BITS_PER_UNIT); } - if (TREE_CODE (exp) == FUNCTION_DECL) - align = FUNCTION_BOUNDARY; - else if (DECL_P (exp)) + if (DECL_P (exp)) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT else if (CONSTANT_CLASS_P (exp)) Modified: head/contrib/gcc/c-common.c ============================================================================== --- head/contrib/gcc/c-common.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/c-common.c Fri Nov 29 18:46:02 2013 (r258748) @@ -2995,16 +2995,16 @@ c_sizeof_or_alignof_type (tree type, boo } /* Implement the __alignof keyword: Return the minimum required - alignment of EXPR, measured in bytes. For VAR_DECL's and - FIELD_DECL's return DECL_ALIGN (which can be set from an - "aligned" __attribute__ specification). */ + alignment of EXPR, measured in bytes. For VAR_DECLs, + FUNCTION_DECLs and FIELD_DECLs return DECL_ALIGN (which can be set + from an "aligned" __attribute__ specification). */ tree c_alignof_expr (tree expr) { tree t; - if (TREE_CODE (expr) == VAR_DECL) + if (VAR_OR_FUNCTION_DECL_P (expr)) t = size_int (DECL_ALIGN_UNIT (expr)); else if (TREE_CODE (expr) == COMPONENT_REF @@ -4809,12 +4809,24 @@ handle_aligned_attribute (tree *node, tr TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; TYPE_USER_ALIGN (*type) = 1; } - else if (TREE_CODE (decl) != VAR_DECL + else if (! VAR_OR_FUNCTION_DECL_P (decl) && TREE_CODE (decl) != FIELD_DECL) { error ("alignment may not be specified for %q+D", decl); *no_add_attrs = true; } + else if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_ALIGN (decl) > (1 << i) * BITS_PER_UNIT) + { + if (DECL_USER_ALIGN (decl)) + error ("alignment for %q+D was previously specified as %d " + "and may not be decreased", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + else + error ("alignment for %q+D must be at least %d", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + *no_add_attrs = true; + } else { DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT; Modified: head/contrib/gcc/c-decl.c ============================================================================== --- head/contrib/gcc/c-decl.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/c-decl.c Fri Nov 29 18:46:02 2013 (r258748) @@ -1690,12 +1690,11 @@ merge_decls (tree newdecl, tree olddecl, DECL_SIZE (newdecl) = DECL_SIZE (olddecl); DECL_SIZE_UNIT (newdecl) = DECL_SIZE_UNIT (olddecl); DECL_MODE (newdecl) = DECL_MODE (olddecl); - if (TREE_CODE (olddecl) != FUNCTION_DECL) - if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) - { - DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); - DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); - } + if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) + { + DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); + DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); + } } Modified: head/contrib/gcc/cp/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/cp/ChangeLog.gcc43 Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Fri Nov 29 18:46:02 2013 (r258748) @@ -1,3 +1,12 @@ +2007-07-09 Geoffrey Keating + + PR 32617 + * decl.c (cxx_init_decl_processing): Don't set + force_align_functions_log. + (grokfndecl): Honour ptrmemfunc_vbit_in_pfn. + * typeck.c (cxx_alignof_expr): When alignof is used on a plain + FUNCTION_DECL, return its alignment. + 2007-06-28 Geoffrey Keating (r126080) * decl2.c (start_objects): Mark constructor-runnning function Modified: head/contrib/gcc/cp/decl.c ============================================================================== --- head/contrib/gcc/cp/decl.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/cp/decl.c Fri Nov 29 18:46:02 2013 (r258748) @@ -3158,12 +3158,6 @@ cxx_init_decl_processing (void) if (flag_inline_functions) flag_inline_trees = 2; - /* Force minimum function alignment if using the least significant - bit of function pointers to store the virtual bit. */ - if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn - && force_align_functions_log < 1) - force_align_functions_log = 1; - /* Initially, C. */ current_lang_name = lang_name_c; @@ -6065,6 +6059,14 @@ grokfndecl (tree ctype, if (TYPE_VOLATILE (type)) TREE_THIS_VOLATILE (decl) = 1; + /* If pointers to member functions use the least significant bit to + indicate whether a function is virtual, ensure a pointer + to this function will have that bit clear. */ + if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn + && TREE_CODE (type) == METHOD_TYPE + && DECL_ALIGN (decl) < 2 * BITS_PER_UNIT) + DECL_ALIGN (decl) = 2 * BITS_PER_UNIT; + if (friendp && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR) { Modified: head/contrib/gcc/cp/typeck.c ============================================================================== --- head/contrib/gcc/cp/typeck.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/cp/typeck.c Fri Nov 29 18:46:02 2013 (r258748) @@ -1358,7 +1358,10 @@ cxx_alignof_expr (tree e) { pedwarn ("ISO C++ forbids applying %<__alignof%> to an expression of " "function type"); - t = size_one_node; + if (TREE_CODE (e) == FUNCTION_DECL) + t = size_int (DECL_ALIGN_UNIT (e)); + else + t = size_one_node; } else if (type_unknown_p (e)) { Modified: head/contrib/gcc/doc/extend.texi ============================================================================== --- head/contrib/gcc/doc/extend.texi Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/doc/extend.texi Fri Nov 29 18:46:02 2013 (r258748) @@ -1577,6 +1577,7 @@ The keyword @code{__attribute__} allows attributes when making a declaration. This keyword is followed by an attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: +@code{aligned}, @code{noreturn}, @code{returns_twice}, @code{noinline}, @code{always_inline}, @code{flatten}, @code{pure}, @code{const}, @code{nothrow}, @code{sentinel}, @code{format}, @code{format_arg}, @code{no_instrument_function}, @@ -1615,6 +1616,27 @@ is not defined in the same translation u Not all target machines support this attribute. +@item aligned (@var{alignment}) +@cindex @code{aligned} attribute +This attribute specifies a minimum alignment for the function, +measured in bytes. + +You cannot use this attribute to decrease the alignment of a function, +only to increase it. However, when you explicitly specify a function +alignment this will override the effect of the +@option{-falign-functions} (@pxref{Optimize Options}) option for this +function. + +Note that the effectiveness of @code{aligned} attributes may be +limited by inherent limitations in your linker. On many systems, the +linker is only able to arrange for functions to be aligned up to a +certain maximum alignment. (For some linkers, the maximum supported +alignment may be very very small.) See your linker documentation for +further information. + +The @code{aligned} attribute can also be used for variables and fields +(@pxref{Variable Attributes}.) + @item always_inline @cindex @code{always_inline} function attribute Generally, functions are not inlined unless optimization is specified. @@ -3044,6 +3066,9 @@ up to a maximum of 8 byte alignment, the in an @code{__attribute__} will still only provide you with 8 byte alignment. See your linker documentation for further information. +The @code{aligned} attribute can also be used for functions +(@pxref{Function Attributes}.) + @item cleanup (@var{cleanup_function}) @cindex @code{cleanup} attribute The @code{cleanup} attribute runs a function when the variable goes Modified: head/contrib/gcc/flags.h ============================================================================== --- head/contrib/gcc/flags.h Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/flags.h Fri Nov 29 18:46:02 2013 (r258748) @@ -261,10 +261,6 @@ extern int align_labels_log; extern int align_labels_max_skip; extern int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -extern int force_align_functions_log; - /* Nonzero if we dump in VCG format, not plain text. */ extern int dump_for_graph; Modified: head/contrib/gcc/print-tree.c ============================================================================== --- head/contrib/gcc/print-tree.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/print-tree.c Fri Nov 29 18:46:02 2013 (r258748) @@ -439,17 +439,15 @@ print_node (FILE *file, const char *pref || DECL_INLINE (node) || DECL_BUILT_IN (node)) indent_to (file, indent + 3); - if (TREE_CODE (node) != FUNCTION_DECL) - { - if (DECL_USER_ALIGN (node)) - fprintf (file, " user"); - - fprintf (file, " align %d", DECL_ALIGN (node)); - if (TREE_CODE (node) == FIELD_DECL) - fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, - DECL_OFFSET_ALIGN (node)); - } - else if (DECL_BUILT_IN (node)) + if (DECL_USER_ALIGN (node)) + fprintf (file, " user"); + + fprintf (file, " align %d", DECL_ALIGN (node)); + if (TREE_CODE (node) == FIELD_DECL) + fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, + DECL_OFFSET_ALIGN (node)); + + if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) { if (DECL_BUILT_IN_CLASS (node) == BUILT_IN_MD) fprintf (file, " built-in BUILT_IN_MD %d", DECL_FUNCTION_CODE (node)); Modified: head/contrib/gcc/toplev.c ============================================================================== --- head/contrib/gcc/toplev.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/toplev.c Fri Nov 29 18:46:02 2013 (r258748) @@ -369,10 +369,6 @@ int align_labels_log; int align_labels_max_skip; int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -int force_align_functions_log; - typedef struct { const char *const string; Modified: head/contrib/gcc/tree.c ============================================================================== --- head/contrib/gcc/tree.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/tree.c Fri Nov 29 18:46:02 2013 (r258748) @@ -541,9 +541,13 @@ make_node_stat (enum tree_code code MEM_ DECL_IN_SYSTEM_HEADER (t) = in_system_header; if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON)) { - if (code != FUNCTION_DECL) + if (code == FUNCTION_DECL) + { + DECL_ALIGN (t) = FUNCTION_BOUNDARY; + DECL_MODE (t) = FUNCTION_MODE; + } + else DECL_ALIGN (t) = 1; - DECL_USER_ALIGN (t) = 0; /* We have not yet computed the alias set for this declaration. */ DECL_POINTER_ALIAS_SET (t) = -1; } @@ -1881,14 +1885,13 @@ expr_align (tree t) align1 = expr_align (TREE_OPERAND (t, 2)); return MIN (align0, align1); + /* FIXME: LABEL_DECL and CONST_DECL never have DECL_ALIGN set + meaningfully, it's always 1. */ case LABEL_DECL: case CONST_DECL: case VAR_DECL: case PARM_DECL: case RESULT_DECL: - if (DECL_ALIGN (t) != 0) - return DECL_ALIGN (t); - break; - case FUNCTION_DECL: - return FUNCTION_BOUNDARY; + gcc_assert (DECL_ALIGN (t) != 0); + return DECL_ALIGN (t); default: break; @@ -3174,8 +3177,6 @@ build_decl_stat (enum tree_code code, tr if (code == VAR_DECL || code == PARM_DECL || code == RESULT_DECL) layout_decl (t, 0); - else if (code == FUNCTION_DECL) - DECL_MODE (t) = FUNCTION_MODE; return t; } Modified: head/contrib/gcc/tree.h ============================================================================== --- head/contrib/gcc/tree.h Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/tree.h Fri Nov 29 18:46:02 2013 (r258748) @@ -2426,13 +2426,11 @@ struct tree_struct_field_tag GTY(()) /* Likewise for the size in bytes. */ #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit) /* Holds the alignment required for the datum, in bits. */ -#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align) +#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align) /* The alignment of NODE, in bytes. */ #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT) -/* For FIELD_DECLs, off_align holds the number of low-order bits of - DECL_FIELD_OFFSET which are known to be always zero. - DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET - has. */ +/* Set if the alignment of this DECL has been set by the user, for + example with an 'aligned' attribute. */ #define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align) /* Holds the machine mode corresponding to the declaration of a variable or field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a @@ -2443,7 +2441,8 @@ struct tree_struct_field_tag GTY(()) operation it is. Note, however, that this field is overloaded, with DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be checked before any access to the former. */ -#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_common.u1.f) +#define DECL_FUNCTION_CODE(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code) #define DECL_DEBUG_EXPR_IS_FROM(NODE) \ (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) @@ -2581,20 +2580,9 @@ struct tree_decl_common GTY(()) unsigned gimple_reg_flag : 1; unsigned call_clobbered_flag : 1; - union tree_decl_u1 { - /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is - DECL_FUNCTION_CODE. */ - enum built_in_function f; - /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this - is used by language-dependent code. */ - HOST_WIDE_INT i; - /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for - FUNCTION_DECLs). */ - struct tree_decl_u1_a { - unsigned int align : 24; - unsigned int off_align : 8; - } a; - } GTY ((skip)) u1; + unsigned int align : 24; + /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ + unsigned int off_align : 8; tree size_unit; tree initial; @@ -2679,11 +2667,11 @@ struct tree_decl_with_rtl GTY(()) DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET has. */ #define DECL_OFFSET_ALIGN(NODE) \ - (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align) + (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align) /* Specify that DECL_ALIGN(NODE) is a multiple of X. */ #define SET_DECL_OFFSET_ALIGN(NODE, X) \ - (FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align = exact_log2 ((X) & -(X))) + (FIELD_DECL_CHECK (NODE)->decl_common.off_align = exact_log2 ((X) & -(X))) /* 1 if the alignment for this type was requested by "aligned" attribute, 0 if it is the default for this type. */ @@ -3096,6 +3084,10 @@ struct tree_function_decl GTY(()) { struct tree_decl_non_common common; + /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is + DECL_FUNCTION_CODE. Otherwise unused. */ + enum built_in_function function_code; + unsigned static_ctor_flag : 1; unsigned static_dtor_flag : 1; unsigned uninlinable : 1; Modified: head/contrib/gcc/varasm.c ============================================================================== --- head/contrib/gcc/varasm.c Fri Nov 29 18:06:02 2013 (r258747) +++ head/contrib/gcc/varasm.c Fri Nov 29 18:46:02 2013 (r258748) @@ -1383,7 +1383,7 @@ assemble_start_function (tree decl, cons if (flag_reorder_blocks_and_partition) { switch_to_section (unlikely_text_section ()); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label); /* When the function starts with a cold section, we need to explicitly @@ -1393,7 +1393,7 @@ assemble_start_function (tree decl, cons && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION) { switch_to_section (text_section); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); hot_label_written = true; first_function_block_is_cold = true; @@ -1424,18 +1424,17 @@ assemble_start_function (tree decl, cons ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); /* Tell assembler to move to target machine's alignment for functions. */ - align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); - if (align < force_align_functions_log) - align = force_align_functions_log; + align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT); if (align > 0) { ASM_OUTPUT_ALIGN (asm_out_file, align); } /* Handle a user-specified function alignment. - Note that we still need to align to FUNCTION_BOUNDARY, as above, + Note that we still need to align to DECL_ALIGN, as above, because ASM_OUTPUT_MAX_SKIP_ALIGN might not do any alignment at all. */ - if (align_functions_log > align + if (! DECL_USER_ALIGN (decl) + && align_functions_log > align && cfun->function_frequency != FUNCTION_FREQUENCY_UNLIKELY_EXECUTED) { #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 20:12:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C9E7BAC; Fri, 29 Nov 2013 20:12:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 587A51D28; Fri, 29 Nov 2013 20:12:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATKC3Ia093095; Fri, 29 Nov 2013 20:12:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATKC3ev093094; Fri, 29 Nov 2013 20:12:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311292012.rATKC3ev093094@svn.freebsd.org> From: Eitan Adler Date: Fri, 29 Nov 2013 20:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258751 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 20:12:03 -0000 Author: eadler Date: Fri Nov 29 20:12:02 2013 New Revision: 258751 URL: http://svnweb.freebsd.org/changeset/base/258751 Log: Fix typo Reported by: swildner@DragonFlyBSD.org Modified: head/sys/libkern/iconv.c Modified: head/sys/libkern/iconv.c ============================================================================== --- head/sys/libkern/iconv.c Fri Nov 29 19:44:30 2013 (r258750) +++ head/sys/libkern/iconv.c Fri Nov 29 20:12:02 2013 (r258751) @@ -137,7 +137,7 @@ iconv_unregister_converter(struct iconv_ { dcp->refs--; if (dcp->refs > 1) { - ICDEBUG("converter have %d referenses left\n", dcp->refs); + ICDEBUG("converter have %d references left\n", dcp->refs); return EBUSY; } TAILQ_REMOVE(&iconv_converters, dcp, cc_link); From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 20:14:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EB87CFF; Fri, 29 Nov 2013 20:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0ADD41D36; Fri, 29 Nov 2013 20:14:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATKEQAb093636; Fri, 29 Nov 2013 20:14:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATKEQh2093635; Fri, 29 Nov 2013 20:14:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311292014.rATKEQh2093635@svn.freebsd.org> From: Eitan Adler Date: Fri, 29 Nov 2013 20:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258752 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 20:14:27 -0000 Author: eadler Date: Fri Nov 29 20:14:26 2013 New Revision: 258752 URL: http://svnweb.freebsd.org/changeset/base/258752 Log: Fix typo Reported by: emaste Modified: head/sys/libkern/iconv.c Modified: head/sys/libkern/iconv.c ============================================================================== --- head/sys/libkern/iconv.c Fri Nov 29 20:12:02 2013 (r258751) +++ head/sys/libkern/iconv.c Fri Nov 29 20:14:26 2013 (r258752) @@ -137,7 +137,7 @@ iconv_unregister_converter(struct iconv_ { dcp->refs--; if (dcp->refs > 1) { - ICDEBUG("converter have %d references left\n", dcp->refs); + ICDEBUG("converter has %d references left\n", dcp->refs); return EBUSY; } TAILQ_REMOVE(&iconv_converters, dcp, cc_link); From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 20:19:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A44B4F98; Fri, 29 Nov 2013 20:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 909E51D62; Fri, 29 Nov 2013 20:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATKJ0hZ094368; Fri, 29 Nov 2013 20:19:00 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATKJ0Aj094367; Fri, 29 Nov 2013 20:19:00 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201311292019.rATKJ0Aj094367@svn.freebsd.org> From: Andreas Tobler Date: Fri, 29 Nov 2013 20:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258753 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 20:19:00 -0000 Author: andreast Date: Fri Nov 29 20:19:00 2013 New Revision: 258753 URL: http://svnweb.freebsd.org/changeset/base/258753 Log: Fix typo. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Fri Nov 29 20:14:26 2013 (r258752) +++ head/sys/conf/kern.pre.mk Fri Nov 29 20:19:00 2013 (r258753) @@ -194,7 +194,7 @@ MKMODULESENV+= WITHOUT_MODULES="${WITHOU MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif -# Detect knerel config options that force stack frames to be turned on. +# Detect kernel config options that force stack frames to be turned on. DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 21:59:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 501BAE74; Fri, 29 Nov 2013 21:59:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B9D911A3; Fri, 29 Nov 2013 21:59:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATLx4PQ029490; Fri, 29 Nov 2013 21:59:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATLx4Xt029489; Fri, 29 Nov 2013 21:59:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311292159.rATLx4Xt029489@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 29 Nov 2013 21:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258757 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 21:59:04 -0000 Author: nwhitehorn Date: Fri Nov 29 21:59:03 2013 New Revision: 258757 URL: http://svnweb.freebsd.org/changeset/base/258757 Log: Use the Open Firmware-based CPU frequency determination as a generic fallback if we can't measure CPU frequency. This is also useful on a variety of embedded systems using FDT. Modified: head/sys/powerpc/powerpc/cpu.c Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Fri Nov 29 21:13:30 2013 (r258756) +++ head/sys/powerpc/powerpc/cpu.c Fri Nov 29 21:59:03 2013 (r258757) @@ -276,7 +276,6 @@ cpu_est_clockrate(int cpu_id, uint64_t * uint16_t vers; register_t msr; phandle_t cpu, dev, root; - uint32_t freq[2]; int res = 0; char buf[8]; @@ -323,13 +322,11 @@ cpu_est_clockrate(int cpu_id, uint64_t * mtmsr(msr); return (0); - case IBMPOWER5: - case IBMPOWER5PLUS: - case IBMPOWER6: - case IBMPOWER7: - case IBMPOWER7PLUS: - case IBMPOWER8: + default: root = OF_peer(0); + if (root == 0) + return (ENXIO); + dev = OF_child(root); while (dev != 0) { res = OF_getprop(dev, "name", buf, sizeof(buf)); @@ -347,19 +344,17 @@ cpu_est_clockrate(int cpu_id, uint64_t * } if (cpu == 0) return (ENOENT); - if (OF_getprop(cpu, "clock-frequency", &freq[0], - sizeof(freq[0]))) - *cps = freq[0]; - else if (OF_getprop(cpu, "ibm,extended-clock-frequency", - &freq, sizeof(freq))) - *cps = freq[1]; - else - *cps = 0; - - return(0); + if (OF_getprop(cpu, "ibm,extended-clock-frequency", + cps, sizeof(*cps)) >= 0) { + return (0); + } else if (OF_getprop(cpu, "clock-frequency", cps, + sizeof(cell_t)) >= 0) { + *cps >>= 32; + return (0); + } else { + return (ENOENT); + } } - - return (ENXIO); } void From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 22:24:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11118574; Fri, 29 Nov 2013 22:24:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F10D512BB; Fri, 29 Nov 2013 22:24:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATMOv8l039891; Fri, 29 Nov 2013 22:24:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATMOvPB039890; Fri, 29 Nov 2013 22:24:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311292224.rATMOvPB039890@svn.freebsd.org> From: Adrian Chadd Date: Fri, 29 Nov 2013 22:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258758 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 22:24:58 -0000 Author: adrian Date: Fri Nov 29 22:24:57 2013 New Revision: 258758 URL: http://svnweb.freebsd.org/changeset/base/258758 Log: Make sure any waiters on the scan results get notified if the scan task decides to do nothing. If this isn't done, then a scan request whilst a scan occurs in an active channel set or a completed channel set will hang. Tested: * Intel 5100, STA mode Modified: head/sys/net80211/ieee80211_scan.c Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Fri Nov 29 21:59:03 2013 (r258757) +++ head/sys/net80211/ieee80211_scan.c Fri Nov 29 22:24:57 2013 (r258758) @@ -860,6 +860,7 @@ scan_task(void *arg, int pending) if (ss->ss_next == ss->ss_last) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: no channels to scan\n", __func__); + scandone = 1; goto done; } From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 22:35:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94F599E5; Fri, 29 Nov 2013 22:35:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E5F01340; Fri, 29 Nov 2013 22:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATMZOcS043453; Fri, 29 Nov 2013 22:35:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATMZO4w043452; Fri, 29 Nov 2013 22:35:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311292235.rATMZO4w043452@svn.freebsd.org> From: Adrian Chadd Date: Fri, 29 Nov 2013 22:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258759 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 22:35:24 -0000 Author: adrian Date: Fri Nov 29 22:35:24 2013 New Revision: 258759 URL: http://svnweb.freebsd.org/changeset/base/258759 Log: Use the correct endian-ness accessor for this TLV field. (It's coming from firmware and thus it's defined as little-endian.) Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Nov 29 22:24:57 2013 (r258758) +++ head/sys/dev/iwn/if_iwn.c Fri Nov 29 22:35:24 2013 (r258759) @@ -7474,7 +7474,7 @@ iwn_read_firmware_tlv(struct iwn_softc * sc->sc_flags |= IWN_FLAG_ENH_SENS; break; case IWN_FW_TLV_PHY_CALIB: - tmp = htole32(*ptr); + tmp = le32toh(*ptr); if (tmp < 253) { sc->reset_noise_gain = tmp; sc->noise_gain = tmp + 1; From owner-svn-src-head@FreeBSD.ORG Fri Nov 29 22:36:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86C06B1E; Fri, 29 Nov 2013 22:36:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 725381343; Fri, 29 Nov 2013 22:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATMa15G043561; Fri, 29 Nov 2013 22:36:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATMa1VY043560; Fri, 29 Nov 2013 22:36:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311292236.rATMa1VY043560@svn.freebsd.org> From: Adrian Chadd Date: Fri, 29 Nov 2013 22:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258760 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 22:36:01 -0000 Author: adrian Date: Fri Nov 29 22:36:00 2013 New Revision: 258760 URL: http://svnweb.freebsd.org/changeset/base/258760 Log: Disable this debugging - it's far too verbose when doing TX rate debugging. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Nov 29 22:35:24 2013 (r258759) +++ head/sys/dev/iwn/if_iwn.c Fri Nov 29 22:36:00 2013 (r258760) @@ -4012,12 +4012,14 @@ iwn_tx_rate_to_linkq_offset(struct iwn_s if (rate & IEEE80211_RATE_MCS) cmp_rate |= IEEE80211_RATE_MCS; +#if 0 DPRINTF(sc, IWN_DEBUG_XMIT, "%s: idx %d: nr=%d, rate=0x%02x, rateentry=0x%02x\n", __func__, i, nr, rate, cmp_rate); +#endif if (cmp_rate == rate) return (i); From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 06:46:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC3361E7; Sat, 30 Nov 2013 06:46:05 +0000 (UTC) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91A7C1F44; Sat, 30 Nov 2013 06:46:05 +0000 (UTC) Received: from [192.168.0.48] ([192.168.0.48]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id rAU6k3wW085408 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 29 Nov 2013 23:46:04 -0700 (MST) (envelope-from gibbs@scsiguy.com) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: svn commit: r258713 - in head/sys: kern sys From: "Justin T. Gibbs" In-Reply-To: <201311281856.rASIuZu8059699@svn.freebsd.org> Date: Fri, 29 Nov 2013 23:46:04 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3784C560-3648-4E03-93DA-9A60E3AC401D@scsiguy.com> References: <201311281856.rASIuZu8059699@svn.freebsd.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1822) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Fri, 29 Nov 2013 23:46:05 -0700 (MST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 06:46:05 -0000 Man page update? =97 Justin On Nov 28, 2013, at 11:56 AM, Andriy Gapon wrote: > Author: avg > Date: Thu Nov 28 18:56:34 2013 > New Revision: 258713 > URL: http://svnweb.freebsd.org/changeset/base/258713 >=20 > Log: > add taskqueue_drain_all >=20 > This API has semantics similar to that of taskqueue_drain but acts on > all tasks that might be queued or running on a taskqueue. > A caller must ensure that no new tasks are being enqueued otherwise = this > call would be totally meaningless. For example, if the tasks are > enqueued by an interrupt filter then its interrupt must be disabled. >=20 > MFC after: 10 days >=20 > Modified: > head/sys/kern/subr_taskqueue.c > head/sys/sys/taskqueue.h >=20 > Modified: head/sys/kern/subr_taskqueue.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/kern/subr_taskqueue.c Thu Nov 28 16:36:03 2013 = (r258712) > +++ head/sys/kern/subr_taskqueue.c Thu Nov 28 18:56:34 2013 = (r258713) > @@ -300,6 +300,15 @@ taskqueue_enqueue_timeout(struct taskque > return (res); > } >=20 > +static void > +taskqueue_drain_running(struct taskqueue *queue) > +{ > + > + while (!TAILQ_EMPTY(&queue->tq_active)) > + TQ_SLEEP(queue, &queue->tq_active, &queue->tq_mutex, > + PWAIT, "-", 0); > +} > + > void > taskqueue_block(struct taskqueue *queue) > { > @@ -350,6 +359,8 @@ taskqueue_run_locked(struct taskqueue *q > wakeup(task); > } > TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); > + if (TAILQ_EMPTY(&queue->tq_active)) > + wakeup(&queue->tq_active); > } >=20 > void > @@ -434,6 +445,25 @@ taskqueue_drain(struct taskqueue *queue, > } >=20 > void > +taskqueue_drain_all(struct taskqueue *queue) > +{ > + struct task *task; > + > + if (!queue->tq_spin) > + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, = __func__); > + > + TQ_LOCK(queue); > + task =3D STAILQ_LAST(&queue->tq_queue, task, ta_link); > + if (task !=3D NULL) > + while (task->ta_pending !=3D 0) > + TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, = "-", 0); > + taskqueue_drain_running(queue); > + KASSERT(STAILQ_EMPTY(&queue->tq_queue), > + ("taskqueue queue is not empty after draining")); > + TQ_UNLOCK(queue); > +} > + > +void > taskqueue_drain_timeout(struct taskqueue *queue, > struct timeout_task *timeout_task) > { >=20 > Modified: head/sys/sys/taskqueue.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/taskqueue.h Thu Nov 28 16:36:03 2013 = (r258712) > +++ head/sys/sys/taskqueue.h Thu Nov 28 18:56:34 2013 = (r258713) > @@ -81,6 +81,7 @@ int taskqueue_cancel_timeout(struct task > void taskqueue_drain(struct taskqueue *queue, struct task *task); > void taskqueue_drain_timeout(struct taskqueue *queue, > struct timeout_task *timeout_task); > +void taskqueue_drain_all(struct taskqueue *queue); > void taskqueue_free(struct taskqueue *queue); > void taskqueue_run(struct taskqueue *queue); > void taskqueue_block(struct taskqueue *queue); >=20 From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 07:31:18 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2426EC5B; Sat, 30 Nov 2013 07:31:18 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E66D610FB; Sat, 30 Nov 2013 07:31:16 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA26895; Sat, 30 Nov 2013 09:31:06 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Vmf17-000J6u-2Q; Sat, 30 Nov 2013 09:31:05 +0200 Message-ID: <52999401.5010306@FreeBSD.org> Date: Sat, 30 Nov 2013 09:30:09 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "Justin T. Gibbs" Subject: Re: svn commit: r258713 - in head/sys: kern sys References: <201311281856.rASIuZu8059699@svn.freebsd.org> <3784C560-3648-4E03-93DA-9A60E3AC401D@scsiguy.com> In-Reply-To: <3784C560-3648-4E03-93DA-9A60E3AC401D@scsiguy.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 07:31:18 -0000 on 30/11/2013 08:46 Justin T. Gibbs said the following: > Man page update? Yes, coming. > On Nov 28, 2013, at 11:56 AM, Andriy Gapon wrote: > >> Author: avg >> Date: Thu Nov 28 18:56:34 2013 >> New Revision: 258713 >> URL: http://svnweb.freebsd.org/changeset/base/258713 >> >> Log: >> add taskqueue_drain_all >> >> This API has semantics similar to that of taskqueue_drain but acts on >> all tasks that might be queued or running on a taskqueue. >> A caller must ensure that no new tasks are being enqueued otherwise this >> call would be totally meaningless. For example, if the tasks are >> enqueued by an interrupt filter then its interrupt must be disabled. >> >> MFC after: 10 days >> >> Modified: >> head/sys/kern/subr_taskqueue.c >> head/sys/sys/taskqueue.h >> >> Modified: head/sys/kern/subr_taskqueue.c >> ============================================================================== >> --- head/sys/kern/subr_taskqueue.c Thu Nov 28 16:36:03 2013 (r258712) >> +++ head/sys/kern/subr_taskqueue.c Thu Nov 28 18:56:34 2013 (r258713) >> @@ -300,6 +300,15 @@ taskqueue_enqueue_timeout(struct taskque >> return (res); >> } >> >> +static void >> +taskqueue_drain_running(struct taskqueue *queue) >> +{ >> + >> + while (!TAILQ_EMPTY(&queue->tq_active)) >> + TQ_SLEEP(queue, &queue->tq_active, &queue->tq_mutex, >> + PWAIT, "-", 0); >> +} >> + >> void >> taskqueue_block(struct taskqueue *queue) >> { >> @@ -350,6 +359,8 @@ taskqueue_run_locked(struct taskqueue *q >> wakeup(task); >> } >> TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); >> + if (TAILQ_EMPTY(&queue->tq_active)) >> + wakeup(&queue->tq_active); >> } >> >> void >> @@ -434,6 +445,25 @@ taskqueue_drain(struct taskqueue *queue, >> } >> >> void >> +taskqueue_drain_all(struct taskqueue *queue) >> +{ >> + struct task *task; >> + >> + if (!queue->tq_spin) >> + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); >> + >> + TQ_LOCK(queue); >> + task = STAILQ_LAST(&queue->tq_queue, task, ta_link); >> + if (task != NULL) >> + while (task->ta_pending != 0) >> + TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, "-", 0); >> + taskqueue_drain_running(queue); >> + KASSERT(STAILQ_EMPTY(&queue->tq_queue), >> + ("taskqueue queue is not empty after draining")); >> + TQ_UNLOCK(queue); >> +} >> + >> +void >> taskqueue_drain_timeout(struct taskqueue *queue, >> struct timeout_task *timeout_task) >> { >> >> Modified: head/sys/sys/taskqueue.h >> ============================================================================== >> --- head/sys/sys/taskqueue.h Thu Nov 28 16:36:03 2013 (r258712) >> +++ head/sys/sys/taskqueue.h Thu Nov 28 18:56:34 2013 (r258713) >> @@ -81,6 +81,7 @@ int taskqueue_cancel_timeout(struct task >> void taskqueue_drain(struct taskqueue *queue, struct task *task); >> void taskqueue_drain_timeout(struct taskqueue *queue, >> struct timeout_task *timeout_task); >> +void taskqueue_drain_all(struct taskqueue *queue); >> void taskqueue_free(struct taskqueue *queue); >> void taskqueue_run(struct taskqueue *queue); >> void taskqueue_block(struct taskqueue *queue); >> > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 12:55:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91EAE649; Sat, 30 Nov 2013 12:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE18A1101; Sat, 30 Nov 2013 12:51:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUCpJAD041956; Sat, 30 Nov 2013 12:51:19 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUCpJ8Z041954; Sat, 30 Nov 2013 12:51:19 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311301251.rAUCpJ8Z041954@svn.freebsd.org> From: Michael Tuexen Date: Sat, 30 Nov 2013 12:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258765 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 12:55:34 -0000 Author: tuexen Date: Sat Nov 30 12:51:19 2013 New Revision: 258765 URL: http://svnweb.freebsd.org/changeset/base/258765 Log: In http://svnweb.freebsd.org/changeset/base/258221 I introduced a bug which initialized global locks whenever the SCTP stack initialized. This was fixed in http://svnweb.freebsd.org/changeset/base/258574 by rodrigc@. He just initialized the locks for the default vnet. This fix reverts to the old behaviour before r258221, which explicitly makes sure it is only called once, because this works also on other platforms. MFC after: 3 days X-MFC with: r258574. Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sat Nov 30 08:49:52 2013 (r258764) +++ head/sys/netinet/sctp_bsd_addr.c Sat Nov 30 12:51:19 2013 (r258765) @@ -100,6 +100,9 @@ sctp_startup_iterator(void) /* You only get one */ return; } + /* Initialize global locks here, thus only once. */ + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); kproc_create(sctp_iterator_thread, (void *)NULL, Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Nov 30 08:49:52 2013 (r258764) +++ head/sys/netinet/sctp_pcb.c Sat Nov 30 12:51:19 2013 (r258765) @@ -5864,14 +5864,6 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - /* - * Only initialize non-VNET global mutexes for the - * default instance. - */ - if (IS_DEFAULT_VNET(curvnet)) { - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); - } sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 15:08:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 982406C4; Sat, 30 Nov 2013 15:08:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6751618BA; Sat, 30 Nov 2013 15:08:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUF8db2087095; Sat, 30 Nov 2013 15:08:39 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUF8Ziw087070; Sat, 30 Nov 2013 15:08:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311301508.rAUF8Ziw087070@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 30 Nov 2013 15:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258768 - in head: lib/libc/sys share/man/man4 sys/amd64/conf sys/conf sys/i386/conf sys/ia64/conf sys/kern sys/pc98/conf sys/powerpc/conf sys/sparc64/conf usr.sbin/rwhod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 15:08:39 -0000 Author: pjd Date: Sat Nov 30 15:08:35 2013 New Revision: 258768 URL: http://svnweb.freebsd.org/changeset/base/258768 Log: Make process descriptors standard part of the kernel. rwhod(8) already requires process descriptors to work and having PROCDESC in GENERIC seems not enough, especially that we hope to have more and more consumers in the base. MFC after: 3 days Modified: head/lib/libc/sys/pdfork.2 head/share/man/man4/capsicum.4 head/share/man/man4/procdesc.4 head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/kern/kern_descrip.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_sig.c head/sys/kern/sys_procdesc.c head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC head/usr.sbin/rwhod/rwhod.c Modified: head/lib/libc/sys/pdfork.2 ============================================================================== --- head/lib/libc/sys/pdfork.2 Sat Nov 30 14:39:56 2013 (r258767) +++ head/lib/libc/sys/pdfork.2 Sat Nov 30 15:08:35 2013 (r258768) @@ -125,12 +125,6 @@ is set; if the process is still alive an the last reference to the process descriptor, the process will be terminated with the signal .Dv SIGKILL . -.Pp -.Nm -and associated functions depend on -.Cd "options PROCDESC" -described in -.Xr procdesc 4 . .Sh RETURN VALUES .Fn pdfork returns a PID, 0 or -1, as Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Sat Nov 30 14:39:56 2013 (r258767) +++ head/share/man/man4/capsicum.4 Sat Nov 30 15:08:35 2013 (r258768) @@ -35,7 +35,6 @@ .Sh SYNOPSIS .Cd "options CAPABILITY_MODE" .Cd "options CAPABILITIES" -.Cd "options PROCDESC" .Sh DESCRIPTION .Nm is a lightweight OS capability and sandbox framework implementing a hybrid Modified: head/share/man/man4/procdesc.4 ============================================================================== --- head/share/man/man4/procdesc.4 Sat Nov 30 14:39:56 2013 (r258767) +++ head/share/man/man4/procdesc.4 Sat Nov 30 15:08:35 2013 (r258768) @@ -35,8 +35,6 @@ .Sh NAME .Nm procdesc .Nd process descriptor facility -.Sh SYNOPSIS -.Cd "options PROCDESC" .Sh DESCRIPTION .Nm is a file-descriptor-oriented interface to process signalling and control, Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/amd64/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -66,7 +66,6 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities -options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/conf/NOTES Sat Nov 30 15:08:35 2013 (r258768) @@ -1167,9 +1167,6 @@ options MAC_TEST options CAPABILITIES # fine-grained rights on file descriptors options CAPABILITY_MODE # sandboxes with no global namespace access -# Support for process descriptors -options PROCDESC - ##################################################################### # CLOCK OPTIONS Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/conf/options Sat Nov 30 15:08:35 2013 (r258768) @@ -165,7 +165,6 @@ PPC_DEBUG opt_ppc.h PPC_PROBE_CHIPSET opt_ppc.h PPS_SYNC opt_ntp.h PREEMPTION opt_sched.h -PROCDESC opt_procdesc.h QUOTA SCHED_4BSD opt_sched.h SCHED_STATS opt_sched.h Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/i386/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -67,7 +67,6 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities -options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/ia64/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -46,7 +46,6 @@ options NFS_ROOT # NFS usable as root d options P1003_1B_SEMAPHORES # POSIX-style semaphores options PREEMPTION # Enable kernel thread preemption options PRINTF_BUFR_SIZE=128 # Printf buffering to limit interspersion -options PROCDESC # Support for process descriptors options PROCFS # Process filesystem (/proc) options PSEUDOFS # Pseudo-filesystem framework options SCHED_ULE # ULE scheduler Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/kern/kern_descrip.c Sat Nov 30 15:08:35 2013 (r258768) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ddb.h" #include "opt_ktrace.h" -#include "opt_procdesc.h" #include #include @@ -3115,11 +3114,9 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE tp = fp->f_data; break; -#ifdef PROCDESC case DTYPE_PROCDESC: kif->kf_type = KF_TYPE_PROCDESC; break; -#endif default: kif->kf_type = KF_TYPE_UNKNOWN; @@ -3485,12 +3482,10 @@ kern_proc_filedesc_out(struct proc *p, data = fp->f_data; break; -#ifdef PROCDESC case DTYPE_PROCDESC: type = KF_TYPE_PROCDESC; data = fp->f_data; break; -#endif default: type = KF_TYPE_UNKNOWN; Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/kern/kern_exit.c Sat Nov 30 15:08:35 2013 (r258768) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ktrace.h" -#include "opt_procdesc.h" #include #include @@ -500,9 +499,7 @@ exit1(struct thread *td, int rv) * procdesc_exit() to serialize concurrent calls to close() and * exit(). */ -#ifdef PROCDESC if (p->p_procdesc == NULL || procdesc_exit(p)) { -#endif /* * Notify parent that we're gone. If parent has the * PS_NOCLDWAIT flag set, or if the handler is set to SIG_IGN, @@ -539,10 +536,8 @@ exit1(struct thread *td, int rv) else /* LINUX thread */ kern_psignal(p->p_pptr, p->p_sigparent); } -#ifdef PROCDESC } else PROC_LOCK(p->p_pptr); -#endif sx_xunlock(&proctree_lock); /* @@ -807,10 +802,8 @@ proc_reap(struct thread *td, struct proc clear_orphan(p); PROC_UNLOCK(p); leavepgrp(p); -#ifdef PROCDESC if (p->p_procdesc != NULL) procdesc_reap(p); -#endif sx_xunlock(&proctree_lock); /* Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/kern/kern_fork.c Sat Nov 30 15:08:35 2013 (r258768) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" #include "opt_kstack_pages.h" -#include "opt_procdesc.h" #include #include @@ -118,7 +117,6 @@ sys_pdfork(td, uap) struct thread *td; struct pdfork_args *uap; { -#ifdef PROCDESC int error, fd; struct proc *p2; @@ -135,9 +133,6 @@ sys_pdfork(td, uap) error = copyout(&fd, uap->fdp, sizeof(fd)); } return (error); -#else - return (ENOSYS); -#endif } /* ARGSUSED */ @@ -655,7 +650,6 @@ do_fork(struct thread *td, int flags, st p2->p_vmspace->vm_ssize); } -#ifdef PROCDESC /* * Associate the process descriptor with the process before anything * can happen that might cause that process to need the descriptor. @@ -663,7 +657,6 @@ do_fork(struct thread *td, int flags, st */ if (flags & RFPROCDESC) procdesc_new(p2, pdflags); -#endif /* * Both processes are set up, now check if any loadable modules want @@ -758,9 +751,7 @@ fork1(struct thread *td, int flags, int int error; static int curfail; static struct timeval lastfail; -#ifdef PROCDESC struct file *fp_procdesc = NULL; -#endif /* Check for the undefined or unimplemented flags. */ if ((flags & ~(RFFLAGS | RFTSIGFLAGS(RFTSIGMASK))) != 0) @@ -778,7 +769,6 @@ fork1(struct thread *td, int flags, int if ((flags & RFTSIGZMB) != 0 && (u_int)RFTSIGNUM(flags) > _SIG_MAXSIG) return (EINVAL); -#ifdef PROCDESC if ((flags & RFPROCDESC) != 0) { /* Can't not create a process yet get a process descriptor. */ if ((flags & RFPROC) == 0) @@ -788,7 +778,6 @@ fork1(struct thread *td, int flags, int if (procdescp == NULL) return (EINVAL); } -#endif p1 = td->td_proc; @@ -801,7 +790,6 @@ fork1(struct thread *td, int flags, int return (fork_norfproc(td, flags)); } -#ifdef PROCDESC /* * If required, create a process descriptor in the parent first; we * will abandon it if something goes wrong. We don't finit() until @@ -812,7 +800,6 @@ fork1(struct thread *td, int flags, int if (error != 0) return (error); } -#endif mem_charged = 0; vm2 = NULL; @@ -919,12 +906,10 @@ fork1(struct thread *td, int flags, int * Return child proc pointer to parent. */ *procp = newproc; -#ifdef PROCDESC if (flags & RFPROCDESC) { procdesc_finit(newproc->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); } -#endif racct_proc_fork_done(newproc); return (0); } @@ -944,12 +929,10 @@ fail1: if (vm2 != NULL) vmspace_free(vm2); uma_zfree(proc_zone, newproc); -#ifdef PROCDESC if ((flags & RFPROCDESC) != 0 && fp_procdesc != NULL) { fdclose(td->td_proc->p_fd, fp_procdesc, *procdescp, td); fdrop(fp_procdesc, td); } -#endif pause("fork", hz / 2); return (error); } Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/kern/kern_sig.c Sat Nov 30 15:08:35 2013 (r258768) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" #include "opt_ktrace.h" #include "opt_core.h" -#include "opt_procdesc.h" #include #include @@ -1723,7 +1722,6 @@ sys_pdkill(td, uap) struct thread *td; struct pdkill_args *uap; { -#ifdef PROCDESC struct proc *p; cap_rights_t rights; int error; @@ -1743,9 +1741,6 @@ sys_pdkill(td, uap) kern_psignal(p, uap->signum); PROC_UNLOCK(p); return (error); -#else - return (ENOSYS); -#endif } #if defined(COMPAT_43) Modified: head/sys/kern/sys_procdesc.c ============================================================================== --- head/sys/kern/sys_procdesc.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/kern/sys_procdesc.c Sat Nov 30 15:08:35 2013 (r258768) @@ -61,8 +61,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_procdesc.h" - #include #include #include @@ -85,8 +83,6 @@ __FBSDID("$FreeBSD$"); #include -#ifdef PROCDESC - FEATURE(process_descriptors, "Process Descriptors"); static uma_zone_t procdesc_zone; @@ -522,14 +518,3 @@ procdesc_chown(struct file *fp, uid_t ui return (EOPNOTSUPP); } - -#else /* !PROCDESC */ - -int -sys_pdgetpid(struct thread *td, struct pdgetpid_args *uap) -{ - - return (ENOSYS); -} - -#endif /* PROCDESC */ Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/pc98/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -65,7 +65,6 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities -options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel options KDB # Kernel debugger related code Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/powerpc/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -70,7 +70,6 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities -options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sat Nov 30 14:39:56 2013 (r258767) +++ head/sys/sparc64/conf/GENERIC Sat Nov 30 15:08:35 2013 (r258768) @@ -63,7 +63,6 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options CAPABILITY_MODE # Capsicum capability mode options CAPABILITIES # Capsicum capabilities -options PROCDESC # Support for process descriptors options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Sat Nov 30 14:39:56 2013 (r258767) +++ head/usr.sbin/rwhod/rwhod.c Sat Nov 30 15:08:35 2013 (r258768) @@ -281,7 +281,7 @@ main(int argc, char *argv[]) } else if (pid_child_receiver == -1) { if (errno == ENOSYS) { syslog(LOG_ERR, - "The pdfork(2) system call is not available; recompile the kernel with options PROCDESC"); + "The pdfork(2) system call is not available - kernel too old."); } else { syslog(LOG_ERR, "pdfork: %m"); } From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 17:07:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C807B1A0; Sat, 30 Nov 2013 17:07:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B57041D6F; Sat, 30 Nov 2013 17:07:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUH7rNS028330; Sat, 30 Nov 2013 17:07:53 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUH7rRa028329; Sat, 30 Nov 2013 17:07:53 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311301707.rAUH7rRa028329@svn.freebsd.org> From: Hiroki Sato Date: Sat, 30 Nov 2013 17:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258770 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:07:53 -0000 Author: hrs Date: Sat Nov 30 17:07:53 2013 New Revision: 258770 URL: http://svnweb.freebsd.org/changeset/base/258770 Log: Add NOPKG to disable pkg-stage. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Sat Nov 30 16:26:04 2013 (r258769) +++ head/release/Makefile Sat Nov 30 17:07:53 2013 (r258770) @@ -16,6 +16,7 @@ # (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # DOCDIR: location of doc tree (default: /usr/doc) +# NOPKG: if set, do not distribute third-party packages # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation @@ -212,7 +213,7 @@ packagesystem: base.txz kernel.txz ${EXT touch ${.TARGET} pkg-stage: -.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf)) +.if !defined(NOPKG) && exists(${.CURDIR}/${TARGET}/pkg-stage.conf) sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \ ${REVISION} .endif From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 17:16:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFDFE3E7; Sat, 30 Nov 2013 17:16:01 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1FD51DCD; Sat, 30 Nov 2013 17:16:01 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 67BCA18386; Sat, 30 Nov 2013 17:15:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 67BCA18386 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 30 Nov 2013 12:15:57 -0500 From: Glen Barber To: Hiroki Sato Subject: Re: svn commit: r258770 - head/release Message-ID: <20131130171557.GI31807@glenbarber.us> References: <201311301707.rAUH7rRa028329@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5mZBmBd1ZkdwT1ny" Content-Disposition: inline In-Reply-To: <201311301707.rAUH7rRa028329@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:16:02 -0000 --5mZBmBd1ZkdwT1ny Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 30, 2013 at 05:07:53PM +0000, Hiroki Sato wrote: > Author: hrs > Date: Sat Nov 30 17:07:53 2013 > New Revision: 258770 > URL: http://svnweb.freebsd.org/changeset/base/258770 >=20 > Log: > Add NOPKG to disable pkg-stage. >=20 > Modified: > head/release/Makefile >=20 > Modified: head/release/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/release/Makefile Sat Nov 30 16:26:04 2013 (r258769) > +++ head/release/Makefile Sat Nov 30 17:07:53 2013 (r258770) > @@ -16,6 +16,7 @@ > # (by default, the directory above this one)=20 > # PORTSDIR: location of ports tree to distribute (default: /usr/ports) > # DOCDIR: location of doc tree (default: /usr/doc) > +# NOPKG: if set, do not distribute third-party packages > # NOPORTS: if set, do not distribute ports tree > # NOSRC: if set, do not distribute source tree > # NODOC: if set, do not generate release documentation > @@ -212,7 +213,7 @@ packagesystem: base.txz kernel.txz ${EXT > touch ${.TARGET} > =20 > pkg-stage: > -.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf)) > +.if !defined(NOPKG) && exists(${.CURDIR}/${TARGET}/pkg-stage.conf) > sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \ > ${REVISION} > .endif pkg-stage is not (or should not) be called by itself. It is used by the 'dvdrom' target. Is the intent here to disable package fetching while still creating the dvdrom? Glen --5mZBmBd1ZkdwT1ny Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSmh1NAAoJELls3eqvi17QUPEP/3xt2UybPLNNblOykaDu3nAP +VyTgZvnRhZd0+qt0phIsyc0FL0jP5PtAZ3X+2Lu6+pewcBC3fut/QNtdWeIgCe8 SEkqRr0feNMZJSCeOOLNQSdPc4dzzyx0F6uu5Greahr2Mcze7aqwr9PUkRVWjMrR DkFacYrGYKgQggpkqLP3w50v/RarH6x7FgiKd+0+rsFniZf2OP7T1dEesVd0xzLo U+W+TS0MDrbIVGBFAG+/UPFzZuztU4ZE9TLFL1au6D452OtgldZXlvTdWTwZ02r9 QiwTHd0hzoMHzqBFvRPTf8MBP7um/1zvvI8P7+NbYEqDOAlSRmpkO9cLLn5wwFZd i6cg1Igh2Oz206fdsuUVvZ4UiSdrf8ZTcZ31eNyE+qnzkM2emEGzu/+cFT5xtZe7 dd1t4TNRzMo7mTADnXqIKtUrgljYBHu4mTrGJo4FbPeVSuRpMxT6MVpgKKrwdhhM T1kvQSYVTaaFHhVACNgDL8fTWCwaX41OKu1kNkq63zavKVlrUVbT0TkJqHQ8l9ZO AD3iOUZxZDjJdTlaxK9TWF0wm18xi6K5ENH3RvVvTpVk+56kVzFotP2nwdy7Jvmh XggfQCxtjlMwbjmeRsrwKCBJWYeIFNnXCy05NFC0u7t4q5ig6P/IMim9ngi3lNiN Ye8a2uc5dQ2nB1XEH9nf =abbM -----END PGP SIGNATURE----- --5mZBmBd1ZkdwT1ny-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 17:25:13 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A49F9730; Sat, 30 Nov 2013 17:25:13 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 970651E2F; Sat, 30 Nov 2013 17:25:12 +0000 (UTC) Received: from alph.d.allbsd.org (p4181-ipbf1307funabasi.chiba.ocn.ne.jp [123.225.173.181]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id rAUHOsHT081460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Dec 2013 02:25:05 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.7/8.14.5) with ESMTP id rAUHOqq2015534; Sun, 1 Dec 2013 02:24:54 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 01 Dec 2013 02:23:29 +0900 (JST) Message-Id: <20131201.022329.1080929305911200460.hrs@allbsd.org> To: gjb@FreeBSD.org Subject: Re: svn commit: r258770 - head/release From: Hiroki Sato In-Reply-To: <20131130171557.GI31807@glenbarber.us> References: <201311301707.rAUH7rRa028329@svn.freebsd.org> <20131130171557.GI31807@glenbarber.us> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Dec__1_02_23_29_2013_839)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sun, 01 Dec 2013 02:25:05 +0900 (JST) X-Spam-Status: No, score=-99.1 required=13.0 tests=CONTENT_TYPE_PRESENT, SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:25:13 -0000 ----Security_Multipart(Sun_Dec__1_02_23_29_2013_839)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Glen Barber wrote in <20131130171557.GI31807@glenbarber.us>: gj> On Sat, Nov 30, 2013 at 05:07:53PM +0000, Hiroki Sato wrote: gj> > Author: hrs gj> > Date: Sat Nov 30 17:07:53 2013 gj> > New Revision: 258770 gj> > URL: http://svnweb.freebsd.org/changeset/base/258770 gj> > gj> > Log: gj> > Add NOPKG to disable pkg-stage. gj> > gj> > Modified: gj> > head/release/Makefile gj> > gj> > Modified: head/release/Makefile gj> > ============================================================================== gj> > --- head/release/Makefile Sat Nov 30 16:26:04 2013 (r258769) gj> > +++ head/release/Makefile Sat Nov 30 17:07:53 2013 (r258770) gj> > @@ -16,6 +16,7 @@ gj> > # (by default, the directory above this one) gj> > # PORTSDIR: location of ports tree to distribute (default: /usr/ports) gj> > # DOCDIR: location of doc tree (default: /usr/doc) gj> > +# NOPKG: if set, do not distribute third-party packages gj> > # NOPORTS: if set, do not distribute ports tree gj> > # NOSRC: if set, do not distribute source tree gj> > # NODOC: if set, do not generate release documentation gj> > @@ -212,7 +213,7 @@ packagesystem: base.txz kernel.txz ${EXT gj> > touch ${.TARGET} gj> > gj> > pkg-stage: gj> > -.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf)) gj> > +.if !defined(NOPKG) && exists(${.CURDIR}/${TARGET}/pkg-stage.conf) gj> > sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \ gj> > ${REVISION} gj> > .endif gj> gj> pkg-stage is not (or should not) be called by itself. It is used by gj> the 'dvdrom' target. Is the intent here to disable package fetching gj> while still creating the dvdrom? Yes. It allows checking if the dvdrom target works fine without fetching the packages. -- Hiroki ----Security_Multipart(Sun_Dec__1_02_23_29_2013_839)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlKaHxEACgkQTyzT2CeTzy1mNwCfUMdb6weoPGYspew9KlFh81A1 GN4AoKkzKHVzLbcsnYqYDfoqviqAGlbV =lpHi -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Dec__1_02_23_29_2013_839)---- From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 17:28:03 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 208B6AD6; Sat, 30 Nov 2013 17:28:03 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE9AD1E57; Sat, 30 Nov 2013 17:28:02 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 5378F18521; Sat, 30 Nov 2013 17:28:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 5378F18521 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 30 Nov 2013 12:27:59 -0500 From: Glen Barber To: Hiroki Sato Subject: Re: svn commit: r258770 - head/release Message-ID: <20131130172759.GJ31807@glenbarber.us> References: <201311301707.rAUH7rRa028329@svn.freebsd.org> <20131130171557.GI31807@glenbarber.us> <20131201.022329.1080929305911200460.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FnOKg9Ah4tDwTfQS" Content-Disposition: inline In-Reply-To: <20131201.022329.1080929305911200460.hrs@allbsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:28:03 -0000 --FnOKg9Ah4tDwTfQS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 01, 2013 at 02:23:29AM +0900, Hiroki Sato wrote: > Glen Barber wrote > in <20131130171557.GI31807@glenbarber.us>: >=20 > gj> On Sat, Nov 30, 2013 at 05:07:53PM +0000, Hiroki Sato wrote: > gj> > Author: hrs > gj> > Date: Sat Nov 30 17:07:53 2013 > gj> > New Revision: 258770 > gj> > URL: http://svnweb.freebsd.org/changeset/base/258770 > gj> > > gj> > Log: > gj> > Add NOPKG to disable pkg-stage. > gj> > > gj> > Modified: > gj> > head/release/Makefile > gj> > > gj> > Modified: head/release/Makefile > gj> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > gj> > --- head/release/Makefile Sat Nov 30 16:26:04 2013 (r258769) > gj> > +++ head/release/Makefile Sat Nov 30 17:07:53 2013 (r258770) > gj> > @@ -16,6 +16,7 @@ > gj> > # (by default, the directory above this one) > gj> > # PORTSDIR: location of ports tree to distribute (default: /usr/p= orts) > gj> > # DOCDIR: location of doc tree (default: /usr/doc) > gj> > +# NOPKG: if set, do not distribute third-party packages > gj> > # NOPORTS: if set, do not distribute ports tree > gj> > # NOSRC: if set, do not distribute source tree > gj> > # NODOC: if set, do not generate release documentation > gj> > @@ -212,7 +213,7 @@ packagesystem: base.txz kernel.txz ${EXT > gj> > touch ${.TARGET} > gj> > > gj> > pkg-stage: > gj> > -.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf)) > gj> > +.if !defined(NOPKG) && exists(${.CURDIR}/${TARGET}/pkg-stage.conf) > gj> > sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage= =2Econf \ > gj> > ${REVISION} > gj> > .endif > gj> > gj> pkg-stage is not (or should not) be called by itself. It is used by > gj> the 'dvdrom' target. Is the intent here to disable package fetching > gj> while still creating the dvdrom? >=20 > Yes. It allows checking if the dvdrom target works fine without > fetching the packages. >=20 Got it. Thanks. Glen --FnOKg9Ah4tDwTfQS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSmiAfAAoJELls3eqvi17QRLkQANJWz5IIoi9N273RSgCe9Lpc sOGg1nXY+HkJFnc0NfXS3SQ1VLwUB0GbsNlU8476i2Ej5L19gmEtsUAosGGGlStl YNu3S9SCgEjXIHjrsKnjwN8XraDFNQcy4iIhFjDEDBHtrrCNfwLAS07j9m/wtJrc yhWNdz8YywjKZ+HBKmB1U98O2R0NKy2K0g23fhc8B46Gl5fBay+jelZFqafdW3GC bEzG4WXGn7a9MjJavVDrVSV9EE7xOWFwSUXqmIyL65wJ2ngvf0wBNiN5YF2qNB2E W4012OumCKZhhEXFGYdL66FCyTV7wAm5rhNeW+6x7UTb/gvjwHdksZGKq7KIM3n7 URtoxvpCMyJHBFxH4ztD+9lK440k4h0vSf/m4l5IWrskQrAdZNnD2Gcigo+TeYv4 wr9HTrxpZGGV/QWO9Iznce5deviLzS4j18czj2FRwrhxjo13/7YxO5OmztI4G5oc CvIiCtgqjSJctNdCJVZX6Y8SxT102DQs88hZIId78IvHDBPbNOsBKmcDON8nQDAe 3sFxErdmWA6fjsRYpl5WGRAYVJuCdGixQQTTSvS8GdF3F8nRkFlV8e8xTOZH3mWL 7mpJSqHRL6VudpoxDF6aI08RJf02QF9rpFoWORIg79uCLo0WzXKUjWU4l4S7w7yi 7XsEqk1ZtVjIoG6XPZ9p =CsKQ -----END PGP SIGNATURE----- --FnOKg9Ah4tDwTfQS-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 21:27:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3D9452E; Sat, 30 Nov 2013 21:27:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FDDE1ABD; Sat, 30 Nov 2013 21:27:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAULRDdP020376; Sat, 30 Nov 2013 21:27:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAULRCUC020365; Sat, 30 Nov 2013 21:27:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201311302127.rAULRCUC020365@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 30 Nov 2013 21:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258776 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 21:27:13 -0000 Author: jilles Date: Sat Nov 30 21:27:11 2013 New Revision: 258776 URL: http://svnweb.freebsd.org/changeset/base/258776 Log: sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro. Modified: head/bin/sh/cd.c head/bin/sh/exec.c head/bin/sh/expand.c head/bin/sh/memalloc.c head/bin/sh/mystring.c head/bin/sh/mystring.h head/bin/sh/show.c head/bin/sh/var.c Modified: head/bin/sh/cd.c ============================================================================== --- head/bin/sh/cd.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/cd.c Sat Nov 30 21:27:11 2013 (r258776) @@ -182,6 +182,7 @@ cdlogical(char *dest) struct stat statb; int first; int badstat; + size_t len; /* * Check each component of the path. If we find a symlink or @@ -189,8 +190,9 @@ cdlogical(char *dest) * next time we get the value of the current directory. */ badstat = 0; - cdcomppath = stalloc(strlen(dest) + 1); - scopy(dest, cdcomppath); + len = strlen(dest); + cdcomppath = stalloc(len + 1); + memcpy(cdcomppath, dest, len + 1); STARTSTACKSTR(p); if (*dest == '/') { STPUTC('/', p); @@ -275,6 +277,7 @@ findcwd(char *dir) { char *new; char *p; + size_t len; /* * If our argument is NULL, we don't know the current directory @@ -283,8 +286,9 @@ findcwd(char *dir) */ if (dir == NULL || curdir == NULL) return getpwd2(); - cdcomppath = stalloc(strlen(dir) + 1); - scopy(dir, cdcomppath); + len = strlen(dir); + cdcomppath = stalloc(len + 1); + memcpy(cdcomppath, dir, len + 1); STARTSTACKSTR(new); if (*dir != '/') { STPUTS(curdir, new); Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/exec.c Sat Nov 30 21:27:11 2013 (r258776) @@ -187,14 +187,15 @@ padvance(const char **path, const char * { const char *p, *start; char *q; - size_t len; + size_t len, namelen; if (*path == NULL) return NULL; start = *path; for (p = start; *p && *p != ':' && *p != '%'; p++) ; /* nothing */ - len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ + namelen = strlen(name); + len = p - start + namelen + 2; /* "2" is for '/' and '\0' */ STARTSTACKSTR(q); CHECKSTRSPACE(len, q); if (p != start) { @@ -202,7 +203,7 @@ padvance(const char **path, const char * q += p - start; *q++ = '/'; } - strcpy(q, name); + memcpy(q, name, namelen + 1); pathopt = NULL; if (*p == '%') { pathopt = ++p; @@ -527,6 +528,7 @@ cmdlookup(const char *name, int add) const char *p; struct tblentry *cmdp; struct tblentry **pp; + size_t len; p = name; hashval = *p << 4; @@ -541,11 +543,11 @@ cmdlookup(const char *name, int add) } if (add && cmdp == NULL) { INTOFF; - cmdp = *pp = ckmalloc(sizeof (struct tblentry) - + strlen(name) + 1); + len = strlen(name); + cmdp = *pp = ckmalloc(sizeof (struct tblentry) + len + 1); cmdp->next = NULL; cmdp->cmdtype = CMDUNKNOWN; - strcpy(cmdp->cmdname, name); + memcpy(cmdp->cmdname, name, len + 1); INTON; } lastcmdentry = pp; Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/expand.c Sat Nov 30 21:27:11 2013 (r258776) @@ -1307,9 +1307,11 @@ addfname(char *name) { char *p; struct strlist *sp; + size_t len; - p = stalloc(strlen(name) + 1); - scopy(name, p); + len = strlen(name); + p = stalloc(len + 1); + memcpy(p, name, len + 1); sp = (struct strlist *)stalloc(sizeof *sp); sp->text = p; *exparg.lastp = sp; Modified: head/bin/sh/memalloc.c ============================================================================== --- head/bin/sh/memalloc.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/memalloc.c Sat Nov 30 21:27:11 2013 (r258776) @@ -98,9 +98,11 @@ char * savestr(const char *s) { char *p; + size_t len; - p = ckmalloc(strlen(s) + 1); - scopy(s, p); + len = strlen(s); + p = ckmalloc(len + 1); + memcpy(p, s, len + 1); return p; } Modified: head/bin/sh/mystring.c ============================================================================== --- head/bin/sh/mystring.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/mystring.c Sat Nov 30 21:27:11 2013 (r258776) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); * String functions. * * equal(s1, s2) Return true if strings are equal. - * scopy(from, to) Copy a string. * number(s) Convert a string of digits to an integer. * is_number(s) Return true if s is a string of digits. */ @@ -60,10 +59,6 @@ char nullstr[1]; /* zero length string * equal - #defined in mystring.h */ -/* - * scopy - #defined in mystring.h - */ - /* * prefix -- see if pfx is a prefix of string. Modified: head/bin/sh/mystring.h ============================================================================== --- head/bin/sh/mystring.h Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/mystring.h Sat Nov 30 21:27:11 2013 (r258776) @@ -40,4 +40,3 @@ int number(const char *); int is_number(const char *); #define equal(s1, s2) (strcmp(s1, s2) == 0) -#define scopy(s1, s2) ((void)strcpy(s2, s1)) Modified: head/bin/sh/show.c ============================================================================== --- head/bin/sh/show.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/show.c Sat Nov 30 21:27:11 2013 (r258776) @@ -390,11 +390,11 @@ opentrace(void) else p = "/tmp"; } - scopy(p, s); + strcpy(s, p); strcat(s, "/trace"); } #else - scopy("./trace", s); + strcpy(s, "./trace"); #endif /* not_this_way */ if ((tracefile = fopen(s, "a")) == NULL) { fprintf(stderr, "Can't open %s: %s\n", s, strerror(errno)); Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Nov 30 19:39:17 2013 (r258775) +++ head/bin/sh/var.c Sat Nov 30 21:27:11 2013 (r258776) @@ -224,8 +224,9 @@ void setvar(const char *name, const char *val, int flags) { const char *p; - int len; - int namelen; + size_t len; + size_t namelen; + size_t vallen; char *nameeq; int isbad; @@ -244,18 +245,20 @@ setvar(const char *name, const char *val } namelen = p - name; if (isbad) - error("%.*s: bad variable name", namelen, name); + error("%.*s: bad variable name", (int)namelen, name); len = namelen + 2; /* 2 is space for '=' and '\0' */ if (val == NULL) { flags |= VUNSET; + vallen = 0; } else { - len += strlen(val); + vallen = strlen(val); + len += vallen; } nameeq = ckmalloc(len); memcpy(nameeq, name, namelen); nameeq[namelen] = '='; if (val) - scopy(val, nameeq + namelen + 1); + memcpy(nameeq + namelen + 1, val, vallen + 1); else nameeq[namelen + 1] = '\0'; setvareq(nameeq, flags); From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 21:54:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A59B29C; Sat, 30 Nov 2013 21:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EAC1B1C84; Sat, 30 Nov 2013 21:54:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAULstpL029839; Sat, 30 Nov 2013 21:54:55 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAULstew029838; Sat, 30 Nov 2013 21:54:55 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201311302154.rAULstew029838@svn.freebsd.org> From: Andreas Tobler Date: Sat, 30 Nov 2013 21:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258778 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 21:54:56 -0000 Author: andreast Date: Sat Nov 30 21:54:55 2013 New Revision: 258778 URL: http://svnweb.freebsd.org/changeset/base/258778 Log: Add a printf to inform about the logical memory block size which is in use by the system. This might give a hint why a pSeries system is not booting. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sat Nov 30 21:29:34 2013 (r258777) +++ head/sys/powerpc/ofw/ofw_machdep.c Sat Nov 30 21:54:55 2013 (r258778) @@ -309,6 +309,7 @@ parse_drconf_memory(int *msz, int *asz, res = OF_getprop(phandle, "ibm,lmb-size", lmb_size, sizeof(lmb_size)); if (res == -1) return (0); + printf("Logical Memory Block size: %d MB\n", lmb_size[1] >> 20); /* Parse the /ibm,dynamic-memory. The first position gives the # of entries. The next two words From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 22:16:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98F8A9F2; Sat, 30 Nov 2013 22:16:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 795BE1D8A; Sat, 30 Nov 2013 22:16:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUMGdxX037278; Sat, 30 Nov 2013 22:16:39 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUMGcPA037268; Sat, 30 Nov 2013 22:16:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311302216.rAUMGcPA037268@svn.freebsd.org> From: Eitan Adler Date: Sat, 30 Nov 2013 22:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258779 - in head/sys/dev: cesa drm drm2/i915 drm2/radeon hatm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 22:16:39 -0000 Author: eadler Date: Sat Nov 30 22:16:37 2013 New Revision: 258779 URL: http://svnweb.freebsd.org/changeset/base/258779 Log: Similar to the (1 << 31) case it is not defined to do (2 << 30). Modified: head/sys/dev/cesa/cesa.h head/sys/dev/drm/radeon_drv.h head/sys/dev/drm2/i915/i915_reg.h head/sys/dev/drm2/radeon/r600_blit.c head/sys/dev/drm2/radeon/radeon_drv.h head/sys/dev/drm2/radeon/radeon_reg.h head/sys/dev/hatm/if_hatmreg.h Modified: head/sys/dev/cesa/cesa.h ============================================================================== --- head/sys/dev/cesa/cesa.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/cesa/cesa.h Sat Nov 30 22:16:37 2013 (r258779) @@ -297,8 +297,8 @@ struct cesa_chain_info { #define CESA_CSH_AES_KLEN_MASK (3 << 24) #define CESA_CSHD_FRAG_FIRST (1 << 30) -#define CESA_CSHD_FRAG_LAST (2 << 30) -#define CESA_CSHD_FRAG_MIDDLE (3 << 30) +#define CESA_CSHD_FRAG_LAST (2U << 30) +#define CESA_CSHD_FRAG_MIDDLE (3U << 30) /* CESA registers definitions */ #define CESA_ICR 0xDE20 Modified: head/sys/dev/drm/radeon_drv.h ============================================================================== --- head/sys/dev/drm/radeon_drv.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/drm/radeon_drv.h Sat Nov 30 22:16:37 2013 (r258779) @@ -807,8 +807,8 @@ extern int r600_cs_init(struct drm_devic #define RADEON_DST_PITCH_OFFSET_C 0x1c80 # define RADEON_DST_TILE_LINEAR (0 << 30) # define RADEON_DST_TILE_MACRO (1 << 30) -# define RADEON_DST_TILE_MICRO (2 << 30) -# define RADEON_DST_TILE_BOTH (3 << 30) +# define RADEON_DST_TILE_MICRO (2U << 30) +# define RADEON_DST_TILE_BOTH (3U << 30) #define RADEON_SCRATCH_REG0 0x15e0 #define RADEON_SCRATCH_REG1 0x15e4 Modified: head/sys/dev/drm2/i915/i915_reg.h ============================================================================== --- head/sys/dev/drm2/i915/i915_reg.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/drm2/i915/i915_reg.h Sat Nov 30 22:16:37 2013 (r258779) @@ -3611,8 +3611,8 @@ __FBSDID("$FreeBSD$"); #define PANEL_PORT_SELECT_LVDS (0 << 30) #define PANEL_PORT_SELECT_DPA (1 << 30) #define EDP_PANEL (1 << 30) -#define PANEL_PORT_SELECT_DPC (2 << 30) -#define PANEL_PORT_SELECT_DPD (3 << 30) +#define PANEL_PORT_SELECT_DPC (2U << 30) +#define PANEL_PORT_SELECT_DPD (3U << 30) #define PANEL_POWER_UP_DELAY_MASK (0x1fff0000) #define PANEL_POWER_UP_DELAY_SHIFT 16 #define PANEL_LIGHT_ON_DELAY_MASK (0x1fff) Modified: head/sys/dev/drm2/radeon/r600_blit.c ============================================================================== --- head/sys/dev/drm2/radeon/r600_blit.c Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/drm2/radeon/r600_blit.c Sat Nov 30 22:16:37 2013 (r258779) @@ -196,7 +196,7 @@ set_vtx_resource(drm_radeon_private_t *d sq_vtx_constant_word2 = (((gpu_addr >> 32) & 0xff) | (16 << 8)); #ifdef __BIG_ENDIAN - sq_vtx_constant_word2 |= (2 << 30); + sq_vtx_constant_word2 |= (2U << 30); #endif BEGIN_RING(9); Modified: head/sys/dev/drm2/radeon/radeon_drv.h ============================================================================== --- head/sys/dev/drm2/radeon/radeon_drv.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/drm2/radeon/radeon_drv.h Sat Nov 30 22:16:37 2013 (r258779) @@ -720,8 +720,8 @@ void radeon_unregister_atpx_handler(void #define RADEON_DST_PITCH_OFFSET_C 0x1c80 # define RADEON_DST_TILE_LINEAR (0 << 30) # define RADEON_DST_TILE_MACRO (1 << 30) -# define RADEON_DST_TILE_MICRO (2 << 30) -# define RADEON_DST_TILE_BOTH (3 << 30) +# define RADEON_DST_TILE_MICRO (2U << 30) +# define RADEON_DST_TILE_BOTH (3U << 30) #define RADEON_SCRATCH_REG0 0x15e0 #define RADEON_SCRATCH_REG1 0x15e4 Modified: head/sys/dev/drm2/radeon/radeon_reg.h ============================================================================== --- head/sys/dev/drm2/radeon/radeon_reg.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/drm2/radeon/radeon_reg.h Sat Nov 30 22:16:37 2013 (r258779) @@ -854,8 +854,8 @@ __FBSDID("$FreeBSD$"); # define RADEON_PITCH_SHIFT 21 # define RADEON_DST_TILE_LINEAR (0 << 30) # define RADEON_DST_TILE_MACRO (1 << 30) -# define RADEON_DST_TILE_MICRO (2 << 30) -# define RADEON_DST_TILE_BOTH (3 << 30) +# define RADEON_DST_TILE_MICRO (2U << 30) +# define RADEON_DST_TILE_BOTH (3U << 30) #define RADEON_DST_WIDTH 0x140c #define RADEON_DST_WIDTH_HEIGHT 0x1598 #define RADEON_DST_WIDTH_X 0x1588 Modified: head/sys/dev/hatm/if_hatmreg.h ============================================================================== --- head/sys/dev/hatm/if_hatmreg.h Sat Nov 30 21:54:55 2013 (r258778) +++ head/sys/dev/hatm/if_hatmreg.h Sat Nov 30 22:16:37 2013 (r258779) @@ -294,7 +294,7 @@ #define HE_REGO_CON_DAT 0x807F8 #define HE_REGO_CON_CTL 0x807FC -#define HE_REGM_CON_MBOX (2 << 30) +#define HE_REGM_CON_MBOX (2U << 30) #define HE_REGM_CON_TCM (1 << 30) #define HE_REGM_CON_RCM (0 << 30) #define HE_REGM_CON_WE (1 << 29) From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 22:17:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 062B8B8C; Sat, 30 Nov 2013 22:17:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E26CB1D96; Sat, 30 Nov 2013 22:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUMHaJJ037487; Sat, 30 Nov 2013 22:17:36 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUMHR9h037420; Sat, 30 Nov 2013 22:17:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311302217.rAUMHR9h037420@svn.freebsd.org> From: Eitan Adler Date: Sat, 30 Nov 2013 22:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258780 - in head: lib/libc/sparc64/fpu lib/libc/xdr sys/amd64/pci sys/amd64/vmm/intel sys/arm/arm sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/econa sys/arm/freescale/imx sys/arm/free... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 22:17:37 -0000 Author: eadler Date: Sat Nov 30 22:17:27 2013 New Revision: 258780 URL: http://svnweb.freebsd.org/changeset/base/258780 Log: Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva Modified: head/lib/libc/sparc64/fpu/fpu.c head/lib/libc/sparc64/fpu/fpu_sqrt.c head/lib/libc/xdr/xdr_rec.c head/sys/amd64/pci/pci_cfgreg.c head/sys/amd64/vmm/intel/vmcs.h head/sys/amd64/vmm/intel/vmx_controls.h head/sys/amd64/vmm/intel/vtd.c head/sys/arm/arm/cpufunc_asm_pj4b.S head/sys/arm/arm/db_trace.c head/sys/arm/arm/pl190.c head/sys/arm/at91/if_macbvar.h head/sys/arm/broadcom/bcm2835/bcm2835_dma.c head/sys/arm/econa/if_ece.c head/sys/arm/freescale/imx/imx6_anatopreg.h head/sys/arm/freescale/imx/imx6_usbphy.c head/sys/arm/freescale/imx/imx_gptreg.h head/sys/arm/freescale/vybrid/vf_anadig.c head/sys/arm/freescale/vybrid/vf_ccm.c head/sys/arm/freescale/vybrid/vf_ehci.c head/sys/arm/include/armreg.h head/sys/arm/lpc/if_lpereg.h head/sys/arm/lpc/lpcreg.h head/sys/arm/mv/mv_pci.c head/sys/arm/samsung/exynos/ehci_exynos5.c head/sys/arm/xscale/i8134x/i81342reg.h head/sys/arm/xscale/ixp425/ixp425reg.h head/sys/boot/arm/at91/libat91/mci_device.h head/sys/boot/i386/libfirewire/fwohci.h head/sys/boot/i386/libfirewire/fwohcireg.h head/sys/dev/aac/aacvar.h head/sys/dev/acpica/acpi_video.c head/sys/dev/agp/agp_i810.c head/sys/dev/ahci/ahci.h head/sys/dev/bktr/bktr_core.c head/sys/dev/drm/i915_reg.h head/sys/dev/drm/mach64_drv.h head/sys/dev/drm/mga_drv.h head/sys/dev/drm/r128_drv.h head/sys/dev/drm/r300_reg.h head/sys/dev/drm/r600_blit.c head/sys/dev/drm/radeon_cp.c head/sys/dev/drm/radeon_drv.h head/sys/dev/drm/via_irq.c head/sys/dev/drm2/i915/i915_reg.h head/sys/dev/drm2/radeon/evergreen_blit_kms.c head/sys/dev/drm2/radeon/evergreen_cs.c head/sys/dev/drm2/radeon/evergreend.h head/sys/dev/drm2/radeon/nid.h head/sys/dev/drm2/radeon/r200.c head/sys/dev/drm2/radeon/r300.c head/sys/dev/drm2/radeon/r300_reg.h head/sys/dev/drm2/radeon/r500_reg.h head/sys/dev/drm2/radeon/r600_blit.c head/sys/dev/drm2/radeon/r600_blit_kms.c head/sys/dev/drm2/radeon/r600_cs.c head/sys/dev/drm2/radeon/r600d.h head/sys/dev/drm2/radeon/radeon_cp.c head/sys/dev/drm2/radeon/radeon_drv.h head/sys/dev/drm2/radeon/radeon_reg.h head/sys/dev/drm2/radeon/rv770d.h head/sys/dev/drm2/radeon/sid.h head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_ich8lan.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/etherswitch/arswitch/arswitchreg.h head/sys/dev/ffec/if_ffecreg.h head/sys/dev/firewire/firewire.c head/sys/dev/firewire/fwohci.c head/sys/dev/firewire/fwohcireg.h head/sys/dev/firewire/sbp.c head/sys/dev/firewire/sbp.h head/sys/dev/firewire/sbp_targ.c head/sys/dev/hatm/if_hatmreg.h head/sys/dev/hwpmc/hwpmc_piv.h head/sys/dev/iwn/if_iwnreg.h head/sys/dev/mge/if_mgevar.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/msk/if_mskreg.h head/sys/dev/mvs/mvs.h head/sys/dev/mxge/mxge_mcp.h head/sys/dev/qlxge/qls_dump.c head/sys/dev/ral/rt2560reg.h head/sys/dev/ral/rt2661reg.h head/sys/dev/ral/rt2860reg.h head/sys/dev/sound/pci/hda/hdaa.h head/sys/dev/usb/controller/ehci.h head/sys/dev/usb/wlan/if_rumreg.h head/sys/dev/usb/wlan/if_runreg.h head/sys/dev/usb/wlan/if_uralreg.h head/sys/dev/usb/wlan/if_urtwreg.h head/sys/dev/usb/wlan/if_zydreg.h head/sys/dev/wpi/if_wpireg.h head/sys/geom/raid/tr_raid1e.c head/sys/i386/pci/pci_cfgreg.c head/sys/mips/atheros/ar71xxreg.h head/sys/mips/atheros/ar934xreg.h head/sys/mips/atheros/if_argevar.h head/sys/mips/malta/gt_pci.c head/sys/mips/nlm/dev/net/nae.c head/sys/mips/nlm/xlp_machdep.c head/sys/mips/rmi/pic.h head/sys/ofed/drivers/infiniband/hw/mlx4/qp.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_mcg.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c head/sys/ofed/drivers/net/mlx4/mcg.c head/sys/powerpc/fpu/fpu_emu.c head/sys/powerpc/fpu/fpu_sqrt.c head/sys/powerpc/powermac/nvbl.c head/sys/sys/consio.h head/sys/x86/iommu/intel_reg.h head/usr.sbin/bluetooth/bthidd/kbd.c Modified: head/lib/libc/sparc64/fpu/fpu.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/lib/libc/sparc64/fpu/fpu.c Sat Nov 30 22:17:27 2013 (r258780) @@ -202,7 +202,7 @@ static const int opmask[] = {0, 0, 1, 3, * Implement a move operation for all supported operand types. The additional * nand and xor parameters will be applied to the upper 32 bit word of the * source operand. This allows to implement fabs and fneg (for fp operands - * only!) using this functions, too, by passing (1 << 31) for one of the + * only!) using this functions, too, by passing (1U << 31) for one of the * parameters, and 0 for the other. */ static void @@ -358,10 +358,10 @@ __fpu_execute(struct utrapframe *uf, str __fpu_mov(fe, type, rd, rs2, 0, 0); return (0); case FOP(INS2_FPop1, INSFP1_FNEG): - __fpu_mov(fe, type, rd, rs2, 0, (1 << 31)); + __fpu_mov(fe, type, rd, rs2, 0, (1U << 31)); return (0); case FOP(INS2_FPop1, INSFP1_FABS): - __fpu_mov(fe, type, rd, rs2, (1 << 31), 0); + __fpu_mov(fe, type, rd, rs2, (1U << 31), 0); return (0); case FOP(INS2_FPop1, INSFP1_FSQRT): __fpu_explode(fe, &fe->fe_f1, type, rs2); Modified: head/lib/libc/sparc64/fpu/fpu_sqrt.c ============================================================================== --- head/lib/libc/sparc64/fpu/fpu_sqrt.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/lib/libc/sparc64/fpu/fpu_sqrt.c Sat Nov 30 22:17:27 2013 (r258780) @@ -257,7 +257,7 @@ __fpu_sqrt(fe) * double x correctly while doing the `known q=1.0'. * * We do this one mantissa-word at a time, as noted above, to - * save work. To avoid `(1 << 31) << 1', we also do the top bit + * save work. To avoid `(1U << 31) << 1', we also do the top bit * outside of each per-word loop. * * The calculation `t = y + bit' breaks down into `t0 = y0, ..., Modified: head/lib/libc/xdr/xdr_rec.c ============================================================================== --- head/lib/libc/xdr/xdr_rec.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/lib/libc/xdr/xdr_rec.c Sat Nov 30 22:17:27 2013 (r258780) @@ -106,7 +106,7 @@ static const struct xdr_ops xdrrec_ops * meet the needs of xdr and rpc based on tcp. */ -#define LAST_FRAG ((u_int32_t)(1 << 31)) +#define LAST_FRAG ((u_int32_t)(1U << 31)) typedef struct rec_strm { char *tcp_handle; Modified: head/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- head/sys/amd64/pci/pci_cfgreg.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/amd64/pci/pci_cfgreg.c Sat Nov 30 22:17:27 2013 (r258780) @@ -184,7 +184,7 @@ pci_cfgenable(unsigned bus, unsigned slo if (bus <= PCI_BUSMAX && slot <= PCI_SLOTMAX && func <= PCI_FUNCMAX && (unsigned)reg <= PCI_REGMAX && bytes != 3 && (unsigned)bytes <= 4 && (reg & (bytes - 1)) == 0) { - outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) + outl(CONF1_ADDR_PORT, (1U << 31) | (bus << 16) | (slot << 11) | (func << 8) | (reg & ~0x03)); dataport = CONF1_DATA_PORT + (reg & 0x03); } Modified: head/sys/amd64/vmm/intel/vmcs.h ============================================================================== --- head/sys/amd64/vmm/intel/vmcs.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/amd64/vmm/intel/vmcs.h Sat Nov 30 22:17:27 2013 (r258780) @@ -318,7 +318,7 @@ uint64_t vmcs_read(uint32_t encoding); /* * VMCS IDT-Vectoring information fields */ -#define VMCS_IDT_VEC_VALID (1 << 31) +#define VMCS_IDT_VEC_VALID (1U << 31) #define VMCS_IDT_VEC_ERRCODE_VALID (1 << 11) /* Modified: head/sys/amd64/vmm/intel/vmx_controls.h ============================================================================== --- head/sys/amd64/vmm/intel/vmx_controls.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/amd64/vmm/intel/vmx_controls.h Sat Nov 30 22:17:27 2013 (r258780) @@ -56,7 +56,7 @@ #define PROCBASED_MSR_BITMAPS (1 << 28) #define PROCBASED_MONITOR_EXITING (1 << 29) #define PROCBASED_PAUSE_EXITING (1 << 30) -#define PROCBASED_SECONDARY_CONTROLS (1 << 31) +#define PROCBASED_SECONDARY_CONTROLS (1U << 31) /* Secondary Processor-Based VM-Execution Controls */ #define PROCBASED2_VIRTUALIZE_APIC (1 << 0) Modified: head/sys/amd64/vmm/intel/vtd.c ============================================================================== --- head/sys/amd64/vmm/intel/vtd.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/amd64/vmm/intel/vtd.c Sat Nov 30 22:17:27 2013 (r258780) @@ -73,11 +73,11 @@ struct vtdmap { #define VTD_GCR_WBF (1 << 27) #define VTD_GCR_SRTP (1 << 30) -#define VTD_GCR_TE (1 << 31) +#define VTD_GCR_TE (1U << 31) #define VTD_GSR_WBFS (1 << 27) #define VTD_GSR_RTPS (1 << 30) -#define VTD_GSR_TES (1 << 31) +#define VTD_GSR_TES (1U << 31) #define VTD_CCR_ICC (1UL << 63) /* invalidate context cache */ #define VTD_CCR_CIRG_GLOBAL (1UL << 61) /* global invalidation */ Modified: head/sys/arm/arm/cpufunc_asm_pj4b.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_pj4b.S Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/arm/cpufunc_asm_pj4b.S Sat Nov 30 22:17:27 2013 (r258780) @@ -105,7 +105,7 @@ ENTRY(pj4b_config) orr r0, r0, #(1 << 27) /* Critical word first sequencing disable */ orr r0, r0, #(1 << 29) /* Disable MO device read / write */ orr r0, r0, #(1 << 30) /* L1 cache strict round-robin replacement policy*/ - orr r0, r0, #(1 << 31) /* Enable write evict */ + orr r0, r0, #(1U << 31) /* Enable write evict */ mcr p15, 1, r0, c15, c1, 2 #if defined(SMP) /* Set SMP mode in Auxiliary Control Register */ Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/arm/db_trace.c Sat Nov 30 22:17:27 2013 (r258780) @@ -376,7 +376,7 @@ db_stack_trace_cmd(struct unwind_state * index = db_find_index(state->start_pc); if (index->insn != EXIDX_CANTUNWIND) { - if (index->insn & (1 << 31)) { + if (index->insn & (1U << 31)) { /* The data is within the instruction */ state->insn = &index->insn; } else { Modified: head/sys/arm/arm/pl190.c ============================================================================== --- head/sys/arm/arm/pl190.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/arm/pl190.c Sat Nov 30 22:17:27 2013 (r258780) @@ -113,7 +113,7 @@ pl190_intc_attach(device_t dev) /* Disable all interrupts */ intc_vic_write_4(VICINTENCLEAR, 0xffffffff); /* Enable INT31, SIC IRQ */ - intc_vic_write_4(VICINTENABLE, (1 << 31)); + intc_vic_write_4(VICINTENABLE, (1U << 31)); id = 0; for (i = 3; i >= 0; i--) { Modified: head/sys/arm/at91/if_macbvar.h ============================================================================== --- head/sys/arm/at91/if_macbvar.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/at91/if_macbvar.h Sat Nov 30 22:17:27 2013 (r258780) @@ -18,7 +18,7 @@ struct eth_tx_desc { uint32_t addr; uint32_t flags; -#define TD_OWN (1 << 31) +#define TD_OWN (1U << 31) #define TD_LAST (1 << 15) #define TD_WRAP_MASK (1 << 30) }; @@ -30,7 +30,7 @@ struct eth_rx_desc { #define RD_OWN 0x00000001 uint32_t flags; -#define RD_BROADCAST (1 << 31) +#define RD_BROADCAST (1U << 31) #define RD_MULTICAST (1 << 30) #define RD_UNICAST (1 << 29) #define RD_EXTERNAL (1 << 28) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Sat Nov 30 22:17:27 2013 (r258780) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #define CS_WAITWRT (1 << 28) #define CS_DISDBG (1 << 29) #define CS_ABORT (1 << 30) -#define CS_RESET (1 << 31) +#define CS_RESET (1U << 31) #define BCM_DMA_CBADDR(n) (0x100*(n) + 0x04) #define BCM_DMA_INFO(n) (0x100*(n) + 0x08) #define INFO_INT_EN (1 << 0) Modified: head/sys/arm/econa/if_ece.c ============================================================================== --- head/sys/arm/econa/if_ece.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/econa/if_ece.c Sat Nov 30 22:17:27 2013 (r258780) @@ -1243,7 +1243,7 @@ configure_cpu_port(struct ece_softc *sc) /* SA learning Disable */ cpu_port_config |= (SA_LEARNING_DISABLE); /* set data offset + 2 */ - cpu_port_config &= ~(1 << 31); + cpu_port_config &= ~(1U << 31); write_4(sc, CPU_PORT_CONFIG, cpu_port_config); Modified: head/sys/arm/freescale/imx/imx6_anatopreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatopreg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/imx/imx6_anatopreg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -37,7 +37,7 @@ #define IMX6_ANALOG_CCM_PLL_USB1_SET 0x014 #define IMX6_ANALOG_CCM_PLL_USB1_CLR 0x018 #define IMX6_ANALOG_CCM_PLL_USB1_TOG 0x01C -#define IMX6_ANALOG_CCM_PLL_USB_LOCK (1 << 31) +#define IMX6_ANALOG_CCM_PLL_USB_LOCK (1U << 31) #define IMX6_ANALOG_CCM_PLL_USB_BYPASS (1 << 16) #define IMX6_ANALOG_CCM_PLL_USB_ENABLE (1 << 13) #define IMX6_ANALOG_CCM_PLL_USB_POWER (1 << 12) Modified: head/sys/arm/freescale/imx/imx6_usbphy.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_usbphy.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/imx/imx6_usbphy.c Sat Nov 30 22:17:27 2013 (r258780) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #define CTRL_SET_REG 0x0034 #define CTRL_CLR_REG 0x0038 #define CTRL_TOGGLE_REG 0x003c -#define CTRL_SFTRST (1 << 31) +#define CTRL_SFTRST (1U << 31) #define CTRL_CLKGATE (1 << 30) #define CTRL_ENUTMILEVEL3 (1 << 15) #define CTRL_ENUTMILEVEL2 (1 << 14) Modified: head/sys/arm/freescale/imx/imx_gptreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx_gptreg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/imx/imx_gptreg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -32,7 +32,7 @@ /* Registers definition for Freescale i.MX515 Generic Periodic Timer */ #define IMX_GPT_CR 0x0000 /* Control Register R/W */ -#define GPT_CR_FO3 (1 << 31) +#define GPT_CR_FO3 (1U << 31) #define GPT_CR_FO2 (1 << 30) #define GPT_CR_FO1 (1 << 29) #define GPT_CR_OM3_SHIFT 26 Modified: head/sys/arm/freescale/vybrid/vf_anadig.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_anadig.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/vybrid/vf_anadig.c Sat Nov 30 22:17:27 2013 (r258780) @@ -90,7 +90,7 @@ __FBSDID("$FreeBSD$"); #define USB_LOOPBACK(n) (0x1E0 + 0x60 * n) #define USB_MISC(n) (0x1F0 + 0x60 * n) -#define ANADIG_PLL_LOCKED (1 << 31) +#define ANADIG_PLL_LOCKED (1U << 31) #define ENABLE_LINREG (1 << 0) #define EN_CLK_TO_UTMI (1 << 30) Modified: head/sys/arm/freescale/vybrid/vf_ccm.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_ccm.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/vybrid/vf_ccm.c Sat Nov 30 22:17:27 2013 (r258780) @@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$"); #define CCM_CPPDSR 0x88 /* PLL PFD Disable Status Register */ #define CCM_CCOWR 0x8C /* CORE Wakeup Register */ -#define PLL3_PFD4_EN (1 << 31) +#define PLL3_PFD4_EN (1U << 31) #define PLL3_PFD3_EN (1 << 30) #define PLL3_PFD2_EN (1 << 29) #define PLL3_PFD1_EN (1 << 28) Modified: head/sys/arm/freescale/vybrid/vf_ehci.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_ehci.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/freescale/vybrid/vf_ehci.c Sat Nov 30 22:17:27 2013 (r258780) @@ -105,7 +105,7 @@ __FBSDID("$FreeBSD$"); #define USBPHY_IP_CLR 0x98 /* PHY IP Block Register */ #define USBPHY_IP_TOG 0x9C /* PHY IP Block Register */ -#define USBPHY_CTRL_SFTRST (1 << 31) +#define USBPHY_CTRL_SFTRST (1U << 31) #define USBPHY_CTRL_CLKGATE (1 << 30) #define USBPHY_DEBUG_CLKGATE (1 << 30) Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/include/armreg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -360,7 +360,7 @@ #define CPU_CT_ARMV7 0x4 /* ARM v7 Cache type definitions */ -#define CPUV7_CT_CTYPE_WT (1 << 31) +#define CPUV7_CT_CTYPE_WT (1U << 31) #define CPUV7_CT_CTYPE_WB (1 << 30) #define CPUV7_CT_CTYPE_RA (1 << 29) #define CPUV7_CT_CTYPE_WA (1 << 28) Modified: head/sys/arm/lpc/if_lpereg.h ============================================================================== --- head/sys/arm/lpc/if_lpereg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/lpc/if_lpereg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -169,7 +169,7 @@ struct lpe_hwstatus { /* These are valid for both Rx and Tx descriptors */ #define LPE_HWDESC_SIZE_MASK (1 << 10) -#define LPE_HWDESC_INTERRUPT (1 << 31) +#define LPE_HWDESC_INTERRUPT (1U << 31) /* These are valid for Tx descriptors */ #define LPE_HWDESC_LAST (1 << 30) @@ -186,7 +186,7 @@ struct lpe_hwstatus { #define LPE_HWDESC_LATECOLL (1 << 28) #define LPE_HWDESC_UNDERRUN (1 << 29) #define LPE_HWDESC_TXNODESCR (1 << 30) -#define LPE_HWDESC_ERROR (1 << 31) +#define LPE_HWDESC_ERROR (1U << 31) /* These are valid for Rx status descriptors */ #define LPE_HWDESC_CONTROL (1 << 18) @@ -202,7 +202,7 @@ struct lpe_hwstatus { #define LPE_HWDESC_OVERRUN (1 << 28) #define LPE_HWDESC_RXNODESCR (1 << 29) #define LPE_HWDESC_LASTFLAG (1 << 30) -#define LPE_HWDESC_ERROR (1 << 31) +#define LPE_HWDESC_ERROR (1U << 31) #endif /* _ARM_LPC_IF_LPEREG_H */ Modified: head/sys/arm/lpc/lpcreg.h ============================================================================== --- head/sys/arm/lpc/lpcreg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/lpc/lpcreg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -604,7 +604,7 @@ #define LPC_DMAC_CH_LLI 0x08 #define LPC_DMAC_CH_LLI_AHB1 (1 << 0) #define LPC_DMAC_CH_CONTROL 0x0c -#define LPC_DMAC_CH_CONTROL_I (1 << 31) +#define LPC_DMAC_CH_CONTROL_I (1U << 31) #define LPC_DMAC_CH_CONTROL_DI (1 << 27) #define LPC_DMAC_CH_CONTROL_SI (1 << 26) #define LPC_DMAC_CH_CONTROL_D (1 << 25) Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/mv/mv_pci.c Sat Nov 30 22:17:27 2013 (r258780) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -#define PCI_CFG_ENA (1 << 31) +#define PCI_CFG_ENA (1U << 31) #define PCI_CFG_BUS(bus) (((bus) & 0xff) << 16) #define PCI_CFG_DEV(dev) (((dev) & 0x1f) << 11) #define PCI_CFG_FUN(fun) (((fun) & 0x7) << 8) Modified: head/sys/arm/samsung/exynos/ehci_exynos5.c ============================================================================== --- head/sys/arm/samsung/exynos/ehci_exynos5.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/samsung/exynos/ehci_exynos5.c Sat Nov 30 22:17:27 2013 (r258780) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); #define HOST_CTRL_SUSPEND (1 << 4) #define HOST_CTRL_RESET_LINK (1 << 1) #define HOST_CTRL_RESET_PHY (1 << 0) -#define HOST_CTRL_RESET_PHY_ALL (1 << 31) +#define HOST_CTRL_RESET_PHY_ALL (1U << 31) /* Forward declarations */ static int exynos_ehci_attach(device_t dev); Modified: head/sys/arm/xscale/i8134x/i81342reg.h ============================================================================== --- head/sys/arm/xscale/i8134x/i81342reg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/xscale/i8134x/i81342reg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -83,7 +83,7 @@ #define IOP34X_ADMA_PQTE (1 << 18) /* P+Q Transfer Enable */ #define IOP34X_ADMA_PTD (1 << 19) /* P Transfer Disable */ #define IOP34X_ADMA_ROE (1 << 30) /* Relaxed Ordering Enable */ -#define IOP34X_ADMA_NSE (1 << 31) /* No Snoop Enable */ +#define IOP34X_ADMA_NSE (1U << 31) /* No Snoop Enable */ #define IOP34X_PBBAR0 0x81588 /* PBI Base Address Register 0 */ #define IOP34X_PBBAR0_ADDRMASK 0xfffff000 @@ -113,7 +113,7 @@ #define SMC_SDBR 0x8180c /* Base Register */ #define SMC_SDBR_BASEADDR (1 << 27) #define SMC_SDBR_BASEADDR_MASK ((1 << 27) | (1 << 28) | (1 << 29) | (1 << 30) \ - | (1 << 31)) + | (1U << 31)) #define SMC_SDUBR 0x81810 /* Upper Base Register */ #define SMC_SBSR 0x81814 /* SDRAM Bank Size Register */ #define SMC_SBSR_BANK_NB (1 << 2) /* Number of DDR Banks @@ -128,7 +128,7 @@ 0x01000 1GB */ #define SMC_SBSR_BANK_SZ_MASK ((1 << 27) | (1 << 28) | (1 << 29) | (1 << 30) \ - | (1 << 31)) + | (1U << 31)) /* Two possible addresses for ATUe depending on configuration. */ @@ -190,7 +190,7 @@ #define ATU_CR_OUT_EN (1 << 1) #define ATU_PCSR 0x0074 /* PCI Configuration and Status Register */ #define PCIE_BUSNO(x) ((x & 0xff000000) >> 24) -#define ATUX_CORE_RST ((1 << 30) | (1 << 31)) /* Core Processor Reset */ +#define ATUX_CORE_RST ((1 << 30) | (1U << 31)) /* Core Processor Reset */ #define ATUX_P_RSTOUT (1 << 21) /* Central Resource PCI Bus Reset */ #define ATUE_CORE_RST ((1 << 9) | (1 << 8)) /* Core Processor Reset */ #define ATU_ISR 0x0078 /* ATU Interrupt Status Register */ @@ -250,7 +250,7 @@ #define ATU_OIOWTVR 0x0304 /* Outbound I/O Window Translate Value Reg */ #define ATU_OUMBAR0 0x0308 /* Outbound Upper Memory Window base addr reg 0*/ #define ATU_OUMBAR_FUNC (28) -#define ATU_OUMBAR_EN (1 << 31) +#define ATU_OUMBAR_EN (1U << 31) #define ATU_OUMWTVR0 0x030c /* Outbound Upper 32bit Memory Window Translate Value Register 0 */ #define ATU_OUMBAR1 0x0310 /* Outbound Upper Memory Window base addr reg1*/ #define ATU_OUMWTVR1 0x0314 /* Outbound Upper 32bit Memory Window Translate Value Register 1 */ Modified: head/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425reg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/arm/xscale/ixp425/ixp425reg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -400,7 +400,7 @@ #define EXP_CNFG0_PCI_HOST (1 << 1) #define EXP_CNFG0_PCI_ARB (1 << 2) #define EXP_CNFG0_PCI_66MHZ (1 << 4) -#define EXP_CNFG0_MEM_MAP (1 << 31) +#define EXP_CNFG0_MEM_MAP (1U << 31) /* EXP_CNFG1 bits */ #define EXP_CNFG1_SW_INT0 (1 << 0) Modified: head/sys/boot/arm/at91/libat91/mci_device.h ============================================================================== --- head/sys/boot/arm/at91/libat91/mci_device.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/boot/arm/at91/libat91/mci_device.h Sat Nov 30 22:17:27 2013 (r258780) @@ -306,7 +306,7 @@ typedef struct _AT91S_MciDevice #define AT91C_VDD_33_34 (1 << 21) #define AT91C_VDD_34_35 (1 << 22) #define AT91C_VDD_35_36 (1 << 23) -#define AT91C_CARD_POWER_UP_BUSY (1 << 31) +#define AT91C_CARD_POWER_UP_BUSY (1U << 31) #define AT91C_MMC_HOST_VOLTAGE_RANGE (AT91C_VDD_27_28 | AT91C_VDD_28_29 | \ AT91C_VDD_29_30 | AT91C_VDD_30_31 | AT91C_VDD_31_32 | AT91C_VDD_32_33) Modified: head/sys/boot/i386/libfirewire/fwohci.h ============================================================================== --- head/sys/boot/i386/libfirewire/fwohci.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/boot/i386/libfirewire/fwohci.h Sat Nov 30 22:17:27 2013 (r258780) @@ -76,7 +76,7 @@ void fwohci_poll(struct fwohci_softc *); #define OHCI_CROMHDR 0x18 #define OHCI_BUS_ID 0x1c #define OHCI_BUS_OPT 0x20 -#define OHCI_BUSIRMC (1 << 31) +#define OHCI_BUSIRMC (1U << 31) #define OHCI_BUSCMC (1 << 30) #define OHCI_BUSISC (1 << 29) #define OHCI_BUSBMC (1 << 28) @@ -102,7 +102,7 @@ void fwohci_poll(struct fwohci_softc *); #define OHCI_SID_BUF 0x64 #define OHCI_SID_CNT 0x68 -#define OHCI_SID_ERR (1 << 31) +#define OHCI_SID_ERR (1U << 31) #define OHCI_SID_CNT_MASK 0xffc #define OHCI_IT_STAT 0x90 Modified: head/sys/boot/i386/libfirewire/fwohcireg.h ============================================================================== --- head/sys/boot/i386/libfirewire/fwohcireg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/boot/i386/libfirewire/fwohcireg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -239,7 +239,7 @@ struct ohci_registers { fwohcireg_t dummy1[3]; /* dummy 0x44-0x4c */ fwohcireg_t hcc_cntl_set; /* HCC control set 0x50 */ fwohcireg_t hcc_cntl_clr; /* HCC control clr 0x54 */ -#define OHCI_HCC_BIBIV (1 << 31) /* BIBimage Valid */ +#define OHCI_HCC_BIBIV (1U << 31) /* BIBimage Valid */ #define OHCI_HCC_BIGEND (1 << 30) /* noByteSwapData */ #define OHCI_HCC_PRPHY (1 << 23) /* programPhyEnable */ #define OHCI_HCC_PHYEN (1 << 22) /* aPhyEnhanceEnable */ @@ -278,7 +278,7 @@ struct ohci_registers { fwohcireg_t link_cntl_clr; /* Chip control clear 0xe4*/ #define FWOHCI_NODEID 0xe8 fwohcireg_t node; /* Node ID 0xe8 */ -#define OHCI_NODE_VALID (1 << 31) +#define OHCI_NODE_VALID (1U << 31) #define OHCI_NODE_ROOT (1 << 30) #define OHCI_ASYSRCBUS 1 Modified: head/sys/dev/aac/aacvar.h ============================================================================== --- head/sys/dev/aac/aacvar.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/aac/aacvar.h Sat Nov 30 22:17:27 2013 (r258780) @@ -412,7 +412,7 @@ struct aac_softc #define AAC_FLAGS_RAW_IO (1 << 12) /* Raw I/O interface */ #define AAC_FLAGS_ARRAY_64BIT (1 << 13) /* 64-bit array size */ #define AAC_FLAGS_LBA_64BIT (1 << 14) /* 64-bit LBA support */ -#define AAC_FLAGS_NOMSI (1 << 31) /* Broken MSI */ +#define AAC_FLAGS_NOMSI (1U << 31) /* Broken MSI */ u_int32_t supported_options; u_int32_t scsi_method_id; Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/acpica/acpi_video.c Sat Nov 30 22:17:27 2013 (r258780) @@ -132,7 +132,7 @@ static void vo_set_device_state(ACPI_HAN #define DOD_HEAD_ID_BITS 3 #define DOD_HEAD_ID_MASK \ (((1 << DOD_HEAD_ID_BITS) - 1) << DOD_HEAD_ID_SHIFT) -#define DOD_DEVID_SCHEME_STD (1 << 31) +#define DOD_DEVID_SCHEME_STD (1U << 31) /* _BCL related constants */ #define BCL_FULLPOWER 0 @@ -149,7 +149,7 @@ static void vo_set_device_state(ACPI_HAN #define DSS_INACTIVE 0 #define DSS_ACTIVE (1 << 0) #define DSS_SETNEXT (1 << 30) -#define DSS_COMMIT (1 << 31) +#define DSS_COMMIT (1U << 31) static device_method_t acpi_video_methods[] = { DEVMETHOD(device_identify, acpi_video_identify), Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/agp/agp_i810.c Sat Nov 30 22:17:27 2013 (r258780) @@ -2226,10 +2226,10 @@ agp_i830_chipset_flush(device_t dev) sc = device_get_softc(dev); pmap_invalidate_cache(); hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); - bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1 << 31)); + bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1U << 31)); for (i = 0; i < 20000 /* 1 sec */; i++) { hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); - if ((hic & (1 << 31)) == 0) + if ((hic & (1U << 31)) == 0) break; DELAY(50); } Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/ahci/ahci.h Sat Nov 30 22:17:27 2013 (r258780) @@ -321,7 +321,7 @@ struct ahci_dma_prd { u_int32_t dbc; /* 0 based */ #define AHCI_PRD_MASK 0x003fffff /* max 4MB */ #define AHCI_PRD_MAX (AHCI_PRD_MASK + 1) -#define AHCI_PRD_IPC (1 << 31) +#define AHCI_PRD_IPC (1U << 31) } __packed; struct ahci_cmd_tab { Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/bktr/bktr_core.c Sat Nov 30 22:17:27 2013 (r258780) @@ -2599,7 +2599,7 @@ dump_bt848( bktr_ptr_t bktr ) #define BKTR_TEST_RISC_STATUS_BIT0 (1 << 28) #define BKTR_TEST_RISC_STATUS_BIT1 (1 << 29) #define BKTR_TEST_RISC_STATUS_BIT2 (1 << 30) -#define BKTR_TEST_RISC_STATUS_BIT3 (1 << 31) +#define BKTR_TEST_RISC_STATUS_BIT3 (1U << 31) static bool_t notclipped (bktr_reg_t * bktr, int x, int width) { int i; Modified: head/sys/dev/drm/i915_reg.h ============================================================================== --- head/sys/dev/drm/i915_reg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/i915_reg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -349,7 +349,7 @@ __FBSDID("$FreeBSD$"); #define VGA1_PD_P1_MASK (0x1f << 8) #define DPLL_A 0x06014 #define DPLL_B 0x06018 -#define DPLL_VCO_ENABLE (1 << 31) +#define DPLL_VCO_ENABLE (1U << 31) #define DPLL_DVO_HIGH_SPEED (1 << 30) #define DPLL_SYNCLOCK_ENABLE (1 << 29) #define DPLL_VGA_MODE_DIS (1 << 28) @@ -653,7 +653,7 @@ __FBSDID("$FreeBSD$"); /* SDVO port control */ #define SDVOB 0x61140 #define SDVOC 0x61160 -#define SDVO_ENABLE (1 << 31) +#define SDVO_ENABLE (1U << 31) #define SDVO_PIPE_B_SELECT (1 << 30) #define SDVO_STALL_SELECT (1 << 29) #define SDVO_INTERRUPT_ENABLE (1 << 26) @@ -690,7 +690,7 @@ __FBSDID("$FreeBSD$"); #define DVOA 0x61120 #define DVOB 0x61140 #define DVOC 0x61160 -#define DVO_ENABLE (1 << 31) +#define DVO_ENABLE (1U << 31) #define DVO_PIPE_B_SELECT (1 << 30) #define DVO_PIPE_STALL_UNUSED (0 << 28) #define DVO_PIPE_STALL (1 << 28) @@ -726,7 +726,7 @@ __FBSDID("$FreeBSD$"); * Enables the LVDS port. This bit must be set before DPLLs are enabled, as * the DPLL semantics change when the LVDS is assigned to that pipe. */ -#define LVDS_PORT_EN (1 << 31) +#define LVDS_PORT_EN (1U << 31) /* Selects pipe B for LVDS data. Must be set on pre-965. */ #define LVDS_PIPEB_SELECT (1 << 30) /* @@ -762,7 +762,7 @@ __FBSDID("$FreeBSD$"); /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1 << 31) +#define PP_ON (1U << 31) /* * Indicates that all dependencies of the panel are on: * @@ -783,7 +783,7 @@ __FBSDID("$FreeBSD$"); /* Panel fitting */ #define PFIT_CONTROL 0x61230 -#define PFIT_ENABLE (1 << 31) +#define PFIT_ENABLE (1U << 31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -826,7 +826,7 @@ __FBSDID("$FreeBSD$"); /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ -# define TV_ENC_ENABLE (1 << 31) +# define TV_ENC_ENABLE (1U << 31) /** Sources the TV encoder input from pipe B instead of A. */ # define TV_ENC_PIPEB_SELECT (1 << 30) /** Outputs composite video (DAC A only) */ @@ -897,7 +897,7 @@ __FBSDID("$FreeBSD$"); * * This gets cleared when TV_DAC_STATE_EN is cleared */ -# define TVDAC_STATE_CHG (1 << 31) +# define TVDAC_STATE_CHG (1U << 31) # define TVDAC_SENSE_MASK (7 << 28) /** Reports that DAC A voltage is above the detect threshold */ # define TVDAC_A_SENSE (1 << 30) @@ -1024,7 +1024,7 @@ __FBSDID("$FreeBSD$"); #define TV_H_CTL_2 0x68034 /** Enables the colorburst (needed for non-component color) */ -# define TV_BURST_ENA (1 << 31) +# define TV_BURST_ENA (1U << 31) /** Offset of the colorburst from the start of hsync, in pixels minus one. */ # define TV_HBURST_START_SHIFT 16 # define TV_HBURST_START_MASK 0x1fff0000 @@ -1069,7 +1069,7 @@ __FBSDID("$FreeBSD$"); #define TV_V_CTL_3 0x68044 /** Enables generation of the equalization signal */ -# define TV_EQUAL_ENA (1 << 31) +# define TV_EQUAL_ENA (1U << 31) /** Length of vsync, in half lines */ # define TV_VEQ_LEN_MASK 0x007f0000 # define TV_VEQ_LEN_SHIFT 16 @@ -1143,7 +1143,7 @@ __FBSDID("$FreeBSD$"); #define TV_SC_CTL_1 0x68060 /** Turns on the first subcarrier phase generation DDA */ -# define TV_SC_DDA1_EN (1 << 31) +# define TV_SC_DDA1_EN (1U << 31) /** Turns on the first subcarrier phase generation DDA */ # define TV_SC_DDA2_EN (1 << 30) /** Turns on the first subcarrier phase generation DDA */ @@ -1206,7 +1206,7 @@ __FBSDID("$FreeBSD$"); * If set, the rest of the registers are ignored, and the calculated values can * be read back from the register. */ -# define TV_AUTO_SCALE (1 << 31) +# define TV_AUTO_SCALE (1U << 31) /** * Disables the vertical filter. * @@ -1269,7 +1269,7 @@ __FBSDID("$FreeBSD$"); # define TV_VSCALE_IP_FRAC_SHIFT 0 #define TV_CC_CONTROL 0x68090 -# define TV_CC_ENABLE (1 << 31) +# define TV_CC_ENABLE (1U << 31) /** * Specifies which field to send the CC data in. * @@ -1285,7 +1285,7 @@ __FBSDID("$FreeBSD$"); # define TV_CC_LINE_SHIFT 0 #define TV_CC_DATA 0x68094 -# define TV_CC_RDY (1 << 31) +# define TV_CC_RDY (1U << 31) /** Second word of CC data to be transmitted. */ # define TV_CC_DATA_2_MASK 0x007f0000 # define TV_CC_DATA_2_SHIFT 16 @@ -1469,7 +1469,7 @@ __FBSDID("$FreeBSD$"); /* VBIOS regs */ #define VGACNTRL 0x71400 -# define VGA_DISP_DISABLE (1 << 31) +# define VGA_DISP_DISABLE (1U << 31) # define VGA_2X_MODE (1 << 30) # define VGA_PIPE_B_SELECT (1 << 29) Modified: head/sys/dev/drm/mach64_drv.h ============================================================================== --- head/sys/dev/drm/mach64_drv.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/mach64_drv.h Sat Nov 30 22:17:27 2013 (r258780) @@ -202,7 +202,7 @@ extern void mach64_driver_irq_uninstall( # define MACH64_CIRCULAR_BUF_SIZE_32KB (1 << 0) # define MACH64_CIRCULAR_BUF_SIZE_64KB (2 << 0) # define MACH64_CIRCULAR_BUF_SIZE_128KB (3 << 0) -# define MACH64_LAST_DESCRIPTOR (1 << 31) +# define MACH64_LAST_DESCRIPTOR (1U << 31) #define MACH64_BM_HOSTDATA 0x0644 #define MACH64_BM_STATUS 0x018c #define MACH64_BM_SYSTEM_MEM_ADDR 0x0184 @@ -316,7 +316,7 @@ extern void mach64_driver_irq_uninstall( #define MACH64_FIFO_STAT 0x0710 # define MACH64_FIFO_SLOT_MASK 0x0000ffff -# define MACH64_FIFO_ERR (1 << 31) +# define MACH64_FIFO_ERR (1U << 31) #define MACH64_GEN_TEST_CNTL 0x04d0 # define MACH64_GUI_ENGINE_ENABLE (1 << 8) @@ -442,7 +442,7 @@ extern void mach64_driver_irq_uninstall( # define MACH64_CRTC2_VLINE_SYNC (1 << 28) /* LT Pro */ /* 0=even, 1=odd */ # define MACH64_CRTC_SNAPSHOT2_INT_EN (1 << 29) /* LT Pro */ # define MACH64_CRTC_SNAPSHOT2_INT (1 << 30) /* LT Pro */ -# define MACH64_CRTC_VBLANK2_INT (1 << 31) +# define MACH64_CRTC_VBLANK2_INT (1U << 31) # define MACH64_CRTC_INT_ENS \ ( \ MACH64_CRTC_VBLANK_INT_EN | \ Modified: head/sys/dev/drm/mga_drv.h ============================================================================== --- head/sys/dev/drm/mga_drv.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/mga_drv.h Sat Nov 30 22:17:27 2013 (r258780) @@ -458,7 +458,7 @@ do { \ # define MGA_BLTMOD_BU24RGB (15 << 25) # define MGA_PATTERN (1 << 29) # define MGA_TRANSC (1 << 30) -# define MGA_CLIPDIS (1 << 31) +# define MGA_CLIPDIS (1U << 31) #define MGA_DWGSYNC 0x2c4c #define MGA_FCOL 0x1c24 @@ -526,7 +526,7 @@ do { \ #define MGA_TEXCTL2 0x2c3c # define MGA_DUALTEX (1 << 7) # define MGA_G400_TC2_MAGIC (1 << 15) -# define MGA_MAP1_ENABLE (1 << 31) +# define MGA_MAP1_ENABLE (1U << 31) #define MGA_TEXFILTER 0x2c58 #define MGA_TEXHEIGHT 0x2c2c #define MGA_TEXORG 0x2c24 Modified: head/sys/dev/drm/r128_drv.h ============================================================================== --- head/sys/dev/drm/r128_drv.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/r128_drv.h Sat Nov 30 22:17:27 2013 (r258780) @@ -227,7 +227,7 @@ extern long r128_compat_ioctl(struct fil # define R128_ROP3_P 0x00f00000 #define R128_DP_WRITE_MASK 0x16cc #define R128_DST_PITCH_OFFSET_C 0x1c80 -# define R128_DST_TILE (1 << 31) +# define R128_DST_TILE (1U << 31) #define R128_GEN_INT_CNTL 0x0040 # define R128_CRTC_VBLANK_INT_EN (1 << 0) @@ -246,7 +246,7 @@ extern long r128_compat_ioctl(struct fil #define R128_GUI_STAT 0x1740 # define R128_GUI_FIFOCNT_MASK 0x0fff -# define R128_GUI_ACTIVE (1 << 31) +# define R128_GUI_ACTIVE (1U << 31) #define R128_MCLK_CNTL 0x000f # define R128_FORCE_GCP (1 << 16) @@ -258,7 +258,7 @@ extern long r128_compat_ioctl(struct fil # define R128_PC_FLUSH_GUI (3 << 0) # define R128_PC_RI_GUI (1 << 2) # define R128_PC_FLUSH_ALL 0x00ff -# define R128_PC_BUSY (1 << 31) +# define R128_PC_BUSY (1U << 31) #define R128_PCI_GART_PAGE 0x017c #define R128_PRIM_TEX_CNTL_C 0x1cb0 @@ -302,7 +302,7 @@ extern long r128_compat_ioctl(struct fil #define R128_PM4_BUFFER_DL_RPTR_ADDR 0x070c #define R128_PM4_BUFFER_DL_RPTR 0x0710 #define R128_PM4_BUFFER_DL_WPTR 0x0714 -# define R128_PM4_BUFFER_DL_DONE (1 << 31) +# define R128_PM4_BUFFER_DL_DONE (1U << 31) #define R128_PM4_VC_FPU_SETUP 0x071c @@ -312,7 +312,7 @@ extern long r128_compat_ioctl(struct fil #define R128_PM4_STAT 0x07b8 # define R128_PM4_FIFOCNT_MASK 0x0fff # define R128_PM4_BUSY (1 << 16) -# define R128_PM4_GUI_ACTIVE (1 << 31) +# define R128_PM4_GUI_ACTIVE (1U << 31) #define R128_PM4_MICROCODE_ADDR 0x07d4 #define R128_PM4_MICROCODE_RADDR 0x07d8 Modified: head/sys/dev/drm/r300_reg.h ============================================================================== --- head/sys/dev/drm/r300_reg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/r300_reg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -1205,7 +1205,7 @@ __FBSDID("$FreeBSD$"); # define R300_FPI0_OUTC_FRC (9 << 23) # define R300_FPI0_OUTC_REPL_ALPHA (10 << 23) # define R300_FPI0_OUTC_SAT (1 << 30) -# define R300_FPI0_INSERT_NOP (1 << 31) +# define R300_FPI0_INSERT_NOP (1U << 31) #define R300_PFS_INSTR2_0 0x49C0 # define R300_FPI2_ARGA_SRC0C_X 0 @@ -1252,7 +1252,7 @@ __FBSDID("$FreeBSD$"); # define R300_FPI2_OUTA_RCP (10 << 23) # define R300_FPI2_OUTA_RSQ (11 << 23) # define R300_FPI2_OUTA_SAT (1 << 30) -# define R300_FPI2_UNKNOWN_31 (1 << 31) +# define R300_FPI2_UNKNOWN_31 (1U << 31) /* END: Fragment program instruction set */ /* Fog state and color */ @@ -1452,7 +1452,7 @@ __FBSDID("$FreeBSD$"); # define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_NO_EFFECT (0 << 1) # define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE (1 << 1) # define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_IDLE (0 << 31) -# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1 << 31) +# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1U << 31) #define R300_ZB_BW_CNTL 0x4f1c # define R300_HIZ_DISABLE (0 << 0) Modified: head/sys/dev/drm/r600_blit.c ============================================================================== --- head/sys/dev/drm/r600_blit.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/r600_blit.c Sat Nov 30 22:17:27 2013 (r258780) @@ -1428,12 +1428,12 @@ set_scissors(drm_radeon_private_t *dev_p OUT_RING(CP_PACKET3(R600_IT_SET_CONTEXT_REG, 2)); OUT_RING((R600_PA_SC_GENERIC_SCISSOR_TL - R600_SET_CONTEXT_REG_OFFSET) >> 2); - OUT_RING((x1 << 0) | (y1 << 16) | (1 << 31)); + OUT_RING((x1 << 0) | (y1 << 16) | (1U << 31)); OUT_RING((x2 << 0) | (y2 << 16)); OUT_RING(CP_PACKET3(R600_IT_SET_CONTEXT_REG, 2)); OUT_RING((R600_PA_SC_WINDOW_SCISSOR_TL - R600_SET_CONTEXT_REG_OFFSET) >> 2); - OUT_RING((x1 << 0) | (y1 << 16) | (1 << 31)); + OUT_RING((x1 << 0) | (y1 << 16) | (1U << 31)); OUT_RING((x2 << 0) | (y2 << 16)); ADVANCE_RING(); } Modified: head/sys/dev/drm/radeon_cp.c ============================================================================== --- head/sys/dev/drm/radeon_cp.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/radeon_cp.c Sat Nov 30 22:17:27 2013 (r258780) @@ -542,7 +542,7 @@ static void radeon_do_cp_flush(drm_radeo #if 0 u32 tmp; - tmp = RADEON_READ(RADEON_CP_RB_WPTR) | (1 << 31); + tmp = RADEON_READ(RADEON_CP_RB_WPTR) | (1U << 31); RADEON_WRITE(RADEON_CP_RB_WPTR, tmp); #endif } Modified: head/sys/dev/drm/radeon_drv.h ============================================================================== --- head/sys/dev/drm/radeon_drv.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/radeon_drv.h Sat Nov 30 22:17:27 2013 (r258780) @@ -659,7 +659,7 @@ extern int r600_cs_init(struct drm_devic # define RS480_GTW_LAC_EN (1 << 25) # define RS480_2LEVEL_GART (0 << 30) # define RS480_1LEVEL_GART (1 << 30) -# define RS480_PDC_EN (1 << 31) +# define RS480_PDC_EN (1U << 31) #define RS480_GART_BASE 0x2c #define RS480_GART_CACHE_CNTRL 0x2e # define RS480_GART_CACHE_INVALIDATE (1 << 0) /* wait for it to clear */ @@ -775,7 +775,7 @@ extern int r600_cs_init(struct drm_devic # define R300_SUBPIXEL_1_12 (0 << 16) # define R300_SUBPIXEL_1_16 (1 << 16) #define R300_DST_PIPE_CONFIG 0x170c -# define R300_PIPE_AUTO_CONFIG (1 << 31) +# define R300_PIPE_AUTO_CONFIG (1U << 31) #define R300_RB2D_DSTCACHE_MODE 0x3428 # define R300_DC_AUTOFLUSH_ENABLE (1 << 8) # define R300_DC_DC_DISABLE_IGNORE_PE (1 << 17) @@ -902,7 +902,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R300_RB2D_DC_FLUSH (3 << 0) # define R300_RB2D_DC_FREE (3 << 2) # define R300_RB2D_DC_FLUSH_ALL 0xf -# define R300_RB2D_DC_BUSY (1 << 31) +# define R300_RB2D_DC_BUSY (1U << 31) #define RADEON_RB3D_CNTL 0x1c3c # define RADEON_ALPHA_BLEND_ENABLE (1 << 0) # define RADEON_PLANE_MASK_ENABLE (1 << 1) @@ -924,16 +924,16 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_RB3D_ZC_FLUSH (1 << 0) # define RADEON_RB3D_ZC_FREE (1 << 2) # define RADEON_RB3D_ZC_FLUSH_ALL 0x5 -# define RADEON_RB3D_ZC_BUSY (1 << 31) +# define RADEON_RB3D_ZC_BUSY (1U << 31) #define R300_ZB_ZCACHE_CTLSTAT 0x4f18 # define R300_ZC_FLUSH (1 << 0) # define R300_ZC_FREE (1 << 1) -# define R300_ZC_BUSY (1 << 31) +# define R300_ZC_BUSY (1U << 31) #define RADEON_RB3D_DSTCACHE_CTLSTAT 0x325c # define RADEON_RB3D_DC_FLUSH (3 << 0) # define RADEON_RB3D_DC_FREE (3 << 2) # define RADEON_RB3D_DC_FLUSH_ALL 0xf -# define RADEON_RB3D_DC_BUSY (1 << 31) +# define RADEON_RB3D_DC_BUSY (1U << 31) #define R300_RB3D_DSTCACHE_CTLSTAT 0x4e4c # define R300_RB3D_DC_FLUSH (2 << 0) # define R300_RB3D_DC_FREE (2 << 2) @@ -949,7 +949,7 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_Z_COMPRESSION_ENABLE (1 << 28) # define RADEON_FORCE_Z_DIRTY (1 << 29) # define RADEON_Z_WRITE_ENABLE (1 << 30) -# define RADEON_Z_DECOMPRESSION_ENABLE (1 << 31) +# define RADEON_Z_DECOMPRESSION_ENABLE (1U << 31) #define RADEON_RBBM_SOFT_RESET 0x00f0 # define RADEON_SOFT_RESET_CP (1 << 0) # define RADEON_SOFT_RESET_HI (1 << 1) @@ -1003,7 +1003,7 @@ extern u32 radeon_get_scratch(drm_radeon # define RADEON_TIM_BUSY (1 << 25) /* not used on r300 */ # define RADEON_GA_BUSY (1 << 26) # define RADEON_CBA2D_BUSY (1 << 27) -# define RADEON_RBBM_ACTIVE (1 << 31) +# define RADEON_RBBM_ACTIVE (1U << 31) #define RADEON_RE_LINE_PATTERN 0x1cd0 #define RADEON_RE_MISC 0x26c4 #define RADEON_RE_TOP_LEFT 0x26c0 @@ -1117,7 +1117,7 @@ extern u32 radeon_get_scratch(drm_radeon #define RADEON_CP_RB_CNTL 0x0704 # define RADEON_BUF_SWAP_32BIT (2 << 16) # define RADEON_RB_NO_UPDATE (1 << 27) -# define RADEON_RB_RPTR_WR_ENA (1 << 31) +# define RADEON_RB_RPTR_WR_ENA (1U << 31) #define RADEON_CP_RB_RPTR_ADDR 0x070c #define RADEON_CP_RB_RPTR 0x0710 #define RADEON_CP_RB_WPTR 0x0714 @@ -1193,7 +1193,7 @@ extern u32 radeon_get_scratch(drm_radeon #define RADEON_CP_PACKET1_REG0_MASK 0x000007ff #define RADEON_CP_PACKET1_REG1_MASK 0x003ff800 -#define RADEON_VTX_Z_PRESENT (1 << 31) +#define RADEON_VTX_Z_PRESENT (1U << 31) #define RADEON_VTX_PKCOLOR_PRESENT (1 << 3) #define RADEON_PRIM_TYPE_NONE (0 << 0) @@ -1524,7 +1524,7 @@ extern u32 radeon_get_scratch(drm_radeon #define R600_GRBM_STATUS 0x8010 # define R600_CMDFIFO_AVAIL_MASK 0x1f # define R700_CMDFIFO_AVAIL_MASK 0xf -# define R600_GUI_ACTIVE (1 << 31) +# define R600_GUI_ACTIVE (1U << 31) #define R600_GRBM_STATUS2 0x8014 #define R600_GRBM_SOFT_RESET 0x8020 # define R600_SOFT_RESET_CP (1 << 0) @@ -1546,7 +1546,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_RB_BUFSZ(x) ((x) << 0) # define R600_RB_BLKSZ(x) ((x) << 8) # define R600_RB_NO_UPDATE (1 << 27) -# define R600_RB_RPTR_WR_ENA (1 << 31) +# define R600_RB_RPTR_WR_ENA (1U << 31) #define R600_CP_RB_RPTR_WR 0xc108 #define R600_CP_RB_RPTR_ADDR 0xc10c #define R600_CP_RB_RPTR_ADDR_HI 0xc110 @@ -1619,7 +1619,7 @@ extern u32 radeon_get_scratch(drm_radeon #define R600_SX_MISC 0x28350 #define R600_DB_DEBUG 0x9830 -# define R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE (1 << 31) +# define R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE (1U << 31) #define R600_DB_WATERMARKS 0x9838 # define R600_DEPTH_FREE(x) ((x) << 0) # define R600_DEPTH_FLUSH(x) ((x) << 5) @@ -1679,7 +1679,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_SYNC_WALKER (1 << 25) # define R600_SYNC_ALIGNER (1 << 26) # define R600_BILINEAR_PRECISION_6_BIT (0 << 31) -# define R600_BILINEAR_PRECISION_8_BIT (1 << 31) +# define R600_BILINEAR_PRECISION_8_BIT (1U << 31) #define R700_TCP_CNTL 0x9610 @@ -1753,7 +1753,7 @@ extern u32 radeon_get_scratch(drm_radeon # define R600_PERSP_GRADIENT_ENA (1 << 28) # define R600_LINEAR_GRADIENT_ENA (1 << 29) # define R600_POSITION_SAMPLE (1 << 30) -# define R600_BARYC_AT_SAMPLE_ENA (1 << 31) +# define R600_BARYC_AT_SAMPLE_ENA (1U << 31) #define R600_SPI_PS_IN_CONTROL_1 0x286d0 # define R600_GEN_INDEX_PIX (1 << 0) # define R600_GEN_INDEX_PIX_ADDR(x) ((x) << 1) Modified: head/sys/dev/drm/via_irq.c ============================================================================== --- head/sys/dev/drm/via_irq.c Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm/via_irq.c Sat Nov 30 22:17:27 2013 (r258780) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #define VIA_REG_INTERRUPT 0x200 /* VIA_REG_INTERRUPT */ -#define VIA_IRQ_GLOBAL (1 << 31) +#define VIA_IRQ_GLOBAL (1U << 31) #define VIA_IRQ_VBLANK_ENABLE (1 << 19) #define VIA_IRQ_VBLANK_PENDING (1 << 3) #define VIA_IRQ_HQV0_ENABLE (1 << 11) Modified: head/sys/dev/drm2/i915/i915_reg.h ============================================================================== --- head/sys/dev/drm2/i915/i915_reg.h Sat Nov 30 22:16:37 2013 (r258779) +++ head/sys/dev/drm2/i915/i915_reg.h Sat Nov 30 22:17:27 2013 (r258780) @@ -798,7 +798,7 @@ __FBSDID("$FreeBSD$"); #define _DPLL_A 0x06014 #define _DPLL_B 0x06018 #define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B) -#define DPLL_VCO_ENABLE (1 << 31) +#define DPLL_VCO_ENABLE (1U << 31) #define DPLL_DVO_HIGH_SPEED (1 << 30) #define DPLL_SYNCLOCK_ENABLE (1 << 29) #define DPLL_VGA_MODE_DIS (1 << 28) @@ -1483,7 +1483,7 @@ __FBSDID("$FreeBSD$"); /* SDVO port control */ #define SDVOB 0x61140 #define SDVOC 0x61160 -#define SDVO_ENABLE (1 << 31) +#define SDVO_ENABLE (1U << 31) #define SDVO_PIPE_B_SELECT (1 << 30) #define SDVO_STALL_SELECT (1 << 29) #define SDVO_INTERRUPT_ENABLE (1 << 26) @@ -1521,7 +1521,7 @@ __FBSDID("$FreeBSD$"); #define DVOA 0x61120 #define DVOB 0x61140 #define DVOC 0x61160 -#define DVO_ENABLE (1 << 31) +#define DVO_ENABLE (1U << 31) #define DVO_PIPE_B_SELECT (1 << 30) #define DVO_PIPE_STALL_UNUSED (0 << 28) #define DVO_PIPE_STALL (1 << 28) @@ -1557,7 +1557,7 @@ __FBSDID("$FreeBSD$"); * Enables the LVDS port. This bit must be set before DPLLs are enabled, as * the DPLL semantics change when the LVDS is assigned to that pipe. */ -#define LVDS_PORT_EN (1 << 31) +#define LVDS_PORT_EN (1U << 31) /* Selects pipe B for LVDS data. Must be set on pre-965. */ #define LVDS_PIPEB_SELECT (1 << 30) #define LVDS_PIPE_MASK (1 << 30) @@ -1604,7 +1604,7 @@ __FBSDID("$FreeBSD$"); /* Video Data Island Packet control */ #define VIDEO_DIP_DATA 0x61178 #define VIDEO_DIP_CTL 0x61170 -#define VIDEO_DIP_ENABLE (1 << 31) +#define VIDEO_DIP_ENABLE (1U << 31) #define VIDEO_DIP_PORT_B (1 << 29) #define VIDEO_DIP_PORT_C (2 << 29) #define VIDEO_DIP_ENABLE_AVI (1 << 21) @@ -1620,7 +1620,7 @@ __FBSDID("$FreeBSD$"); /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1 << 31) +#define PP_ON (1U << 31) /* * Indicates that all dependencies of the panel are on: * @@ -1653,7 +1653,7 @@ __FBSDID("$FreeBSD$"); /* Panel fitting */ #define PFIT_CONTROL 0x61230 -#define PFIT_ENABLE (1 << 31) +#define PFIT_ENABLE (1U << 31) #define PFIT_PIPE_MASK (3 << 29) #define PFIT_PIPE_SHIFT 29 #define VERT_INTERP_DISABLE (0 << 10) @@ -1714,7 +1714,7 @@ __FBSDID("$FreeBSD$"); /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ -# define TV_ENC_ENABLE (1 << 31) +# define TV_ENC_ENABLE (1U << 31) /** Sources the TV encoder input from pipe B instead of A. */ # define TV_ENC_PIPEB_SELECT (1 << 30) /** Outputs composite video (DAC A only) */ @@ -1786,7 +1786,7 @@ __FBSDID("$FreeBSD$"); * * This gets cleared when TV_DAC_STATE_EN is cleared */ -# define TVDAC_STATE_CHG (1 << 31) +# define TVDAC_STATE_CHG (1U << 31) # define TVDAC_SENSE_MASK (7 << 28) /** Reports that DAC A voltage is above the detect threshold */ # define TVDAC_A_SENSE (1 << 30) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 23:47:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7961D83; Sat, 30 Nov 2013 23:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC6511C7; Sat, 30 Nov 2013 23:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUNlIbj068006; Sat, 30 Nov 2013 23:47:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUNlIoe068005; Sat, 30 Nov 2013 23:47:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311302347.rAUNlIoe068005@svn.freebsd.org> From: Devin Teske Date: Sat, 30 Nov 2013 23:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258785 - head/usr.sbin/bsdconfig/includes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 23:47:18 -0000 Author: dteske Date: Sat Nov 30 23:47:18 2013 New Revision: 258785 URL: http://svnweb.freebsd.org/changeset/base/258785 Log: Sort function output on name of the function. Modified: head/usr.sbin/bsdconfig/includes/includes Modified: head/usr.sbin/bsdconfig/includes/includes ============================================================================== --- head/usr.sbin/bsdconfig/includes/includes Sat Nov 30 23:08:32 2013 (r258784) +++ head/usr.sbin/bsdconfig/includes/includes Sat Nov 30 23:47:18 2013 (r258785) @@ -69,16 +69,36 @@ show_include() -v use_color=${USE_COLOR:-0} \ -v re="$pattern" \ -v show_desc=${SHOW_DESC:-0} ' + function asorti(src, dest) + { + # Copy src indices to dest and calculate array length + nitems = 0; for (i in src) dest[++nitems] = i + + # Sort the array of indices (dest) using insertion sort method + for (i = 1; i <= nitems; k = i++) + { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) + { + dest[k+1] = dest[k] + k-- + } + dest[k+1] = idx + } + + return nitems + } /^$/,/^#/ { if ($0 ~ /^# f_/) { if (!match($2, re)) next + fn = $2 if (use_color) - printf "+%s%s%s\n", + syntax[fn] = sprintf("+%s%s%s\n", substr($0, 2, RSTART), substr($0, 2 + RSTART, RLENGTH), - substr($0, 2 + RSTART + RLENGTH) + substr($0, 2 + RSTART + RLENGTH)) else - print "+" substr($0, 2) + syntax[fn] = "+" substr($0, 2) "\n" if (show_desc) print_more = 1 else @@ -87,15 +107,20 @@ show_include() if (show_desc && print_more) { getline while ($0 ~ /^#/) { - print " " substr($0, 2) + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" getline } print_more = 0 } else while (print_more) { getline - print " " substr($0, 2) + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" print_more = substr($0, length($0)) == "\\" } + } + END { + n = asorti(syntax, sorted_indices) + for (i = 1; i <= n; i++) + printf "%s", syntax[sorted_indices[i]] }' "$file" ) if [ "$output" ]; then if [ ! "$SHOW_FUNCS" ]; then From owner-svn-src-head@FreeBSD.ORG Sat Nov 30 23:56:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F472294; Sat, 30 Nov 2013 23:56:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B61C1241; Sat, 30 Nov 2013 23:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUNuQfE071278; Sat, 30 Nov 2013 23:56:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUNuQWr071277; Sat, 30 Nov 2013 23:56:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311302356.rAUNuQWr071277@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 23:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258786 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 23:56:27 -0000 Author: gjb Date: Sat Nov 30 23:56:26 2013 New Revision: 258786 URL: http://svnweb.freebsd.org/changeset/base/258786 Log: Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise the textproc/docproj port build fails. Pointyhat: gjb MFC after: 3 days X-Before-RC1: yes Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Nov 30 23:47:18 2013 (r258785) +++ head/release/release.sh Sat Nov 30 23:56:26 2013 (r258786) @@ -176,9 +176,9 @@ build_doc_ports() { _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'" + PBUILD_FLAGS="${PBUILD_FLAGS}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} install clean distclean + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean fi }