From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 00:43:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 62CE5FA7; Sun, 10 Mar 2013 00:43:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2D12CE; Sun, 10 Mar 2013 00:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A0h2UO076957; Sun, 10 Mar 2013 00:43:02 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A0h1jC076955; Sun, 10 Mar 2013 00:43:01 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303100043.r2A0h1jC076955@svn.freebsd.org> From: Ian Lepore Date: Sun, 10 Mar 2013 00:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248121 - in head/sys/boot: common fdt 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.14 Precedence: list List-Id: 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, 10 Mar 2013 00:43:02 -0000 Author: ian Date: Sun Mar 10 00:43:01 2013 New Revision: 248121 URL: http://svnweb.freebsd.org/changeset/base/248121 Log: Attach the elf section headers to the loaded kernel as metadata, so they can easily be used by later post-processing. When searching for a compiled-in fdt blob, use the section headers to get the size and location of the .dynsym section to do a symbol search. This fixes a problem where the search could overshoot the symbol table and wander into the string table. Sometimes that was harmless and sometimes it lead to spurious panic messages about an offset bigger than the module size. Modified: head/sys/boot/common/load_elf.c head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sun Mar 10 00:36:28 2013 (r248120) +++ head/sys/boot/common/load_elf.c Sun Mar 10 00:43:01 2013 (r248121) @@ -397,6 +397,8 @@ __elfN(loadimage)(struct preloaded_file "_loadimage: failed to read section headers"); goto nosyms; } + file_addmetadata(fp, MODINFOMD_SHDR, chunk, shdr); + symtabindex = -1; symstrindex = -1; for (i = 0; i < ehdr->e_shnum; i++) { Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Sun Mar 10 00:36:28 2013 (r248120) +++ head/sys/boot/fdt/fdt_loader_cmd.c Sun Mar 10 00:43:01 2013 (r248121) @@ -118,16 +118,17 @@ static char cwd[FDT_CWD_LEN] = "/"; static vm_offset_t fdt_find_static_dtb() { - Elf_Dyn dyn; + Elf_Ehdr *ehdr; + Elf_Shdr *shdr; Elf_Sym sym; - vm_offset_t dyntab, esym, strtab, symtab, fdt_start; + vm_offset_t strtab, symtab, fdt_start; uint64_t offs; struct preloaded_file *kfp; struct file_metadata *md; char *strp; - int sym_count; + int i, sym_count; - symtab = strtab = dyntab = esym = 0; + symtab = strtab = 0; strp = NULL; offs = __elfN(relocation_offset); @@ -136,42 +137,26 @@ fdt_find_static_dtb() if (kfp == NULL) return (0); - md = file_findmetadata(kfp, MODINFOMD_ESYM); + /* Locate the dynamic symbols and strtab. */ + md = file_findmetadata(kfp, MODINFOMD_ELFHDR); if (md == NULL) return (0); - bcopy(md->md_data, &esym, sizeof(esym)); - /* esym is already offset */ + ehdr = (Elf_Ehdr *)md->md_data; - md = file_findmetadata(kfp, MODINFOMD_DYNAMIC); + md = file_findmetadata(kfp, MODINFOMD_SHDR); if (md == NULL) return (0); - bcopy(md->md_data, &dyntab, sizeof(dyntab)); - dyntab += offs; + shdr = (Elf_Shdr *)md->md_data; - /* Locate STRTAB and DYNTAB */ - for (;;) { - COPYOUT(dyntab, &dyn, sizeof(dyn)); - if (dyn.d_tag == DT_STRTAB) { - strtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; - } else if (dyn.d_tag == DT_SYMTAB) { - symtab = (vm_offset_t)(dyn.d_un.d_ptr) + offs; - } else if (dyn.d_tag == DT_NULL) { - break; + for (i = 0; i < ehdr->e_shnum; ++i) { + if (shdr[i].sh_type == SHT_DYNSYM && symtab == 0) { + symtab = shdr[i].sh_addr + offs; + sym_count = shdr[i].sh_size / sizeof(Elf_Sym); + } else if (shdr[i].sh_type == SHT_STRTAB && strtab == 0) { + strtab = shdr[i].sh_addr + offs; } - dyntab += sizeof(dyn); } - if (symtab == 0 || strtab == 0) { - /* - * No symtab? No strtab? That should not happen here, - * and should have been verified during __elfN(loadimage). - * This must be some kind of a bug. - */ - return (0); - } - - sym_count = (int)(esym - symtab) / sizeof(Elf_Sym); - /* * The most efficent way to find a symbol would be to calculate a * hash, find proper bucket and chain, and thus find a symbol. From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 00:47:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1703337; Sun, 10 Mar 2013 00:47:19 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D468E314; Sun, 10 Mar 2013 00:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A0lJXu077599; Sun, 10 Mar 2013 00:47:19 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A0lJht077598; Sun, 10 Mar 2013 00:47:19 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100047.r2A0lJht077598@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 00:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248122 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 00:47:20 -0000 Author: andrew Date: Sun Mar 10 00:47:19 2013 New Revision: 248122 URL: http://svnweb.freebsd.org/changeset/base/248122 Log: Correctly align the unwind tables. Without this clang may incorrectly align them causing an alignment fault when producing a backtrace. Modified: head/sys/conf/ldscript.arm Modified: head/sys/conf/ldscript.arm ============================================================================== --- head/sys/conf/ldscript.arm Sun Mar 10 00:43:01 2013 (r248121) +++ head/sys/conf/ldscript.arm Sun Mar 10 00:47:19 2013 (r248122) @@ -56,6 +56,7 @@ SECTIONS .init : { *(.init) } =0x9090 .plt : { *(.plt) } + . = ALIGN(4); _extab_start = .; PROVIDE(extab_start = .); .ARM.extab : { *(.ARM.extab) } From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 02:38:36 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]) by hub.freebsd.org (Postfix) with ESMTP id 071E8525; Sun, 10 Mar 2013 02:38:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D5C3F799; Sun, 10 Mar 2013 02:38:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A2cZAW011290; Sun, 10 Mar 2013 02:38:35 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A2cZqZ011287; Sun, 10 Mar 2013 02:38:35 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100238.r2A2cZqZ011287@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 02:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248123 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 02:38:36 -0000 Author: andrew Date: Sun Mar 10 02:38:35 2013 New Revision: 248123 URL: http://svnweb.freebsd.org/changeset/base/248123 Log: Tell the unwinder we can't unwind swi_entry. This fixes an infinite loop when the kernel attempts to unwind through this function. The .fnstart and .fnend in this function should be moved to macros but we are currently missing an END macro on ARM. Modified: head/sys/arm/arm/exception.S Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sun Mar 10 00:47:19 2013 (r248122) +++ head/sys/arm/arm/exception.S Sun Mar 10 02:38:35 2013 (r248123) @@ -77,6 +77,9 @@ Lreset_panicmsg: * Handler for the Software Interrupt exception. */ ASENTRY_NP(swi_entry) + .fnstart + .cantunwind /* Don't unwind past here */ + PUSHFRAME mov r0, sp /* Pass the frame to any function */ @@ -88,6 +91,7 @@ ASENTRY_NP(swi_entry) DO_AST PULLFRAME movs pc, lr /* Exit */ + .fnend /* * prefetch_abort_entry: From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 02:40:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E5CB66D4; Sun, 10 Mar 2013 02:40:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6D4A7AA; Sun, 10 Mar 2013 02:40:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A2eoUB013203; Sun, 10 Mar 2013 02:40:50 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A2eo2t013202; Sun, 10 Mar 2013 02:40:50 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100240.r2A2eo2t013202@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 02:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248124 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 02:40:51 -0000 Author: andrew Date: Sun Mar 10 02:40:50 2013 New Revision: 248124 URL: http://svnweb.freebsd.org/changeset/base/248124 Log: Update how we read the stack pointer to work on both GCC and clang. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sun Mar 10 02:38:35 2013 (r248123) +++ head/sys/arm/arm/db_trace.c Sun Mar 10 02:40:50 2013 (r248124) @@ -612,10 +612,13 @@ db_trace_self(void) { #ifdef __ARM_EABI__ struct unwind_state state; - register uint32_t sp __asm__ ("sp"); + uint32_t sp; + + /* Read the stack pointer */ + __asm __volatile("mov %0, sp" : "=&r" (sp)); state.registers[FP] = (uint32_t)__builtin_frame_address(0); - state.registers[SP] = (uint32_t)sp; + state.registers[SP] = sp; state.registers[LR] = (uint32_t)__builtin_return_address(0); state.registers[PC] = (uint32_t)db_trace_self; From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 02:44: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]) by hub.freebsd.org (Postfix) with ESMTP id 38BC1983; Sun, 10 Mar 2013 02:44:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 29DAF7CB; Sun, 10 Mar 2013 02:44:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A2i7ZJ013730; Sun, 10 Mar 2013 02:44:07 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A2i7Fr013729; Sun, 10 Mar 2013 02:44:07 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100244.r2A2i7Fr013729@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 02:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248125 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 02:44:07 -0000 Author: andrew Date: Sun Mar 10 02:44:06 2013 New Revision: 248125 URL: http://svnweb.freebsd.org/changeset/base/248125 Log: Fix a typo where db_printf was spelt printf. Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sun Mar 10 02:40:50 2013 (r248124) +++ head/sys/arm/arm/db_trace.c Sun Mar 10 02:44:06 2013 (r248125) @@ -377,7 +377,7 @@ db_stack_trace_cmd(struct unwind_state * index = db_find_index(state->start_pc); if (index->insn == EXIDX_CANTUNWIND) { - printf("Unable to unwind\n"); + db_printf("Unable to unwind\n"); break; } else if (index->insn & (1 << 31)) { /* The data is within the instruction */ From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 03:52:36 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]) by hub.freebsd.org (Postfix) with ESMTP id 65599CBE; Sun, 10 Mar 2013 03:52:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 41B97A27; Sun, 10 Mar 2013 03:52:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A3qaaC035933; Sun, 10 Mar 2013 03:52:36 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A3qaJN035932; Sun, 10 Mar 2013 03:52:36 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100352.r2A3qaJN035932@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 03:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248126 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 03:52:36 -0000 Author: andrew Date: Sun Mar 10 03:52:35 2013 New Revision: 248126 URL: http://svnweb.freebsd.org/changeset/base/248126 Log: - Clang doesn't understand the -mno-thumb-interwork. Only use it with gcc. - We need to add "-mllvm -arm-enable-ehabi" to clangs CFLAGS when generating the unwind tables to tell it to add the required directives to the assembly it generates. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sun Mar 10 02:44:06 2013 (r248125) +++ head/sys/conf/Makefile.arm Sun Mar 10 03:52:35 2013 (r248126) @@ -39,12 +39,18 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscri STRIP_FLAGS = -S .endif +.if ${COMPILER_TYPE} != "clang" CFLAGS += -mno-thumb-interwork +.endif .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame .elif defined(WITH_ARM_EABI) CFLAGS += -funwind-tables +.if ${COMPILER_TYPE} == "clang" +# clang requires us to tell it to emit assembly with unwind information +CFLAGS += -mllvm -arm-enable-ehabi +.endif .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 03:54:30 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]) by hub.freebsd.org (Postfix) with ESMTP id 8B9D1E3A; Sun, 10 Mar 2013 03:54:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4C8A32; Sun, 10 Mar 2013 03:54:29 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r2A3sJog027553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Mar 2013 14:54:21 +1100 Date: Sun, 10 Mar 2013 14:54:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Davide Italiano Subject: Re: svn commit: r248113 - head/sys/kern In-Reply-To: <201303092003.r29K3BPc089195@svn.freebsd.org> Message-ID: <20130310143353.G1358@besplex.bde.org> References: <201303092003.r29K3BPc089195@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=bNdOu4CZ c=1 sm=1 a=_LPLbtEpN8oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=M4roAWbnUW4A:10 a=D8whqW29NONGbe-aHQ8A:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 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.14 Precedence: list List-Id: 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, 10 Mar 2013 03:54:30 -0000 On Sat, 9 Mar 2013, Davide Italiano wrote: > Log: > Fixup r248032: > Change size requested to malloc(9) now that callwheel buckets are > callout_list and not callout_tailq anymore. This change was already > there but it seems it got lost after code churn in r248032. > > Reported by: alc, kib This still has the bad style that helped cause the bug. > Modified: head/sys/kern/kern_timeout.c > ============================================================================== > --- head/sys/kern/kern_timeout.c Sat Mar 9 20:01:35 2013 (r248112) > +++ head/sys/kern/kern_timeout.c Sat Mar 9 20:03:10 2013 (r248113) > @@ -294,7 +294,7 @@ callout_cpu_init(struct callout_cpu *cc) > > mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE); > SLIST_INIT(&cc->cc_callfree); > - cc->cc_callwheel = malloc(sizeof(struct callout_tailq) * callwheelsize, > + cc->cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, > M_CALLOUT, M_WAITOK); > for (i = 0; i < callwheelsize; i++) > LIST_INIT(&cc->cc_callwheel[i]); > sizeof(*cc->cc_callwheel) is less verbose and works irrespective of the type of *cc->cc_callwheel. In kern, not quite half the malloc()'s have this style bug. Also, at least in kern: - most style bugs in the form of using the MALLOC() obfuscation have been fixed - most style bugs in the form of casting the result of malloc() to support C++ have been fixed. The remaining ones are usually accompanied by the style bug of putting a space after the cast. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 04:38: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]) by hub.freebsd.org (Postfix) with ESMTP id 148DBB73; Sun, 10 Mar 2013 04:38:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F03C2B40; Sun, 10 Mar 2013 04:38:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A4c677049386; Sun, 10 Mar 2013 04:38:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A4c61V049385; Sun, 10 Mar 2013 04:38:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303100438.r2A4c61V049385@svn.freebsd.org> From: Adrian Chadd Date: Sun, 10 Mar 2013 04:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248127 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 04:38:07 -0000 Author: adrian Date: Sun Mar 10 04:38:06 2013 New Revision: 248127 URL: http://svnweb.freebsd.org/changeset/base/248127 Log: Kill this, it's not needed at this point and (hopefully) the parent has correctly locked the ic/vap. Modified: head/sys/net80211/ieee80211_superg.c Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Sun Mar 10 03:52:35 2013 (r248126) +++ head/sys/net80211/ieee80211_superg.c Sun Mar 10 04:38:06 2013 (r248127) @@ -534,8 +534,6 @@ ff_flush(struct mbuf *head, struct mbuf struct ieee80211_node *ni; struct ieee80211vap *vap; - IEEE80211_TX_LOCK_ASSERT(vap->iv_ic); - for (m = head; m != last; m = next) { next = m->m_nextpkt; m->m_nextpkt = NULL; From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 05:04:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7021E16F; Sun, 10 Mar 2013 05:04:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id 94024CB3; Sun, 10 Mar 2013 05:04:26 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id d7so2395032wer.8 for ; Sat, 09 Mar 2013 21:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=iO5oMm7Z+N6X681iVmxwglrEtQCekphv9q8zMr39k6g=; b=OK7ZSwzmAgdeBaMeeCiFTKWm7ESgtgnUtlov5Q3iq1B/Pr4drRiZadT1ysT8JoNYwL lIyrumeCMPZttDIzAwrJJwsWU8kHvHBLli2ySDLjqSExbW8IANjM155hQYy+YyYdbiBD wdXX0UIiBytvqeNKnyUtYAmeqUEyGootvXE2fxgl0O//1JQ4IbPr90X4fwQ3f0eObgrI rYWhb9+yn75hkZT/TUK3LijOKjCGWCpjUJOLDfF1wMD0k1RwDwX3NVGScI4SJAeOmG8W CxsJMBaGfeNxotbse71cMrpgPOn433aw3AYlvCRJb1oI+XLEmyXOW/T3jUdZ3QkK1H/A 1YUw== MIME-Version: 1.0 X-Received: by 10.180.94.135 with SMTP id dc7mr5982973wib.11.1362891865796; Sat, 09 Mar 2013 21:04:25 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.111.201 with HTTP; Sat, 9 Mar 2013 21:04:25 -0800 (PST) In-Reply-To: <201303100438.r2A4c61V049385@svn.freebsd.org> References: <201303100438.r2A4c61V049385@svn.freebsd.org> Date: Sat, 9 Mar 2013 21:04:25 -0800 X-Google-Sender-Auth: m3fUlwh4x41pNVpb3hskmFhbMZ0 Message-ID: Subject: Re: svn commit: r248127 - head/sys/net80211 From: Adrian Chadd To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 05:04:27 -0000 if I break the build again before bsdcan, I promise I'll buy a nice bottle of scotch and distribute small quantities to developers who ask. Adrian On 9 March 2013 20:38, Adrian Chadd wrote: > Author: adrian > Date: Sun Mar 10 04:38:06 2013 > New Revision: 248127 > URL: http://svnweb.freebsd.org/changeset/base/248127 > > Log: > Kill this, it's not needed at this point and (hopefully) the parent > has correctly locked the ic/vap. > > Modified: > head/sys/net80211/ieee80211_superg.c > > Modified: head/sys/net80211/ieee80211_superg.c > ============================================================================== > --- head/sys/net80211/ieee80211_superg.c Sun Mar 10 03:52:35 2013 (r248126) > +++ head/sys/net80211/ieee80211_superg.c Sun Mar 10 04:38:06 2013 (r248127) > @@ -534,8 +534,6 @@ ff_flush(struct mbuf *head, struct mbuf > struct ieee80211_node *ni; > struct ieee80211vap *vap; > > - IEEE80211_TX_LOCK_ASSERT(vap->iv_ic); > - > for (m = head; m != last; m = next) { > next = m->m_nextpkt; > m->m_nextpkt = NULL; From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 07:55:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B32B3E17; Sun, 10 Mar 2013 07:55:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 823E111E; Sun, 10 Mar 2013 07:55:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A7tfBm008845; Sun, 10 Mar 2013 07:55:41 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A7tfZX008843; Sun, 10 Mar 2013 07:55:41 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303100755.r2A7tfZX008843@svn.freebsd.org> From: Andrew Turner Date: Sun, 10 Mar 2013 07:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248128 - in head/sys: conf libkern/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.14 Precedence: list List-Id: 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, 10 Mar 2013 07:55:41 -0000 Author: andrew Date: Sun Mar 10 07:55:40 2013 New Revision: 248128 URL: http://svnweb.freebsd.org/changeset/base/248128 Log: Add __aeabi_memcpy to libkern as clang may generate calls to it. Added: head/sys/libkern/arm/memcpy.S (contents, props changed) Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun Mar 10 04:38:06 2013 (r248127) +++ head/sys/conf/files.arm Sun Mar 10 07:55:40 2013 (r248128) @@ -76,6 +76,7 @@ libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard libkern/arm/ldivmod_helper.c standard +libkern/arm/memcpy.S standard libkern/arm/muldi3.c standard libkern/ashldi3.c standard libkern/ashrdi3.c standard Added: head/sys/libkern/arm/memcpy.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/memcpy.S Sun Mar 10 07:55:40 2013 (r248128) @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2012 Andrew Turner + * 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$"); + +#ifdef __ARM_EABI__ + +ENTRY_NP(__aeabi_memcpy) + b memcpy + +#endif + From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 09:03:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id DCC36B61; Sun, 10 Mar 2013 09:03:07 +0000 (UTC) Date: Sun, 10 Mar 2013 09:03:07 +0000 From: Alexey Dokuchaev To: Gleb Smirnoff Subject: Re: svn commit: r247910 - head/sys/dev/sound/pci/hda Message-ID: <20130310090307.GB66809@FreeBSD.org> References: <201303070754.r277soET065603@svn.freebsd.org> <20130308020050.GC83162@FreeBSD.org> <20130309114804.GI48089@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130309114804.GI48089@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 09:03:07 -0000 On Sat, Mar 09, 2013 at 03:48:04PM +0400, Gleb Smirnoff wrote: > On Fri, Mar 08, 2013 at 02:00:50AM +0000, Alexey Dokuchaev wrote: > A> On Thu, Mar 07, 2013 at 07:54:50AM +0000, Gleb Smirnoff wrote: > A> > New Revision: 247910 > A> > URL: http://svnweb.freebsd.org/changeset/base/247910 > A> > > A> > Log: > A> > Plug a memory leak. > A> > > A> > Reviewed by: mav > A> > Sponsored by: Nginx, Inc. > A> > A> Any MFCs planned? > > Yes, to stable/9. I've tested in on stable/8, also looks applicable. ./danfe From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 09:43:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7DD5B435; Sun, 10 Mar 2013 09:43:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57E313EE; Sun, 10 Mar 2013 09:43:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A9h2r8041962; Sun, 10 Mar 2013 09:43:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2A9h1sp041960; Sun, 10 Mar 2013 09:43:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303100943.r2A9h1sp041960@svn.freebsd.org> From: Adrian Chadd Date: Sun, 10 Mar 2013 09:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248129 - head/sys/dev/ath/ath_hal/ar5416 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.14 Precedence: list List-Id: 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, 10 Mar 2013 09:43:02 -0000 Author: adrian Date: Sun Mar 10 09:43:01 2013 New Revision: 248129 URL: http://svnweb.freebsd.org/changeset/base/248129 Log: Add another register definition bit - whether to populate EVM or PLCP data in the RX status descriptor. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Mar 10 07:55:40 2013 (r248128) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sun Mar 10 09:43:01 2013 (r248129) @@ -521,6 +521,7 @@ #define AR_PCU_TBTT_PROTECT 0x00200000 /* no xmit upto tbtt+20 uS */ #define AR_PCU_CLEAR_VMF 0x01000000 /* clear vmf mode (fast cc)*/ #define AR_PCU_CLEAR_BA_VALID 0x04000000 /* clear ba state */ +#define AR_PCU_SEL_EVM 0x08000000 /* select EVM data or PLCP header */ #define AR_PCU_MISC_MODE2_MGMT_CRYPTO_ENABLE 0x00000002 #define AR_PCU_MISC_MODE2_NO_CRYPTO_FOR_NON_DATA_PKT 0x00000004 From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 10:13: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]) by hub.freebsd.org (Postfix) with ESMTP id 4D4AAB96; Sun, 10 Mar 2013 10:13:06 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [178.238.39.38]) by mx1.freebsd.org (Postfix) with ESMTP id 10A246B5; Sun, 10 Mar 2013 10:13:05 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 737E21CC55A0; Sun, 10 Mar 2013 11:12:58 +0100 (CET) Date: Sun, 10 Mar 2013 11:12:58 +0100 From: Roman Divacky To: Andrew Turner Subject: Re: svn commit: r248119 - in head/sys/arm: arm include Message-ID: <20130310101258.GA50734@freebsd.org> References: <201303092355.r29NtORC061569@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201303092355.r29NtORC061569@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 10:13:06 -0000 Should clang define __FreeBSD_ARCH_armv6__ ? Any other define thats missing and should be defined? Roman On Sat, Mar 09, 2013 at 11:55:24PM +0000, Andrew Turner wrote: > Author: andrew > Date: Sat Mar 9 23:55:23 2013 > New Revision: 248119 > URL: http://svnweb.freebsd.org/changeset/base/248119 > > Log: > __FreeBSD_ARCH_armv6__ is undefined on clang. We can use __ARM_ARCH in > it's place. This makes 'uname -p' correctly output 'armv6' on a kernel > built with clang. > > Modified: > head/sys/arm/arm/disassem.c > head/sys/arm/include/param.h > > Modified: head/sys/arm/arm/disassem.c > ============================================================================== > --- head/sys/arm/arm/disassem.c Sat Mar 9 23:05:19 2013 (r248118) > +++ head/sys/arm/arm/disassem.c Sat Mar 9 23:55:23 2013 (r248119) > @@ -130,7 +130,7 @@ static const struct arm32_insn arm32_i[] > { 0x0c500000, 0x04100000, "ldr", "daW" }, > { 0x0c500000, 0x04400000, "strb", "daW" }, > { 0x0c500000, 0x04500000, "ldrb", "daW" }, > -#ifdef __FreeBSD_ARCH_armv6__ > +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) > { 0xffffffff, 0xf57ff01f, "clrex", "c" }, > { 0x0ff00ff0, 0x01800f90, "strex", "dmo" }, > { 0x0ff00fff, 0x01900f9f, "ldrex", "do" }, > > Modified: head/sys/arm/include/param.h > ============================================================================== > --- head/sys/arm/include/param.h Sat Mar 9 23:05:19 2013 (r248118) > +++ head/sys/arm/include/param.h Sat Mar 9 23:55:23 2013 (r248119) > @@ -56,7 +56,7 @@ > #define MACHINE "arm" > #endif > #ifndef MACHINE_ARCH > -#ifdef __FreeBSD_ARCH_armv6__ > +#if defined(__FreeBSD_ARCH_armv6__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 6) > #ifdef __ARMEB__ > #define MACHINE_ARCH "armv6eb" > #else From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 17:10:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C503C33F; Sun, 10 Mar 2013 17:10:16 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AD05D79D; Sun, 10 Mar 2013 17:10:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AHAG7W075859; Sun, 10 Mar 2013 17:10:16 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AHAGSd075858; Sun, 10 Mar 2013 17:10:16 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201303101710.r2AHAGSd075858@svn.freebsd.org> From: Antoine Brodin Date: Sun, 10 Mar 2013 17:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248133 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 17:10:16 -0000 Author: antoine Date: Sun Mar 10 17:10:16 2013 New Revision: 248133 URL: http://svnweb.freebsd.org/changeset/base/248133 Log: Fix a typo in DPADD. Modified: head/usr.sbin/pkg/Makefile Modified: head/usr.sbin/pkg/Makefile ============================================================================== --- head/usr.sbin/pkg/Makefile Sun Mar 10 15:02:30 2013 (r248132) +++ head/usr.sbin/pkg/Makefile Sun Mar 10 17:10:16 2013 (r248133) @@ -4,7 +4,7 @@ PROG= pkg SRCS= pkg.c dns_utils.c config.c NO_MAN= yes -DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBBSDYML} ${LIBSUBF} +DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBBSDYML} ${LIBSBUF} LDADD= -larchive -lelf -lfetch -lbsdyml -lsbuf .include From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 17: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]) by hub.freebsd.org (Postfix) with ESMTP id B5B81925; Sun, 10 Mar 2013 17:33:41 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9F9869; Sun, 10 Mar 2013 17:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AHXfi1083760; Sun, 10 Mar 2013 17:33:41 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AHXfsA083759; Sun, 10 Mar 2013 17:33:41 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201303101733.r2AHXfsA083759@svn.freebsd.org> From: Antoine Brodin Date: Sun, 10 Mar 2013 17:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248135 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 17:33:41 -0000 Author: antoine Date: Sun Mar 10 17:33:41 2013 New Revision: 248135 URL: http://svnweb.freebsd.org/changeset/base/248135 Log: Finish portalfs removal. Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sun Mar 10 17:30:57 2013 (r248134) +++ head/etc/mtree/BSD.include.dist Sun Mar 10 17:33:41 2013 (r248135) @@ -174,8 +174,6 @@ .. nullfs .. - portalfs - .. procfs .. udf From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 17:49:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AE4B4F00; Sun, 10 Mar 2013 17:49:59 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A0CDA907; Sun, 10 Mar 2013 17:49:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AHnxSD087555; Sun, 10 Mar 2013 17:49:59 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AHnxZ3087554; Sun, 10 Mar 2013 17:49:59 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201303101749.r2AHnxZ3087554@svn.freebsd.org> From: Antoine Brodin Date: Sun, 10 Mar 2013 17:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248136 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 17:49:59 -0000 Author: antoine Date: Sun Mar 10 17:49:59 2013 New Revision: 248136 URL: http://svnweb.freebsd.org/changeset/base/248136 Log: Add more obsolete files. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 10 17:33:41 2013 (r248135) +++ head/ObsoleteFiles.inc Sun Mar 10 17:49:59 2013 (r248136) @@ -99,6 +99,12 @@ OLD_FILES+=usr/share/man/man8/mount_port OLD_FILES+=usr/share/man/man4/coda.4.gz # 20130302: XFS support removed OLD_FILES+=usr/share/man/man5/xfs.5.gz +# 20130302: Capsicum overhaul +OLD_FILES+=usr/share/man/man2/cap_getrights.2.gz +OLD_FILES+=usr/share/man/man2/cap_new.2.gz +# 20130213: OpenSSL 1.0.1e import +OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover.3.gz +OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_verifyrecover_init.3.gz # 20130116: removed long unused directories for .1aout section manpages OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout OLD_FILES+=usr/share/man/en.UTF-8/man1aout From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 18:28:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F0CE8CD; Sun, 10 Mar 2013 18:28:02 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 379C3A28; Sun, 10 Mar 2013 18:28:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AIS2FA099789; Sun, 10 Mar 2013 18:28:02 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AIS2kL099788; Sun, 10 Mar 2013 18:28:02 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201303101828.r2AIS2kL099788@svn.freebsd.org> From: Antoine Brodin Date: Sun, 10 Mar 2013 18:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248138 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 18:28:02 -0000 Author: antoine Date: Sun Mar 10 18:28:01 2013 New Revision: 248138 URL: http://svnweb.freebsd.org/changeset/base/248138 Log: Add 2 more obsolete files. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 10 17:50:19 2013 (r248137) +++ head/ObsoleteFiles.inc Sun Mar 10 18:28:01 2013 (r248138) @@ -71,6 +71,8 @@ OLD_FILES+=usr/lib32/libncp.so OLD_LIBS+=usr/lib32/libncp.so.4 OLD_FILES+=usr/lib32/libncp_p.a OLD_FILES+=usr/sbin/mount_nwfs +OLD_FILES+=usr/share/examples/nwclient/dot.nwfsrc +OLD_FILES+=usr/share/examples/nwclient/nwfs.sh.sample OLD_FILES+=usr/share/man/man1/ncplist.1.gz OLD_FILES+=usr/share/man/man1/ncplogin.1.gz OLD_FILES+=usr/share/man/man1/ncplogout.1.gz From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 19:14: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]) by hub.freebsd.org (Postfix) with ESMTP id 982881C8; Sun, 10 Mar 2013 19:14:09 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 897C4B66; Sun, 10 Mar 2013 19:14:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AJE9K9015327; Sun, 10 Mar 2013 19:14:09 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AJE9s6015325; Sun, 10 Mar 2013 19:14:09 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201303101914.r2AJE9s6015325@svn.freebsd.org> From: Antoine Brodin Date: Sun, 10 Mar 2013 19:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248139 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 19:14:09 -0000 Author: antoine Date: Sun Mar 10 19:14:09 2013 New Revision: 248139 URL: http://svnweb.freebsd.org/changeset/base/248139 Log: Correct a date, add an obsolete directory. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 10 18:28:01 2013 (r248138) +++ head/ObsoleteFiles.inc Sun Mar 10 19:14:09 2013 (r248139) @@ -38,7 +38,7 @@ # xargs -n1 | sort | uniq -d; # done -# 20130902: NWFS and NCP supports removed +# 20130309: NWFS and NCP supports removed OLD_FILES+=usr/bin/ncplist OLD_FILES+=usr/bin/ncplogin OLD_FILES+=usr/bin/ncplogout @@ -73,6 +73,7 @@ OLD_FILES+=usr/lib32/libncp_p.a OLD_FILES+=usr/sbin/mount_nwfs OLD_FILES+=usr/share/examples/nwclient/dot.nwfsrc OLD_FILES+=usr/share/examples/nwclient/nwfs.sh.sample +OLD_DIRS+=usr/share/examples/nwclient OLD_FILES+=usr/share/man/man1/ncplist.1.gz OLD_FILES+=usr/share/man/man1/ncplogin.1.gz OLD_FILES+=usr/share/man/man1/ncplogout.1.gz From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 21:07:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2E6D2A89; Sun, 10 Mar 2013 21:07:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1ACFE3; Sun, 10 Mar 2013 21:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AL7imk048639; Sun, 10 Mar 2013 21:07:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AL7iCY048637; Sun, 10 Mar 2013 21:07:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201303102107.r2AL7iCY048637@svn.freebsd.org> From: Alan Cox Date: Sun, 10 Mar 2013 21:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248140 - in head/sys: amd64/amd64 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.14 Precedence: list List-Id: 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, 10 Mar 2013 21:07:45 -0000 Author: alc Date: Sun Mar 10 21:07:44 2013 New Revision: 248140 URL: http://svnweb.freebsd.org/changeset/base/248140 Log: The kernel pmap is statically allocated, so there is really no need to explicitly initialize its pm_root field to zero. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Mar 10 19:14:09 2013 (r248139) +++ head/sys/amd64/amd64/pmap.c Sun Mar 10 21:07:44 2013 (r248140) @@ -669,7 +669,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); - kernel_pmap->pm_root = NULL; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Mar 10 19:14:09 2013 (r248139) +++ head/sys/i386/i386/pmap.c Sun Mar 10 21:07:44 2013 (r248140) @@ -392,7 +392,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) #ifdef PAE kernel_pmap->pm_pdpt = (pdpt_entry_t *) (KERNBASE + (u_int)IdlePDPT); #endif - kernel_pmap->pm_root = NULL; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 21:44: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]) by hub.freebsd.org (Postfix) with ESMTP id 3A992713; Sun, 10 Mar 2013 21:44:14 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id E9F461AC; Sun, 10 Mar 2013 21:44:13 +0000 (UTC) Received: from JRE-MBP-2.local (c-98-210-232-101.hsd1.ca.comcast.net [98.210.232.101]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id r2ALiCqk028695 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 10 Mar 2013 14:44:13 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <513CFEAD.5060505@freebsd.org> Date: Sun, 10 Mar 2013 14:44:13 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 MIME-Version: 1.0 To: Davide Italiano Subject: Re: svn commit: r247777 - in head/sys: conf kern netinet sys References: <201303041109.r24B9vbt022388@svn.freebsd.org> In-Reply-To: <201303041109.r24B9vbt022388@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 21:44:14 -0000 On 3/4/13 3:09 AM, Davide Italiano wrote: > Author: davide > Date: Mon Mar 4 11:09:56 2013 > New Revision: 247777 > URL: http://svnweb.freebsd.org/changeset/base/247777 > > Log: > - Make callout(9) tickless, relying on eventtimers(4) as backend for > precise time event generation. This greatly improves granularity of > callouts which are not anymore constrained to wait next tick to be > scheduled. [etc.] Will there be (or is there already) a paper/document somewhere/sometime outlining how this works? (with pictures) :-) Julian From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 22:18:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5D9315D6 for ; Sun, 10 Mar 2013 22:18:13 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id BBD8C30B for ; Sun, 10 Mar 2013 22:18:12 +0000 (UTC) Received: (qmail 97337 invoked from network); 10 Mar 2013 23:31:03 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 10 Mar 2013 23:31:03 -0000 Message-ID: <513D06A3.6090304@freebsd.org> Date: Sun, 10 Mar 2013 23:18:11 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Davide Italiano Subject: Re: svn commit: r248113 - head/sys/kern References: <201303092003.r29K3BPc089195@svn.freebsd.org> In-Reply-To: <201303092003.r29K3BPc089195@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 22:18:13 -0000 On 09.03.2013 21:03, Davide Italiano wrote: > Author: davide > Date: Sat Mar 9 20:03:10 2013 > New Revision: 248113 > URL: http://svnweb.freebsd.org/changeset/base/248113 > > Log: > Fixup r248032: > Change size requested to malloc(9) now that callwheel buckets are > callout_list and not callout_tailq anymore. This change was already > there but it seems it got lost after code churn in r248032. Sorry, I have missed this change while forward-porting the patch. The (light) testing of the kernel didn't blow up. Actually I did the commit from it. :-/ -- Andre > Reported by: alc, kib > > Modified: > head/sys/kern/kern_timeout.c > > Modified: head/sys/kern/kern_timeout.c > ============================================================================== > --- head/sys/kern/kern_timeout.c Sat Mar 9 20:01:35 2013 (r248112) > +++ head/sys/kern/kern_timeout.c Sat Mar 9 20:03:10 2013 (r248113) > @@ -294,7 +294,7 @@ callout_cpu_init(struct callout_cpu *cc) > > mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE); > SLIST_INIT(&cc->cc_callfree); > - cc->cc_callwheel = malloc(sizeof(struct callout_tailq) * callwheelsize, > + cc->cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, > M_CALLOUT, M_WAITOK); > for (i = 0; i < callwheelsize; i++) > LIST_INIT(&cc->cc_callwheel[i]); > > From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 22:55:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 21DC2E42; Sun, 10 Mar 2013 22:55:36 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09B2E63B; Sun, 10 Mar 2013 22:55:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2AMtZ0E081610; Sun, 10 Mar 2013 22:55:35 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2AMtZEt081609; Sun, 10 Mar 2013 22:55:35 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201303102255.r2AMtZEt081609@svn.freebsd.org> From: Andre Oppermann Date: Sun, 10 Mar 2013 22:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248141 - 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.14 Precedence: list List-Id: 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, 10 Mar 2013 22:55:36 -0000 Author: andre Date: Sun Mar 10 22:55:35 2013 New Revision: 248141 URL: http://svnweb.freebsd.org/changeset/base/248141 Log: Bring back the comment on the sizing of the callout array that got lost in r248031. Requested by: alc, alfred Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Sun Mar 10 21:07:44 2013 (r248140) +++ head/sys/kern/kern_timeout.c Sun Mar 10 22:55:35 2013 (r248141) @@ -258,6 +258,8 @@ callout_callwheel_init(void *dummy) /* * Calculate the size of the callout wheel and the preallocated * timeout() structures. + * XXX: Clip callout to result of previous function of maxusers + * maximum 384. This is still huge, but acceptable. */ ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); From owner-svn-src-head@FreeBSD.ORG Sun Mar 10 22:56:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B6E88FAD for ; Sun, 10 Mar 2013 22:56:02 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2E79563F for ; Sun, 10 Mar 2013 22:56:02 +0000 (UTC) Received: (qmail 97466 invoked from network); 11 Mar 2013 00:08:53 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 11 Mar 2013 00:08:53 -0000 Message-ID: <513D0F80.80405@freebsd.org> Date: Sun, 10 Mar 2013 23:56:00 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Alan Cox Subject: Re: svn commit: r248031 - in head/sys: kern sys References: <201303081014.r28AEwet053196@svn.freebsd.org> <513A2B3E.2070804@rice.edu> In-Reply-To: <513A2B3E.2070804@rice.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 10 Mar 2013 22:56:02 -0000 On 08.03.2013 19:17, Alan Cox wrote: > On 03/08/2013 04:14, Andre Oppermann wrote: >> Author: andre >> Date: Fri Mar 8 10:14:58 2013 >> New Revision: 248031 >> URL: http://svnweb.freebsd.org/changeset/base/248031 >> >> Log: >> Move the auto-sizing of the callout array from init_param2() to >> kern_timeout_callwheel_alloc() where it is actually used. >> >> This is a mechanical move and no tuning parameters are changed. >> >> The pre-allocated callout array is only used for legacy timeout(9) >> calls and is only allocated and active on cpu0. Eventually all >> remaining users of timeout(9) should switch to the callout_* API. >> > > In the meantime, until all legacy timeout(9) users are updated, I think > that it would be wise to retain the comment that describes where the > magic number 18508 comes from. A valid point. Reintroduced in r248141. I was investigating the current users of timeout() and couldn't find any remaining direct relation to maxproc or maxfiles. The use of timeout(9) is almost entirely limited to drivers in the CAM/SCSI area to manage CCB's. The highest number of outstanding transactions and timers seems to be limited to around 256 per driver. The majority of those also seem to be rather easy and mostly mechanical callout_* conversion targets. This is only a preliminary finding though, I didn't attempt to convert any of those. -- Andre From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 00:42: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]) by hub.freebsd.org (Postfix) with ESMTP id 5C18F53F; Mon, 11 Mar 2013 00:42:24 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) by mx1.freebsd.org (Postfix) with ESMTP id 267DB9B8; Mon, 11 Mar 2013 00:42:23 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id r2B0Om7Z015492; Sun, 10 Mar 2013 19:42:17 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 1ayt5drfee-1; Sun, 10 Mar 2013 19:42:17 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 86C4B40023; Sun, 10 Mar 2013 19:42:16 -0500 (CDT) Message-ID: <513D2867.2020206@rice.edu> Date: Sun, 10 Mar 2013 19:42:15 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130127 Thunderbird/17.0.2 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r248031 - in head/sys: kern sys References: <201303081014.r28AEwet053196@svn.freebsd.org> <513A2B3E.2070804@rice.edu> <513D0F80.80405@freebsd.org> In-Reply-To: <513D0F80.80405@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5400 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=4 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1111160001 definitions=main-1101130121 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.14 Precedence: list List-Id: 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, 11 Mar 2013 00:42:24 -0000 On 03/10/2013 17:56, Andre Oppermann wrote: > On 08.03.2013 19:17, Alan Cox wrote: >> On 03/08/2013 04:14, Andre Oppermann wrote: >>> Author: andre >>> Date: Fri Mar 8 10:14:58 2013 >>> New Revision: 248031 >>> URL: http://svnweb.freebsd.org/changeset/base/248031 >>> >>> Log: >>> Move the auto-sizing of the callout array from init_param2() to >>> kern_timeout_callwheel_alloc() where it is actually used. >>> >>> This is a mechanical move and no tuning parameters are changed. >>> >>> The pre-allocated callout array is only used for legacy timeout(9) >>> calls and is only allocated and active on cpu0. Eventually all >>> remaining users of timeout(9) should switch to the callout_* API. >>> >> >> In the meantime, until all legacy timeout(9) users are updated, I think >> that it would be wise to retain the comment that describes where the >> magic number 18508 comes from. > > A valid point. Reintroduced in r248141. Thank you! From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 04:19:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 29293FF4; Mon, 11 Mar 2013 04:19:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11DAC2FE; Mon, 11 Mar 2013 04:19:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2B4JAxf079545; Mon, 11 Mar 2013 04:19:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2B4JAfo079544; Mon, 11 Mar 2013 04:19:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303110419.r2B4JAfo079544@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Mar 2013 04:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248142 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 11 Mar 2013 04:19:11 -0000 Author: adrian Date: Mon Mar 11 04:19:10 2013 New Revision: 248142 URL: http://svnweb.freebsd.org/changeset/base/248142 Log: Add three-stream EVM values. Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Sun Mar 10 22:55:35 2013 (r248141) +++ head/sys/dev/ath/if_ath_rx.c Mon Mar 11 04:19:10 2013 (r248142) @@ -399,7 +399,9 @@ ath_rx_tap_vendor(struct ifnet *ifp, str sc->sc_rx_th.wr_v.evm[0] = rs->rs_evm0; sc->sc_rx_th.wr_v.evm[1] = rs->rs_evm1; sc->sc_rx_th.wr_v.evm[2] = rs->rs_evm2; - /* XXX TODO: extend this to include 3-stream EVM */ + /* These are only populated from the AR9300 or later */ + sc->sc_rx_th.wr_v.evm[3] = rs->rs_evm3; + sc->sc_rx_th.wr_v.evm[4] = rs->rs_evm4; /* phyerr info */ if (rs->rs_status & HAL_RXERR_PHY) From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 06:01:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6797ABB8; Mon, 11 Mar 2013 06:01:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2EC7E1; Mon, 11 Mar 2013 06:01:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2B611qw010750; Mon, 11 Mar 2013 06:01:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2B611hh010748; Mon, 11 Mar 2013 06:01:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303110601.r2B611hh010748@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Mar 2013 06:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248143 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 11 Mar 2013 06:01:01 -0000 Author: adrian Date: Mon Mar 11 06:01:00 2013 New Revision: 248143 URL: http://svnweb.freebsd.org/changeset/base/248143 Log: Bump the EVM array size up to fit the AR9380 EVM entries. Modified: head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Mar 11 04:19:10 2013 (r248142) +++ head/sys/dev/ath/if_athioctl.h Mon Mar 11 06:01:00 2013 (r248143) @@ -273,6 +273,12 @@ struct ath_rateioctl { #define ATH_RADIOTAP_MAX_CHAINS 4 /* + * AR9380 and later chips are 3x3, which requires + * 5 EVM DWORDs in HT40 mode. + */ +#define ATH_RADIOTAP_MAX_EVM 5 + +/* * The vendor radiotap header data needs to be: * * + Aligned to a 4 byte address @@ -291,7 +297,7 @@ struct ath_radiotap_vendor_hdr { /* 30 uint8_t vh_rx_chainmask; /* 1 */ /* At this point it should be 4 byte aligned */ - uint32_t evm[ATH_RADIOTAP_MAX_CHAINS]; /* 4 * 4 = 16 */ + uint32_t evm[ATH_RADIOTAP_MAX_EVM]; /* 5 * 4 = 20 */ uint8_t rssi_ctl[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ uint8_t rssi_ext[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 06:54:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34F764B3; Mon, 11 Mar 2013 06:54:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 04E0994B; Mon, 11 Mar 2013 06:54:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2B6swMZ026248; Mon, 11 Mar 2013 06:54:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2B6swnJ026246; Mon, 11 Mar 2013 06:54:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303110654.r2B6swnJ026246@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Mar 2013 06:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248146 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 11 Mar 2013 06:54:59 -0000 Author: adrian Date: Mon Mar 11 06:54:58 2013 New Revision: 248146 URL: http://svnweb.freebsd.org/changeset/base/248146 Log: Add a few new fields to the RX vendor radiotap header: * a flags field that lets me know what's going on; * the hardware ratecode, unmolested by conversion to a bitrate; * the HAL rs_flags field, useful for debugging; * specifically mark aggregate sub-frames. This stuff sorely needs tidying up - it's missing some important stuff (eg numdelims) and it would be nice to put the flags at the beginning rather than at the end. Tested: * AR9380, STA mode, 2x2 HT40, monitoring RSSI and EVM values Modified: head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Mon Mar 11 06:17:46 2013 (r248145) +++ head/sys/dev/ath/if_ath_rx.c Mon Mar 11 06:54:58 2013 (r248146) @@ -403,11 +403,27 @@ ath_rx_tap_vendor(struct ifnet *ifp, str sc->sc_rx_th.wr_v.evm[3] = rs->rs_evm3; sc->sc_rx_th.wr_v.evm[4] = rs->rs_evm4; + /* direction */ + sc->sc_rx_th.wr_v.vh_flags = ATH_VENDOR_PKT_RX; + + /* RX rate */ + sc->sc_rx_th.wr_v.vh_rx_hwrate = rs->rs_rate; + + /* RX flags */ + sc->sc_rx_th.wr_v.vh_rs_flags = rs->rs_flags; + + if (rs->rs_isaggr) + sc->sc_rx_th.wr_v.vh_flags |= ATH_VENDOR_PKT_ISAGGR; + if (rs->rs_moreaggr) + sc->sc_rx_th.wr_v.vh_flags |= ATH_VENDOR_PKT_MOREAGGR; + /* phyerr info */ - if (rs->rs_status & HAL_RXERR_PHY) + if (rs->rs_status & HAL_RXERR_PHY) { sc->sc_rx_th.wr_v.vh_phyerr_code = rs->rs_phyerr; - else + sc->sc_rx_th.wr_v.vh_flags |= ATH_VENDOR_PKT_RXPHYERR; + } else { sc->sc_rx_th.wr_v.vh_phyerr_code = 0xff; + } sc->sc_rx_th.wr_v.vh_rs_status = rs->rs_status; sc->sc_rx_th.wr_v.vh_rssi = rs->rs_rssi; } Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Mon Mar 11 06:17:46 2013 (r248145) +++ head/sys/dev/ath/if_athioctl.h Mon Mar 11 06:54:58 2013 (r248146) @@ -305,7 +305,16 @@ struct ath_radiotap_vendor_hdr { /* 30 uint8_t vh_phyerr_code; /* Phy error code, or 0xff */ uint8_t vh_rs_status; /* RX status */ uint8_t vh_rssi; /* Raw RSSI */ - uint8_t vh_pad1[1]; /* Pad to 4 byte boundary */ + uint8_t vh_flags; /* General flags */ +#define ATH_VENDOR_PKT_RX 0x01 +#define ATH_VENDOR_PKT_TX 0x02 +#define ATH_VENDOR_PKT_RXPHYERR 0x04 +#define ATH_VENDOR_PKT_ISAGGR 0x08 +#define ATH_VENDOR_PKT_MOREAGGR 0x10 + + uint8_t vh_rx_hwrate; /* hardware RX ratecode */ + uint8_t vh_rs_flags; /* RX HAL flags */ + uint8_t vh_pad[2]; /* pad to DWORD boundary */ } __packed; #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 07:38:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 876FAC4C; Mon, 11 Mar 2013 07:38:23 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by mx1.freebsd.org (Postfix) with ESMTP id 4F318A7B; Mon, 11 Mar 2013 07:38:23 +0000 (UTC) Received: from mxin2-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0MJH00IUYJVQTJ20@smtp5.clear.net.nz>; Mon, 11 Mar 2013 20:38:16 +1300 (NZDT) Received: from 202-0-48-19.paradise.net.nz (HELO bender) ([202.0.48.19]) by smtpin2.paradise.net.nz with ESMTP; Mon, 11 Mar 2013 20:38:14 +1300 Date: Mon, 11 Mar 2013 20:37:49 +1300 From: Andrew Turner Subject: Re: svn commit: r248119 - in head/sys/arm: arm include In-reply-to: <20130310101258.GA50734@freebsd.org> To: Roman Divacky Message-id: <20130311203749.199bd1cc@bender> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <201303092355.r29NtORC061569@svn.freebsd.org> <20130310101258.GA50734@freebsd.org> Cc: Andrew Turner , 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.14 Precedence: list List-Id: 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, 11 Mar 2013 07:38:23 -0000 On Sun, 10 Mar 2013 11:12:58 +0100 Roman Divacky wrote: > Should clang define __FreeBSD_ARCH_armv6__ ? Any other define thats > missing and should be defined? It was discussed when I added FreeBSD/ARM support to clang. I originally had it, however it was decided to remove it as __ARM_ARCH encodes the required information without adding a FreeBSD specific macro. __FreeBSD_ARCH_armv6__ is only defined in our copy of gcc so shouldn't be relied upon. Andrew From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 08:54: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]) by hub.freebsd.org (Postfix) with ESMTP id 2FB1E1E6; Mon, 11 Mar 2013 08:54:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id AFD99E93; Mon, 11 Mar 2013 08:54:57 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r2B8sruE003871; Mon, 11 Mar 2013 10:54:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.0 kib.kiev.ua r2B8sruE003871 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r2B8srsg003870; Mon, 11 Mar 2013 10:54:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 11 Mar 2013 10:54:53 +0200 From: Konstantin Belousov To: Jean-S??bastien P??dron Subject: Re: svn commit: r248060 - in head/sys/dev/drm2: . ttm Message-ID: <20130311085453.GQ3794@kib.kiev.ua> References: <201303081811.r28IB2JI009017@svn.freebsd.org> <513D985F.40902@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wR9Y6Ks0OCEmDFVd" Content-Disposition: inline In-Reply-To: <513D985F.40902@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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, Konstantin Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 08:54:58 -0000 --wR9Y6Ks0OCEmDFVd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2013 at 09:39:59AM +0100, Jean-S??bastien P??dron wrote: > Hi Eitan! >=20 > On 08.03.2013 19:14, Eitan Adler wrote: > > On 8 March 2013 13:11, Jean-Sebastien Pedron wro= te: > >> @@ -125,8 +125,6 @@ static ssize_t ttm_mem_zone_store(struct > >> > >> static void ttm_mem_global_kobj_release(struct ttm_mem_global *glob) > >> { > >> - > >> - free(glob, M_TTM_ZONE); > >> } > >=20 > > Can this function now be removed, because it appears to be empty? >=20 > I guess we could get rid of the reference counting too, because we > already have a refcount in the struct drm_global_reference containing > struct ttm_mem_global or struct ttm_bo_global. This needs further > investigation though. >=20 > Konstantin, what do you think about this? I do not like neither removing the release method, nor reference counting. I made only absolutely neccessary changes to the TTM to get it into FreeBSD. What is proposed is a start of rewrite. --wR9Y6Ks0OCEmDFVd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRPZvdAAoJEJDCuSvBvK1B7eYQAJ+JwopU75ukPp3X201Bmtnt bpZq340oO+NNheQ1nEVI0ObwPr/xPnME7H7cqj6p/JW+/ttk+SLKl7ZtgWVLw+QZ hjQzxwaXkJvgx/fwkFsfoKMy2KrxAssg2N9GdRAw30uO+nIVNHbOsiISPjKTUxWf cnoBEwxGdyILRsEAC1+WOqHDI5IaiN0d4eUl4VT2Jc8G69htP+Mjc1Slhle3MkKA 0j5KbpXPJsA76bI+Ltum+c/JdW5hSWq/ugiuIIs8/NYO4dDaY5kxmzpqmN4Yrz3h io1btt678UYKNpG1v6eyGZrEVu3+2vsSacpJAvEil67K6lXQ0ZeJGny7Aj/m+5SU qEAlnyslA3alrzqHoyKK3yK9rKtF26xJ1LyWd+nJ/x13pT4Pg7DntXf7rlgWWP+B 8DLkd8EFeFPVC2fM9r8wajbpFAim2LZviRA4Yvi1LgFTM/qDCfABAwztnz7F9Jm6 QMqkbQSH/RnZMjQw610Vv+0Au90q+uzjszRTdIDiH9VEJlXRKpkdQ5KI6ZOnQKE4 pYo855OXdVfnaly1yLNAoUl8T0CW4ElmT5gXcan8PjUSgr0SQsDF+/dktPUngMdt 2GI3B01FtZR6l1eb0LgFSU5iTcJXdUmNKbPaJirfhHrYn/n+RPEUToZkWKWTgl/G L1iIuNUJUv3ph81+GTeo =GuA1 -----END PGP SIGNATURE----- --wR9Y6Ks0OCEmDFVd-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 09:03: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]) by hub.freebsd.org (Postfix) with ESMTP id 34BE043B; Mon, 11 Mar 2013 09:03:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (ns25270.ovh.net [91.121.29.24]) by mx1.freebsd.org (Postfix) with ESMTP id 757E7EDB; Mon, 11 Mar 2013 09:03:15 +0000 (UTC) Received: from [46.255.176.2] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UEyH7-000PX5-Kf; Mon, 11 Mar 2013 09:40:06 +0100 Message-ID: <513D985F.40902@FreeBSD.org> Date: Mon, 11 Mar 2013 09:39:59 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130220 Thunderbird/17.0.3 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r248060 - in head/sys/dev/drm2: . ttm References: <201303081811.r28IB2JI009017@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2WTKXFMAQXWVIJSFLJVCE" Cc: svn-src-head@freebsd.org, Konstantin Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 09:03:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2WTKXFMAQXWVIJSFLJVCE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Eitan! On 08.03.2013 19:14, Eitan Adler wrote: > On 8 March 2013 13:11, Jean-Sebastien Pedron wro= te: >> @@ -125,8 +125,6 @@ static ssize_t ttm_mem_zone_store(struct >> >> static void ttm_mem_global_kobj_release(struct ttm_mem_global *glob) >> { >> - >> - free(glob, M_TTM_ZONE); >> } >=20 > Can this function now be removed, because it appears to be empty? I guess we could get rid of the reference counting too, because we already have a refcount in the struct drm_global_reference containing struct ttm_mem_global or struct ttm_bo_global. This needs further investigation though. Konstantin, what do you think about this? --=20 Jean-S=C3=A9bastien P=C3=A9dron ------enig2WTKXFMAQXWVIJSFLJVCE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlE9mGUACgkQa+xGJsFYOlMQdgCfSDT94mj0xVoRz4DSDxa8Byfw qXEAn1wZFDZ486F62rLnH7X5omK276Nz =9sWL -----END PGP SIGNATURE----- ------enig2WTKXFMAQXWVIJSFLJVCE-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 10:48:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 67147D64; Mon, 11 Mar 2013 10:48:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1F967D; Mon, 11 Mar 2013 10:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BAmRkG096489; Mon, 11 Mar 2013 10:48:27 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BAmQNr096485; Mon, 11 Mar 2013 10:48:26 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201303111048.r2BAmQNr096485@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 11 Mar 2013 10:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248151 - in head: . share/examples/cvsup 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.14 Precedence: list List-Id: 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, 11 Mar 2013 10:48:27 -0000 Author: bapt Date: Mon Mar 11 10:48:26 2013 New Revision: 248151 URL: http://svnweb.freebsd.org/changeset/base/248151 Log: Ports are no more exported via cvsup, remove cvsup examples and documentation refering to ports MFC after: 2 days Deleted: head/share/examples/cvsup/ports-supfile head/share/examples/cvsup/refuse head/share/examples/cvsup/refuse.README Modified: head/ObsoleteFiles.inc head/share/examples/cvsup/README head/share/examples/cvsup/cvs-supfile head/share/examples/cvsup/stable-supfile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 11 08:21:43 2013 (r248150) +++ head/ObsoleteFiles.inc Mon Mar 11 10:48:26 2013 (r248151) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20130311: Ports are no more available via cvsup +OLD_FILES+=usr/share/examples/cvsup/ports-supfile +OLD_FILES+=usr/share/examples/cvsup/refuse +OLD_FILES+=usr/share/examples/cvsup/refuse.README # 20130309: NWFS and NCP supports removed OLD_FILES+=usr/bin/ncplist OLD_FILES+=usr/bin/ncplogin Modified: head/share/examples/cvsup/README ============================================================================== --- head/share/examples/cvsup/README Mon Mar 11 08:21:43 2013 (r248150) +++ head/share/examples/cvsup/README Mon Mar 11 10:48:26 2013 (r248151) @@ -19,8 +19,6 @@ To maintain the sources for the FreeBSD- standard-supfile Main source tree - ports-supfile Ports collection - To maintain the sources for the FreeBSD-stable release, use: stable-supfile Main source tree @@ -28,7 +26,7 @@ To maintain the sources for the FreeBSD- To maintain a copy of the CVS repository containing all versions of FreeBSD, use: - cvs-supfile Main source tree and ports collection + cvs-supfile Main source tree collection IMPORTANT: Before you use any of the supfiles in this directory, you will need to edit in an appropriate "host" setting. See: Modified: head/share/examples/cvsup/cvs-supfile ============================================================================== --- head/share/examples/cvsup/cvs-supfile Mon Mar 11 08:21:43 2013 (r248150) +++ head/share/examples/cvsup/cvs-supfile Mon Mar 11 10:48:26 2013 (r248151) @@ -43,9 +43,8 @@ # prefix=/home/ncvs # This specifies where to place the requested files. A # setting of "/home/ncvs" will place all of the files -# requested in /home/ncvs (e.g., "/home/ncvs/src/bin", -# "/home/ncvs/ports/archivers"). The prefix directory -# must exist in order to run CVSup. +# requested in /home/ncvs (e.g., "/home/ncvs/src/bin"). +# The prefix directory must exist in order to run CVSup. # Defaults that apply to all the collections # @@ -68,13 +67,6 @@ # mega-collection. It includes all of the individual "src-*" collections. src-all -## Ports Collection. -# -# The easiest way to get the ports tree is to use the "ports-all" -# mega-collection. It includes all of the individual "ports-*" -# collections, -ports-all - ## Projects # # This collection retrieves the projects tree of the FreeBSD Modified: head/share/examples/cvsup/stable-supfile ============================================================================== --- head/share/examples/cvsup/stable-supfile Mon Mar 11 08:21:43 2013 (r248150) +++ head/share/examples/cvsup/stable-supfile Mon Mar 11 10:48:26 2013 (r248151) @@ -46,21 +46,6 @@ # in "/usr/src" (e.g., "/usr/src/bin", "/usr/src/lib"). # The prefix directory must exist in order to run CVSup. # -############################################################################### -# -# DANGER! WARNING! LOOK OUT! VORSICHT! -# -# If you add any of the ports collections to this file, be sure to -# specify them with a "tag" value set to ".", like this: -# -# ports-all tag=. -# -# If you leave out the "tag=." portion, CVSup will delete all of -# the files in your ports. That is because the ports -# collections do not use the same tags as the main part of the FreeBSD -# source tree. -# -############################################################################### # Defaults that apply to all the collections # From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 10:56:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00F461A1; Mon, 11 Mar 2013 10:56:46 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CF0356C7; Mon, 11 Mar 2013 10:56:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BAukbO099279; Mon, 11 Mar 2013 10:56:46 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BAukIM099278; Mon, 11 Mar 2013 10:56:46 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201303111056.r2BAukIM099278@svn.freebsd.org> From: Olivier Houchard Date: Mon, 11 Mar 2013 10:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248153 - head/sys/arm/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.14 Precedence: list List-Id: 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, 11 Mar 2013 10:56:47 -0000 Author: cognet Date: Mon Mar 11 10:56:46 2013 New Revision: 248153 URL: http://svnweb.freebsd.org/changeset/base/248153 Log: Don't use an empty struct. Modified: head/sys/arm/include/signal.h Modified: head/sys/arm/include/signal.h ============================================================================== --- head/sys/arm/include/signal.h Mon Mar 11 10:49:02 2013 (r248152) +++ head/sys/arm/include/signal.h Mon Mar 11 10:56:46 2013 (r248153) @@ -42,6 +42,7 @@ typedef long sig_atomic_t; #if __BSD_VISIBLE struct sigcontext { + int _dummy; }; #endif From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 12:02:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1EFAE69E; Mon, 11 Mar 2013 12:02:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D154CDF; Mon, 11 Mar 2013 12:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BC23w5020233; Mon, 11 Mar 2013 12:02:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BC23HC020232; Mon, 11 Mar 2013 12:02:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201303111202.r2BC23HC020232@svn.freebsd.org> From: Alexander Motin Date: Mon, 11 Mar 2013 12:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248154 - head/sys/dev/acpica 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.14 Precedence: list List-Id: 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, 11 Mar 2013 12:02:04 -0000 Author: mav Date: Mon Mar 11 12:02:03 2013 New Revision: 248154 URL: http://svnweb.freebsd.org/changeset/base/248154 Log: Reduce HPET eventtimer priority on systems with 8 or more cores. Price of the lock congestion may be too high there (2.5% on 4x4 core AMD Opteron). Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon Mar 11 10:56:46 2013 (r248153) +++ head/sys/dev/acpica/acpi_hpet.c Mon Mar 11 12:02:03 2013 (r248154) @@ -675,7 +675,8 @@ hpet_attach(device_t dev) if (t->pcpu_master >= 0) { t->et.et_flags |= ET_FLAGS_PERCPU; t->et.et_quality += 100; - } + } if (mp_ncpus >= 8) + t->et.et_quality -= 100; if ((t->caps & HPET_TCAP_PER_INT) == 0) t->et.et_quality -= 10; t->et.et_frequency = sc->freq; From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 12:06:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 995B4874; Mon, 11 Mar 2013 12:06:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2EBD19; Mon, 11 Mar 2013 12:06:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BC6vgL021091; Mon, 11 Mar 2013 12:06:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BC6vwh021090; Mon, 11 Mar 2013 12:06:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303111206.r2BC6vwh021090@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 11 Mar 2013 12:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248155 - 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.14 Precedence: list List-Id: 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, 11 Mar 2013 12:06:57 -0000 Author: glebius Date: Mon Mar 11 12:06:57 2013 New Revision: 248155 URL: http://svnweb.freebsd.org/changeset/base/248155 Log: Reinitialize eh after pfil(9) processing. PR: 176764 Submitted by: adri Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Mar 11 12:02:03 2013 (r248154) +++ head/sys/net/if_bridge.c Mon Mar 11 12:06:57 2013 (r248155) @@ -2314,6 +2314,7 @@ bridge_input(struct ifnet *ifp, struct m BRIDGE_UNLOCK(sc); \ return (NULL); \ } \ + eh = mtod(m, struct ether_header *); \ } \ } \ if (bif->bif_flags & IFBIF_LEARNING) { \ From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 12:22:45 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]) by hub.freebsd.org (Postfix) with ESMTP id 47C81325; Mon, 11 Mar 2013 12:22:45 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34BF1DD9; Mon, 11 Mar 2013 12:22:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BCMjeI027062; Mon, 11 Mar 2013 12:22:45 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BCMjmZ027061; Mon, 11 Mar 2013 12:22:45 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303111222.r2BCMjmZ027061@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 11 Mar 2013 12:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248158 - head/sys/netinet/libalias 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.14 Precedence: list List-Id: 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, 11 Mar 2013 12:22:45 -0000 Author: glebius Date: Mon Mar 11 12:22:44 2013 New Revision: 248158 URL: http://svnweb.freebsd.org/changeset/base/248158 Log: Remove LIBALIAS_LOCK_ASSERT(), including a couple with an uninitialzed argument, in code that isn't compiled in kernel. PR: kern/176667 Sponsored by: Nginx, Inc. Modified: head/sys/netinet/libalias/alias_db.c Modified: head/sys/netinet/libalias/alias_db.c ============================================================================== --- head/sys/netinet/libalias/alias_db.c Mon Mar 11 12:14:20 2013 (r248157) +++ head/sys/netinet/libalias/alias_db.c Mon Mar 11 12:22:44 2013 (r248158) @@ -2729,7 +2729,6 @@ static void InitPunchFW(struct libalias *la) { - LIBALIAS_LOCK_ASSERT(la); la->fireWallField = malloc(la->fireWallNumNums); if (la->fireWallField) { memset(la->fireWallField, 0, la->fireWallNumNums); @@ -2745,7 +2744,6 @@ static void UninitPunchFW(struct libalias *la) { - LIBALIAS_LOCK_ASSERT(la); ClearAllFWHoles(la); if (la->fireWallFD >= 0) close(la->fireWallFD); @@ -2765,7 +2763,6 @@ PunchFWHole(struct alias_link *lnk) struct ip_fw rule; /* On-the-fly built rule */ int fwhole; /* Where to punch hole */ - LIBALIAS_LOCK_ASSERT(la); la = lnk->la; /* Don't do anything unless we are asked to */ @@ -2839,7 +2836,6 @@ ClearFWHole(struct alias_link *lnk) { struct libalias *la; - LIBALIAS_LOCK_ASSERT(la); la = lnk->la; if (lnk->link_type == LINK_TCP) { int fwhole = lnk->data.tcp->fwhole; /* Where is the firewall @@ -2864,7 +2860,6 @@ ClearAllFWHoles(struct libalias *la) struct ip_fw rule; /* On-the-fly built rule */ int i; - LIBALIAS_LOCK_ASSERT(la); if (la->fireWallFD < 0) return; @@ -2878,7 +2873,7 @@ ClearAllFWHoles(struct libalias *la) memset(la->fireWallField, 0, la->fireWallNumNums); } -#endif +#endif /* !NO_FW_PUNCH */ void LibAliasSetFWBase(struct libalias *la, unsigned int base, unsigned int num) From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 13:05: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]) by hub.freebsd.org (Postfix) with ESMTP id 7B3E29DE; Mon, 11 Mar 2013 13:05:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6DF14FE8; Mon, 11 Mar 2013 13:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BD5C8C040329; Mon, 11 Mar 2013 13:05:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BD5Ce4040328; Mon, 11 Mar 2013 13:05:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303111305.r2BD5Ce4040328@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 11 Mar 2013 13:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248159 - head/lib/libnetgraph 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.14 Precedence: list List-Id: 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, 11 Mar 2013 13:05:12 -0000 Author: glebius Date: Mon Mar 11 13:05:11 2013 New Revision: 248159 URL: http://svnweb.freebsd.org/changeset/base/248159 Log: Fix for quite a special case when userland emulates a netgraph node, and userland can reply to a message with NGM_HASREPLY bit set. In this case we should not wait for a response to a responce. PR: 176771 Submitted by: Keith Reynolds Modified: head/lib/libnetgraph/msg.c Modified: head/lib/libnetgraph/msg.c ============================================================================== --- head/lib/libnetgraph/msg.c Mon Mar 11 12:22:44 2013 (r248158) +++ head/lib/libnetgraph/msg.c Mon Mar 11 13:05:11 2013 (r248159) @@ -234,7 +234,7 @@ NgDeliverMsg(int cs, const char *path, } /* Wait for reply if there should be one. */ - if (msg->header.cmd & NGM_HASREPLY) { + if (msg->header.cmd & NGM_HASREPLY && !(msg->header.flags & NGF_RESP)) { struct pollfd rfds; int n; From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 13:08:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF1ACEBD; Mon, 11 Mar 2013 13:08:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 94A10CC; Mon, 11 Mar 2013 13:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BD8WxU041059; Mon, 11 Mar 2013 13:08:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BD8WRg041058; Mon, 11 Mar 2013 13:08:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303111308.r2BD8WRg041058@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 11 Mar 2013 13:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248160 - head/usr.bin/ee/nls/ru_RU.KOI8-R 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.14 Precedence: list List-Id: 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, 11 Mar 2013 13:08:32 -0000 Author: glebius Date: Mon Mar 11 13:08:32 2013 New Revision: 248160 URL: http://svnweb.freebsd.org/changeset/base/248160 Log: Fix spelling. PR: 176777 Submitted by: Andrey Simonenko Modified: head/usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg Modified: head/usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg ============================================================================== Binary file (source and/or target). No diff available. From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 16:33: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]) by hub.freebsd.org (Postfix) with ESMTP id C8C62EEA; Mon, 11 Mar 2013 16:33:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA1F1E92; Mon, 11 Mar 2013 16:33:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BGX5ZQ007462; Mon, 11 Mar 2013 16:33:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BGX5lP007461; Mon, 11 Mar 2013 16:33:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201303111633.r2BGX5lP007461@svn.freebsd.org> From: John Baldwin Date: Mon, 11 Mar 2013 16:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248167 - head/usr.bin/top 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.14 Precedence: list List-Id: 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, 11 Mar 2013 16:33:05 -0000 Author: jhb Date: Mon Mar 11 16:33:05 2013 New Revision: 248167 URL: http://svnweb.freebsd.org/changeset/base/248167 Log: Fix the 'C' field for a running thread to match the behavior described in the manpage by having it display the current CPU (ki_oncpu) rather than the previously used CPU (ki_lastcpu). ki_lastcpu is still used for all other thread states. Reported by: Chris Ross MFC after: 1 week Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon Mar 11 15:48:17 2013 (r248166) +++ head/usr.bin/top/machine.c Mon Mar 11 16:33:05 2013 (r248167) @@ -797,7 +797,7 @@ format_next_process(caddr_t handle, char double pct; struct handle *hp; char status[16]; - int state; + int cpu, state; struct rusage ru, *rup; long p_tot, s_tot; char *proc_fmt, thr_buf[6], jid_buf[6]; @@ -997,6 +997,13 @@ format_next_process(caddr_t handle, char } /* format this entry */ + if (smpmode) { + if (state == SRUN && pp->ki_oncpu != 0xff) + cpu = pp->ki_oncpu; + else + cpu = pp->ki_lastcpu; + } else + cpu = 0; proc_fmt = smpmode ? smp_Proc_format : up_Proc_format; if (ps.thread != 0) thr_buf[0] = '\0'; @@ -1014,7 +1021,7 @@ format_next_process(caddr_t handle, char format_k2(PROCSIZE(pp)), format_k2(pagetok(pp->ki_rssize)), status, - smpmode ? pp->ki_lastcpu : 0, + cpu, format_time(cputime), ps.wcpu ? 100.0 * weighted_cpu(pct, pp) : 100.0 * pct, screen_width > cmdlengthdelta ? screen_width - cmdlengthdelta : 0, From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 17:21: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]) by hub.freebsd.org (Postfix) with ESMTP id C76164CA; Mon, 11 Mar 2013 17:21:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AF9BB1DE; Mon, 11 Mar 2013 17:21:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BHLLfM022702; Mon, 11 Mar 2013 17:21:21 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BHLLOO022701; Mon, 11 Mar 2013 17:21:21 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201303111721.r2BHLLOO022701@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 11 Mar 2013 17:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248168 - head/share/examples 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.14 Precedence: list List-Id: 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, 11 Mar 2013 17:21:21 -0000 Author: bapt Date: Mon Mar 11 17:21:21 2013 New Revision: 248168 URL: http://svnweb.freebsd.org/changeset/base/248168 Log: Disconnect files removed in r248151 Modified: head/share/examples/Makefile Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Mon Mar 11 16:33:05 2013 (r248167) +++ head/share/examples/Makefile Mon Mar 11 17:21:21 2013 (r248168) @@ -52,9 +52,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ csh/dot.cshrc \ cvsup/README \ cvsup/cvs-supfile \ - cvsup/ports-supfile \ - cvsup/refuse \ - cvsup/refuse.README \ cvsup/stable-supfile \ cvsup/standard-supfile \ diskless/ME \ From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 17:29:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 31DD2984; Mon, 11 Mar 2013 17:29:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 24775235; Mon, 11 Mar 2013 17:29:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BHTAN4023954; Mon, 11 Mar 2013 17:29:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BHTAWT023953; Mon, 11 Mar 2013 17:29:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201303111729.r2BHTAWT023953@svn.freebsd.org> From: Alexander Motin Date: Mon, 11 Mar 2013 17:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248170 - head/sys/dev/acpica 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.14 Precedence: list List-Id: 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, 11 Mar 2013 17:29:10 -0000 Author: mav Date: Mon Mar 11 17:29:09 2013 New Revision: 248170 URL: http://svnweb.freebsd.org/changeset/base/248170 Log: Add "else" missed at r248154. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon Mar 11 17:21:52 2013 (r248169) +++ head/sys/dev/acpica/acpi_hpet.c Mon Mar 11 17:29:09 2013 (r248170) @@ -675,7 +675,7 @@ hpet_attach(device_t dev) if (t->pcpu_master >= 0) { t->et.et_flags |= ET_FLAGS_PERCPU; t->et.et_quality += 100; - } if (mp_ncpus >= 8) + } else if (mp_ncpus >= 8) t->et.et_quality -= 100; if ((t->caps & HPET_TCAP_PER_INT) == 0) t->et.et_quality -= 10; From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 17:36: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]) by hub.freebsd.org (Postfix) with ESMTP id C885FD8A; Mon, 11 Mar 2013 17:36:37 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A40DE282; Mon, 11 Mar 2013 17:36:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BHabFv026603; Mon, 11 Mar 2013 17:36:37 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BHabAD026602; Mon, 11 Mar 2013 17:36:37 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201303111736.r2BHabAD026602@svn.freebsd.org> From: Neel Natu Date: Mon, 11 Mar 2013 17:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248171 - 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.14 Precedence: list List-Id: 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, 11 Mar 2013 17:36:37 -0000 Author: neel Date: Mon Mar 11 17:36:37 2013 New Revision: 248171 URL: http://svnweb.freebsd.org/changeset/base/248171 Log: Convert the offset into the bar that contains the MSI-X table to an offset into the MSI-X table before using it to calculate the table index. In the common case where the MSI-X table is located at the begining of the BAR these two offsets are identical and thus the code was working by accident. This change will fix the case where the MSI-X table is located in the middle or at the end of the BAR that contains it. Obtained from: NetApp Modified: head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Mon Mar 11 17:29:09 2013 (r248170) +++ head/usr.sbin/bhyve/pci_passthru.c Mon Mar 11 17:36:37 2013 (r248171) @@ -279,6 +279,7 @@ msix_table_read(struct passthru_softc *s int index; pi = sc->psc_pi; + offset -= pi->pi_msix.table_offset; index = offset / MSIX_TABLE_ENTRY_SIZE; if (index >= pi->pi_msix.table_count) @@ -323,6 +324,8 @@ msix_table_write(struct vmctx *ctx, int int error, index; pi = sc->psc_pi; + offset -= pi->pi_msix.table_offset; + index = offset / MSIX_TABLE_ENTRY_SIZE; if (index >= pi->pi_msix.table_count) return; From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 17:43:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 96DC417C; Mon, 11 Mar 2013 17:43:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E04A2E1; Mon, 11 Mar 2013 17:43:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BHhuNF029282; Mon, 11 Mar 2013 17:43:56 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BHhuCj029280; Mon, 11 Mar 2013 17:43:56 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201303111743.r2BHhuCj029280@svn.freebsd.org> From: Michael Tuexen Date: Mon, 11 Mar 2013 17:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248172 - 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.14 Precedence: list List-Id: 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, 11 Mar 2013 17:43:56 -0000 Author: tuexen Date: Mon Mar 11 17:43:55 2013 New Revision: 248172 URL: http://svnweb.freebsd.org/changeset/base/248172 Log: Return an error if sctp_peeloff() fails because a socket can't be allocated. MFC after: 3 days Modified: head/sys/kern/uipc_socket.c head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Mar 11 17:36:37 2013 (r248171) +++ head/sys/kern/uipc_socket.c Mon Mar 11 17:43:55 2013 (r248172) @@ -136,6 +136,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -565,8 +566,12 @@ sonewconn(struct socket *head, int conns /* * The accept socket may be tearing down but we just * won a race on the ACCEPT_LOCK. + * However, if sctp_peeloff() is called on a 1-to-many + * style socket, the SO_ACCEPTCONN doesn't need to be set. */ - if (!(head->so_options & SO_ACCEPTCONN)) { + if (!(head->so_options & SO_ACCEPTCONN) && + ((head->so_proto->pr_protocol != IPPROTO_SCTP) || + (head->so_type != SOCK_SEQPACKET))) { SOCK_LOCK(so); so->so_head = NULL; sofree(so); /* NB: returns ACCEPT_UNLOCK'ed. */ Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Mon Mar 11 17:36:37 2013 (r248171) +++ head/sys/kern/uipc_syscalls.c Mon Mar 11 17:43:55 2013 (r248172) @@ -2386,8 +2386,10 @@ sys_sctp_peeloff(td, uap) CURVNET_SET(head->so_vnet); so = sonewconn(head, SS_ISCONNECTED); - if (so == NULL) + if (so == NULL) { + error = ENOMEM; goto noconnection; + } /* * Before changing the flags on the socket, we have to bump the * reference count. Otherwise, if the protocol calls sofree(), From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 17:47:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1DE43396; Mon, 11 Mar 2013 17:47:56 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 93D36310; Mon, 11 Mar 2013 17:47:55 +0000 (UTC) Received: from dhcp-9228.meeting.ietf.org (dhcp-9228.meeting.ietf.org [130.129.10.40]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 482241C0C0BF5; Mon, 11 Mar 2013 18:47:52 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1283) Subject: Re: svn commit: r248172 - head/sys/kern From: Michael Tuexen In-Reply-To: <201303111743.r2BHhuCj029280@svn.freebsd.org> Date: Mon, 11 Mar 2013 13:47:50 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201303111743.r2BHhuCj029280@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1283) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 17:47:56 -0000 On Mar 11, 2013, at 1:43 PM, Michael Tuexen wrote: > Author: tuexen > Date: Mon Mar 11 17:43:55 2013 > New Revision: 248172 > URL: http://svnweb.freebsd.org/changeset/base/248172 >=20 > Log: > Return an error if sctp_peeloff() fails because a socket can't be = allocated. Hmm. Just wanted to commit the change to uipc_syscalls.c and do the other fix separately. So the missing commit message is: sctp_peeloff() uses sonewconn() also in cases where listen() wasn't = called. So honor this use case. >=20 > MFC after: 3 days >=20 > Modified: > head/sys/kern/uipc_socket.c > head/sys/kern/uipc_syscalls.c >=20 > Modified: head/sys/kern/uipc_socket.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_socket.c Mon Mar 11 17:36:37 2013 = (r248171) > +++ head/sys/kern/uipc_socket.c Mon Mar 11 17:43:55 2013 = (r248172) > @@ -136,6 +136,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include >=20 > #include >=20 > @@ -565,8 +566,12 @@ sonewconn(struct socket *head, int conns > /* > * The accept socket may be tearing down but we just > * won a race on the ACCEPT_LOCK. > + * However, if sctp_peeloff() is called on a 1-to-many > + * style socket, the SO_ACCEPTCONN doesn't need to be set. > */ > - if (!(head->so_options & SO_ACCEPTCONN)) { > + if (!(head->so_options & SO_ACCEPTCONN) && > + ((head->so_proto->pr_protocol !=3D IPPROTO_SCTP) || > + (head->so_type !=3D SOCK_SEQPACKET))) { > SOCK_LOCK(so); > so->so_head =3D NULL; > sofree(so); /* NB: returns ACCEPT_UNLOCK'ed. = */ >=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 Mon Mar 11 17:36:37 2013 = (r248171) > +++ head/sys/kern/uipc_syscalls.c Mon Mar 11 17:43:55 2013 = (r248172) > @@ -2386,8 +2386,10 @@ sys_sctp_peeloff(td, uap) >=20 > CURVNET_SET(head->so_vnet); > so =3D sonewconn(head, SS_ISCONNECTED); > - if (so =3D=3D NULL) > + if (so =3D=3D NULL) { > + error =3D ENOMEM; > goto noconnection; > + } > /* > * Before changing the flags on the socket, we have to bump the > * reference count. Otherwise, if the protocol calls sofree(), >=20 From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 19:25: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]) by hub.freebsd.org (Postfix) with ESMTP id DA169F1D; Mon, 11 Mar 2013 19:25:12 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8B4A82; Mon, 11 Mar 2013 19:25:12 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id r2BIu7w0078397; Mon, 11 Mar 2013 11:56:07 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id r2BIu7I4078396; Mon, 11 Mar 2013 11:56:07 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup To: Baptiste Daroussin Message-Id: <1363028167.78116@da3m0n8t3r.com> X-Originating-IP: 70.90.171.37 X-Mailer: Usermin 1.510 In-Reply-To: <201303111048.r2BAmQNr096485@svn.freebsd.org> Date: Mon, 11 Mar 2013 11:56:07 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1363028167" 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.14 Precedence: list List-Id: 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, 11 Mar 2013 19:25:12 -0000 This is a multi-part message in MIME format. --bound1363028167 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Baptiste Daroussin wrote .. > Author: bapt > Date: Mon Mar 11 10:48:26 2013 > New Revision: 248151 > URL: http://svnweb.freebsd.org/changeset/base/248151 > > Log: > Ports are no more exported via cvsup, remove cvsup examples and documentation > refering to ports > > MFC after: 2 days > > Deleted: > head/share/examples/cvsup/ports-supfile > head/share/examples/cvsup/refuse > head/share/examples/cvsup/refuse.README > Modified: > head/ObsoleteFiles.inc > head/share/examples/cvsup/README > head/share/examples/cvsup/cvs-supfile > head/share/examples/cvsup/stable-supfile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 11 08:21:43 2013 (r248150) > +++ head/ObsoleteFiles.inc Mon Mar 11 10:48:26 2013 (r248151) > @@ -38,6 +38,10 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20130311: Ports are no more available via cvsup > +OLD_FILES+=usr/share/examples/cvsup/ports-supfile > +OLD_FILES+=usr/share/examples/cvsup/refuse > +OLD_FILES+=usr/share/examples/cvsup/refuse.README > # 20130309: NWFS and NCP supports removed > OLD_FILES+=usr/bin/ncplist > OLD_FILES+=usr/bin/ncplogin > > Modified: head/share/examples/cvsup/README > ============================================================================== > --- head/share/examples/cvsup/README Mon Mar 11 08:21:43 2013 (r248150) > +++ head/share/examples/cvsup/README Mon Mar 11 10:48:26 2013 (r248151) > @@ -19,8 +19,6 @@ To maintain the sources for the FreeBSD- > > standard-supfile Main source tree > > - ports-supfile Ports collection > - > To maintain the sources for the FreeBSD-stable release, use: > > stable-supfile Main source tree > @@ -28,7 +26,7 @@ To maintain the sources for the FreeBSD- > To maintain a copy of the CVS repository containing all versions of > FreeBSD, use: > > - cvs-supfile Main source tree and ports collection > + cvs-supfile Main source tree collection > > IMPORTANT: Before you use any of the supfiles in this directory, > you will need to edit in an appropriate "host" setting. See: > > Modified: head/share/examples/cvsup/cvs-supfile > ============================================================================== > --- head/share/examples/cvsup/cvs-supfile Mon Mar 11 08:21:43 2013 (r248150) > +++ head/share/examples/cvsup/cvs-supfile Mon Mar 11 10:48:26 2013 (r248151) > @@ -43,9 +43,8 @@ > # prefix=/home/ncvs > # This specifies where to place the requested files. A > # setting of "/home/ncvs" will place all of the files > -# requested in /home/ncvs (e.g., "/home/ncvs/src/bin", > -# "/home/ncvs/ports/archivers"). The prefix directory > -# must exist in order to run CVSup. > +# requested in /home/ncvs (e.g., "/home/ncvs/src/bin"). > +# The prefix directory must exist in order to run CVSup. > > # Defaults that apply to all the collections > # > @@ -68,13 +67,6 @@ > # mega-collection. It includes all of the individual "src-*" collections. > src-all > > -## Ports Collection. > -# > -# The easiest way to get the ports tree is to use the "ports-all" > -# mega-collection. It includes all of the individual "ports-*" > -# collections, > -ports-all > - > ## Projects > # > # This collection retrieves the projects tree of the FreeBSD > > Modified: head/share/examples/cvsup/stable-supfile > ============================================================================== > --- head/share/examples/cvsup/stable-supfile Mon Mar 11 08:21:43 2013 (r248150) > +++ head/share/examples/cvsup/stable-supfile Mon Mar 11 10:48:26 2013 (r248151) > @@ -46,21 +46,6 @@ > # in "/usr/src" (e.g., "/usr/src/bin", "/usr/src/lib"). > # The prefix directory must exist in order to run CVSup. > # > -############################################################################### > -# > -# DANGER! WARNING! LOOK OUT! VORSICHT! > -# > -# If you add any of the ports collections to this file, be sure to > -# specify them with a "tag" value set to ".", like this: > -# > -# ports-all tag=. > -# > -# If you leave out the "tag=." portion, CVSup will delete all of > -# the files in your ports. That is because the ports > -# collections do not use the same tags as the main part of the FreeBSD > -# source tree. > -# > -############################################################################### > > # Defaults that apply to all the collections > # > _______________________________________________ > 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" Hi, I'm getting > make installworld .. install -o root -g wheel -m 444 /usr/src/share/examples/cvsup/ports-supfile /usr/share/examples/cvsup/ports-supfile install: /usr/src/share/examples/cvsup/ports-supfile: No such file or directory *** [copies] Error code 71 Stop in /usr/src/share/examples. *** [realinstall] Error code 1 Stop in /usr/src/share. *** [realinstall] Error code 1 Stop in /usr/src. *** [reinstall] Error code 1 Stop in /usr/src. *** [installworld] Error code 1 Stop in /usr/src. *** [installworld] Error code 1 Stop in /usr/src. [48] > uname -a FreeBSD dx.burplex.com 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r248165: Mon Mar 11 18:20:30 PDT 2013 root@dx.burplex.com:/usr/obj/usr/src/sys/FURAHA amd64 [49] > Maybe I pulled the src at the wrong time ? or something to check out.. Thank you, -- Waitman Gobble San Jose California USA --bound1363028167-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 19:29: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]) by hub.freebsd.org (Postfix) with ESMTP id 3D3102D2; Mon, 11 Mar 2013 19:29:11 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id A335FAB0; Mon, 11 Mar 2013 19:29:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id r2BJSxaT025764; Mon, 11 Mar 2013 23:28:59 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Mon, 11 Mar 2013 23:28:59 +0400 (MSK) From: Dmitry Morozovsky To: Waitman Gobble Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup In-Reply-To: <1363028167.78116@da3m0n8t3r.com> Message-ID: References: <1363028167.78116@da3m0n8t3r.com> 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.2.7 (woozle.rinet.ru [0.0.0.0]); Mon, 11 Mar 2013 23:29:00 +0400 (MSK) Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 19:29:11 -0000 On Mon, 11 Mar 2013, Waitman Gobble wrote: > Baptiste Daroussin wrote .. > > Author: bapt > > Date: Mon Mar 11 10:48:26 2013 > > New Revision: 248151 > > URL: http://svnweb.freebsd.org/changeset/base/248151 [snip] > I'm getting > > > make installworld > .. > install -o root -g wheel -m 444 /usr/src/share/examples/cvsup/ports-supfile /usr/share/examples/cvsup/ports-supfile > install: /usr/src/share/examples/cvsup/ports-supfile: No such file or directory > *** [copies] Error code 71 > Maybe I pulled the src at the wrong time ? or something to check out.. I seems so, rev 248168 possibly should be committed in ahead of 248151 -- 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 Mon Mar 11 19:40: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]) by hub.freebsd.org (Postfix) with ESMTP id 2E3AD6BA; Mon, 11 Mar 2013 19:40:43 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id EF04BB3D; Mon, 11 Mar 2013 19:40:42 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id r2BJeg9V025611; Mon, 11 Mar 2013 12:40:42 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id r2BJegha025610; Mon, 11 Mar 2013 12:40:42 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup To: Dmitry Morozovsky Message-Id: <1363030841.25605@da3m0n8t3r.com> X-Originating-IP: 70.90.171.37 X-Mailer: Usermin 1.510 In-Reply-To: Date: Mon, 11 Mar 2013 12:40:42 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1363030842" Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 19:40:43 -0000 This is a multi-part message in MIME format. --bound1363030842 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dmitry Morozovsky wrote .. > On Mon, 11 Mar 2013, Waitman Gobble wrote: > > > Baptiste Daroussin wrote .. > > > Author: bapt > > > Date: Mon Mar 11 10:48:26 2013 > > > New Revision: 248151 > > > URL: http://svnweb.freebsd.org/changeset/base/248151 > > [snip] > > > I'm getting > > > > > make installworld > > .. > > install -o root -g wheel -m 444 /usr/src/share/examples/cvsup/ports-supfile > /usr/share/examples/cvsup/ports-supfile > > install: /usr/src/share/examples/cvsup/ports-supfile: No such file or directory > > *** [copies] Error code 71 > > > Maybe I pulled the src at the wrong time ? or something to check out.. > > I seems so, rev 248168 possibly should be committed in ahead of 248151 > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: marck@FreeBSD.org ] > ------------------------------------------------------------------------ > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** > ------------------------------------------------------------------------ > _______________________________________________ Thank you, got over the 'hump' [57] > touch /usr/src/share/examples/cvsup/ports-supfile [58] > touch /usr/src/share/examples/cvsup/refuse [59] > touch /usr/src/share/examples/cvsup/refuse.README [60] > make installworld {{OK}} I'll try grabbing src again. -- Waitman Gobble San Jose California USA --bound1363030842-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 20:01: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]) by hub.freebsd.org (Postfix) with ESMTP id 73675894; Mon, 11 Mar 2013 20:01:35 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx1.freebsd.org (Postfix) with ESMTP id B1701D2E; Mon, 11 Mar 2013 20:01:34 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id dr13so5473432wgb.14 for ; Mon, 11 Mar 2013 13:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=U4phjQpi/5k2ejFGTwzs/kKUiHmzQ54vYerZlsjbb58=; b=fIGL0q4Tw6LDH5bMrj9p94CfDKgl2b7VynVXePTCZinOkSRbRwAQSZwNhv7wBMktND O3miaL8/VnJHAp8bTVbrSm63WMgqdPJF9TnghP7YRgwNw/HObg1sPeQMsChlFFdYcwXE kgNh9Kdes5cktXflm2tsqsl70emapG6dlg9HeSKFw2ZGabHXH/Y9N0/BqroO4RUH+Y55 mltHzt4mc/2HZFNDPRNh9mrhKUArJhZ6oRsb/aWY959DVfF72mOpdRtlHyQiTrv1r+b8 BHg0qmVSNaNxyQ8Fx0AvxCdbTXv6gkUxp3AynVXPfcpmgkXLzX3Zoj4m6YlmgLJ0JtNS XdTg== X-Received: by 10.180.76.84 with SMTP id i20mr15360594wiw.9.1363032093606; Mon, 11 Mar 2013 13:01:33 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id c15sm19509946wiw.3.2013.03.11.13.01.31 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 11 Mar 2013 13:01:32 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 11 Mar 2013 21:01:29 +0100 From: Baptiste Daroussin To: Waitman Gobble Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup Message-ID: <20130311200128.GE25215@ithaqua.etoilebsd.net> References: <1363030841.25605@da3m0n8t3r.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G6nVm6DDWH/FONJq" Content-Disposition: inline In-Reply-To: <1363030841.25605@da3m0n8t3r.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 20:01:35 -0000 --G6nVm6DDWH/FONJq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2013 at 12:40:42PM -0700, Waitman Gobble wrote: > Dmitry Morozovsky wrote .. > > On Mon, 11 Mar 2013, Waitman Gobble wrote: > >=20 > > > Baptiste Daroussin wrote .. > > > > Author: bapt > > > > Date: Mon Mar 11 10:48:26 2013 > > > > New Revision: 248151 > > > > URL: http://svnweb.freebsd.org/changeset/base/248151 > >=20 > > [snip] > >=20 > > > I'm getting=20 > > >=20 > > > > make installworld > > > .. > > > install -o root -g wheel -m 444 /usr/src/share/examples/cvsup/ports-= supfile > > /usr/share/examples/cvsup/ports-supfile > > > install: /usr/src/share/examples/cvsup/ports-supfile: No such file or= directory > > > *** [copies] Error code 71 > >=20 > > > Maybe I pulled the src at the wrong time ? or something to check out.= =2E=20 > >=20 > > I seems so, rev 248168 possibly should be committed in ahead of 248151 > >=20 Yes sorry about that I have missed the Makefile in my svn ci line. regards Bapt --G6nVm6DDWH/FONJq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlE+OBgACgkQ8kTtMUmk6EyzmwCfYfuGSXDA7EPSWbttp13YULXA 7XIAnjsCE71rVRFb8rh9b+YF16gIg3jN =j7QU -----END PGP SIGNATURE----- --G6nVm6DDWH/FONJq-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 21:32: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]) by hub.freebsd.org (Postfix) with ESMTP id 7CFCAC2F; Mon, 11 Mar 2013 21:32:04 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id F284E328; Mon, 11 Mar 2013 21:32:03 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id r2BLW3ug075615; Mon, 11 Mar 2013 14:32:03 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id r2BLW2Fx075614; Mon, 11 Mar 2013 14:32:02 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup To: Baptiste Daroussin Message-Id: <1363037522.75609@da3m0n8t3r.com> X-Originating-IP: 70.90.171.37 X-Mailer: Usermin 1.510 In-Reply-To: <20130311200128.GE25215@ithaqua.etoilebsd.net> Date: Mon, 11 Mar 2013 14:32:02 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1363037522" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 21:32:04 -0000 This is a multi-part message in MIME format. --bound1363037522 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Baptiste Daroussin wrote .. > On Mon, Mar 11, 2013 at 12:40:42PM -0700, Waitman Gobble wrote: > > Dmitry Morozovsky wrote .. > > > On Mon, 11 Mar 2013, Waitman Gobble wrote: > > > > > > > Baptiste Daroussin wrote .. > > > > > Author: bapt > > > > > Date: Mon Mar 11 10:48:26 2013 > > > > > New Revision: 248151 > > > > > URL: http://svnweb.freebsd.org/changeset/base/248151 > > > > > > [snip] > > > > > > > I'm getting > > > > > > > > > make installworld > > > > .. > > > > install -o root -g wheel -m 444 /usr/src/share/examples/cvsup/ports-supfile > > > /usr/share/examples/cvsup/ports-supfile > > > > install: /usr/src/share/examples/cvsup/ports-supfile: No such file or directory > > > > *** [copies] Error code 71 > > > > > > > Maybe I pulled the src at the wrong time ? or something to check out.. > > > > > > I seems so, rev 248168 possibly should be committed in ahead of 248151 > > > > > Yes sorry about that I have missed the Makefile in my svn ci line. > > regards > Bapt Thanks Baptiste, It's been awhile since I built -CURRENT. So I'm already breaking stuff. I think pkgng is still the way to go??? /usr/ports/ports-mgmt/pkg/ fetch.c:167:38 if (((&http_mirrors)->stqh_first == ((void *)0))) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ fetch.c:167:38: note: remove extraneous parentheses around the comparison to silence this warning 1 error generated. *** [fetch.o] Error code 1 1 error *** [all] Error code 2 1 error *** [do-build] Error code 1 Stop in /usr/ports/ports-mgmt/pkg. *** [/usr/ports/ports-mgmt/pkg/work/.build_done.pkg._usr_local] Error code 1 Stop in /usr/ports/ports-mgmt/pkg. is this worthy of a pr? Thank you, -- Waitman Gobble San Jose California USA --bound1363037522-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 21:59:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9B95489D; Mon, 11 Mar 2013 21:59:46 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id 4022D65C; Mon, 11 Mar 2013 21:59:46 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id r2BLxjJr021633; Mon, 11 Mar 2013 14:59:45 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id r2BLxjdp021632; Mon, 11 Mar 2013 14:59:45 -0700 (PDT) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup To: "Waitman Gobble" Message-Id: <1363039185.21627@da3m0n8t3r.com> X-Originating-IP: 70.90.171.37 X-Mailer: Usermin 1.510 In-Reply-To: <1363037522.75609@da3m0n8t3r.com> Date: Mon, 11 Mar 2013 14:59:45 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1363039185" Cc: svn-src-head@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 21:59:46 -0000 This is a multi-part message in MIME format. --bound1363039185 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Waitman Gobble wrote .. > /usr/ports/ports-mgmt/pkg/ > fetch.c:167:38 > if (((&http_mirrors)->stqh_first == ((void *)0))) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ > fetch.c:167:38: note: remove extraneous parentheses around the comparison to silence > this warning OOPS. it's apparently ccache related. Sorry about that!! -- Waitman Gobble San Jose California USA --bound1363039185-- From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 22:17:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1DD18E5E; Mon, 11 Mar 2013 22:17:40 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1CF3712; Mon, 11 Mar 2013 22:17:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BMHdf0014354; Mon, 11 Mar 2013 22:17:39 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BMHdgS014351; Mon, 11 Mar 2013 22:17:39 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201303112217.r2BMHdgS014351@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 11 Mar 2013 22:17:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248175 - in head/sys/dev/usb: . serial 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.14 Precedence: list List-Id: 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, 11 Mar 2013 22:17:40 -0000 Author: gavin Date: Mon Mar 11 22:17:39 2013 New Revision: 248175 URL: http://svnweb.freebsd.org/changeset/base/248175 Log: Add support for Optoelectronics USB barcode readers to uftdi(4). Add entries for other Optoelectronics devices to usbdevs. MFC after: 1 week Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Mon Mar 11 20:01:38 2013 (r248174) +++ head/sys/dev/usb/serial/uftdi.c Mon Mar 11 22:17:39 2013 (r248175) @@ -753,6 +753,8 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(MOBILITY, USB_SERIAL, UFTDI_TYPE_AUTO), UFTDI_DEV(OLIMEX, ARM_USB_OCD, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), UFTDI_DEV(OLIMEX, ARM_USB_OCD_H, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), + UFTDI_DEV(OPTO, CRD7734, UFTDI_TYPE_AUTO), + UFTDI_DEV(OPTO, CRD7734_1, UFTDI_TYPE_AUTO), UFTDI_DEV(PAPOUCH, AD4USB, UFTDI_TYPE_AUTO), UFTDI_DEV(PAPOUCH, AP485, UFTDI_TYPE_AUTO), UFTDI_DEV(PAPOUCH, AP485_2, UFTDI_TYPE_AUTO), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Mar 11 20:01:38 2013 (r248174) +++ head/sys/dev/usb/usbdevs Mon Mar 11 22:17:39 2013 (r248175) @@ -323,6 +323,7 @@ vendor GUNZE 0x0637 Gunze Electronics U vendor AVISION 0x0638 Avision vendor TEAC 0x0644 TEAC vendor ACTON 0x0647 Acton Research Corp. +vendor OPTO 0x065a Optoelectronics Co., Ltd vendor SGI 0x065e Silicon Graphics vendor SANWASUPPLY 0x0663 Sanwa Supply vendor MEGATEC 0x0665 Megatec @@ -3150,6 +3151,13 @@ product OPTION ICON321 0xd031 Globetrot product OPTION ICON505 0xd055 Globetrotter iCON 505 product OPTION ICON452 0x7901 Globetrotter iCON 452 +/* Optoelectronics Co., Ltd */ +product OPTO BARCODE 0x0001 Barcode Reader +product OPTO OPTICONCODE 0x0009 Opticon Code Reader +product OPTO BARCODE_1 0xa002 Barcode Reader +product OPTO CRD7734 0xc000 USB Cradle CRD-7734-RU +product OPTO CRD7734_1 0xc001 USB Cradle CRD-7734-RU + /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 22:59:08 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]) by hub.freebsd.org (Postfix) with ESMTP id 9414C78E; Mon, 11 Mar 2013 22:59:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 63F9389D; Mon, 11 Mar 2013 22:59:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2BMx7VP026160; Mon, 11 Mar 2013 22:59:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2BMx7q1026159; Mon, 11 Mar 2013 22:59:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303112259.r2BMx7q1026159@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 11 Mar 2013 22:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248176 - 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.14 Precedence: list List-Id: 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, 11 Mar 2013 22:59:08 -0000 Author: pjd Date: Mon Mar 11 22:59:07 2013 New Revision: 248176 URL: http://svnweb.freebsd.org/changeset/base/248176 Log: Fix memory leak when one process send descriptor over UNIX domain socket, but the other process exited before receiving it. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Mon Mar 11 22:17:39 2013 (r248175) +++ head/sys/kern/uipc_usrreq.c Mon Mar 11 22:59:07 2013 (r248176) @@ -282,7 +282,7 @@ static void unp_dispose(struct mbuf *); static void unp_shutdown(struct unpcb *); static void unp_drop(struct unpcb *, int); static void unp_gc(__unused void *, int); -static void unp_scan(struct mbuf *, void (*)(struct file *)); +static void unp_scan(struct mbuf *, void (*)(struct filedescent **, int)); static void unp_discard(struct file *); static void unp_freerights(struct filedescent **, int); static void unp_init(void); @@ -2135,17 +2135,22 @@ static int unp_marked; static int unp_unreachable; static void -unp_accessable(struct file *fp) +unp_accessable(struct filedescent **fdep, int fdcount) { struct unpcb *unp; + struct file *fp; + int i; - if ((unp = fptounp(fp)) == NULL) - return; - if (unp->unp_gcflag & UNPGC_REF) - return; - unp->unp_gcflag &= ~UNPGC_DEAD; - unp->unp_gcflag |= UNPGC_REF; - unp_marked++; + for (i = 0; i < fdcount; i++) { + fp = fdep[i]->fde_file; + if ((unp = fptounp(fp)) == NULL) + continue; + if (unp->unp_gcflag & UNPGC_REF) + continue; + unp->unp_gcflag &= ~UNPGC_DEAD; + unp->unp_gcflag |= UNPGC_REF; + unp_marked++; + } } static void @@ -2292,19 +2297,16 @@ unp_dispose(struct mbuf *m) { if (m) - unp_scan(m, unp_discard); + unp_scan(m, unp_freerights); } static void -unp_scan(struct mbuf *m0, void (*op)(struct file *)) +unp_scan(struct mbuf *m0, void (*op)(struct filedescent **, int)) { struct mbuf *m; - struct filedescent **fdep; struct cmsghdr *cm; void *data; - int i; socklen_t clen, datalen; - int qfds; while (m0 != NULL) { for (m = m0; m; m = m->m_next) { @@ -2324,10 +2326,8 @@ unp_scan(struct mbuf *m0, void (*op)(str if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) { - qfds = datalen / sizeof(*fdep); - fdep = data; - for (i = 0; i < qfds; i++) - (*op)(fdep[i]->fde_file); + (*op)(data, datalen / + sizeof(struct filedescent *)); } if (CMSG_SPACE(datalen) < clen) { From owner-svn-src-head@FreeBSD.ORG Mon Mar 11 23:41: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]) by hub.freebsd.org (Postfix) with ESMTP id 4A8A927E; Mon, 11 Mar 2013 23:41:33 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-ea0-x22e.google.com (mail-ea0-x22e.google.com [IPv6:2a00:1450:4013:c01::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 5FFA8A15; Mon, 11 Mar 2013 23:41:32 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id q10so1435527eaj.5 for ; Mon, 11 Mar 2013 16:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=r5/eLK802b3GDXroGP/yKNMeYU68awCvbQiPDt4c8lo=; b=KDR/YzcKhBH90k8epxeBO9yt9kahZWlCIHW+Fevkuo6wrNgLNfUj5yDGx+y5Rx+LJu oPDTj8smMMoqcTnesbF3x0xrUvRjbILrRy2p2YMIm2SCNCs7H4OSM3DxC1skDo8ZO90t hNl/hKhSPEfmQmA7nm6JdX2vOoV5ZgpB2BNpIBVr8fjvj4FqF3x7BV+55r39XuoOXdn8 Bjwj8dTWTU7bY26pkpD25lD2gOiwhJf1PJhNjrV/O0NcNXeAvHqNMuB+9dLrGW/z80le 7QNR6TPhsgxf3anoBifbFCc6s/BColCCBn22oY6UY+IexOq/K0jo9ZicSwis+s564NjO 5mcA== X-Received: by 10.15.34.198 with SMTP id e46mr41625293eev.27.1363045291481; Mon, 11 Mar 2013 16:41:31 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id q5sm26362174eep.11.2013.03.11.16.41.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 11 Mar 2013 16:41:30 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 12 Mar 2013 00:41:27 +0100 From: Baptiste Daroussin To: Waitman Gobble Subject: Re: svn commit: r248151 - in head: . share/examples/cvsup Message-ID: <20130311234127.GG25215@ithaqua.etoilebsd.net> References: <1363037522.75609@da3m0n8t3r.com> <1363039185.21627@da3m0n8t3r.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JbKQpFqZXJ2T76Sg" Content-Disposition: inline In-Reply-To: <1363039185.21627@da3m0n8t3r.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 11 Mar 2013 23:41:33 -0000 --JbKQpFqZXJ2T76Sg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2013 at 02:59:45PM -0700, Waitman Gobble wrote: > Waitman Gobble wrote .. > > /usr/ports/ports-mgmt/pkg/ > > fetch.c:167:38 > > if (((&http_mirrors)->stqh_first =3D=3D ((void *)0))) > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ > > fetch.c:167:38: note: remove extraneous parentheses around the comparis= on to silence > > this warning >=20 >=20 > OOPS. it's apparently ccache related. Sorry about that!! >=20 CCACHE_CPP2 is the way to still use ccache with clang and sys/queue.h. regards, Bapt --JbKQpFqZXJ2T76Sg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlE+a6cACgkQ8kTtMUmk6EwFTwCgvqCf1OkCdLm82rFWvYr/3BUx QbMAn2KA32nF1rJZmpF9ivygUFhzPGx+ =LOLQ -----END PGP SIGNATURE----- --JbKQpFqZXJ2T76Sg-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 02:20:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 92B19D93; Tue, 12 Mar 2013 02:20:21 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 74BCBFFC; Tue, 12 Mar 2013 02:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C2KLM2088316; Tue, 12 Mar 2013 02:20:21 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C2KL5x088315; Tue, 12 Mar 2013 02:20:21 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201303120220.r2C2KL5x088315@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 12 Mar 2013 02:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248180 - head/sys/netinet6 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.14 Precedence: list List-Id: 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, 12 Mar 2013 02:20:21 -0000 Author: ae Date: Tue Mar 12 02:20:20 2013 New Revision: 248180 URL: http://svnweb.freebsd.org/changeset/base/248180 Log: Take the inpcb rlock before calculating checksum, it was accidentally moved in r191672. Obtained from: Yandex LLC MFC after: 1 week Modified: head/sys/netinet6/raw_ip6.c Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Tue Mar 12 02:12:47 2013 (r248179) +++ head/sys/netinet6/raw_ip6.c Tue Mar 12 02:20:20 2013 (r248180) @@ -197,6 +197,7 @@ rip6_input(struct mbuf **mp, int *offp, &ip6->ip6_dst) != 0) continue; } + INP_RLOCK(in6p); if (in6p->in6p_cksum != -1) { V_rip6stat.rip6s_isum++; if (in6_cksum(m, proto, *offp, @@ -206,7 +207,6 @@ rip6_input(struct mbuf **mp, int *offp, continue; } } - INP_RLOCK(in6p); /* * If this raw socket has multicast state, and we * have received a multicast, check if this socket From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 02:54: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]) by hub.freebsd.org (Postfix) with ESMTP id D651F1C1; Tue, 12 Mar 2013 02:54:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BEE5C1A1; Tue, 12 Mar 2013 02:54:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C2sn2d097771; Tue, 12 Mar 2013 02:54:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C2sn6E097770; Tue, 12 Mar 2013 02:54:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303120254.r2C2sn6E097770@svn.freebsd.org> From: Adrian Chadd Date: Tue, 12 Mar 2013 02:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248181 - head/sys/modules/ath 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.14 Precedence: list List-Id: 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, 12 Mar 2013 02:54:49 -0000 Author: adrian Date: Tue Mar 12 02:54:49 2013 New Revision: 248181 URL: http://svnweb.freebsd.org/changeset/base/248181 Log: Shift this over to a new location in contrib/, in preparation to push this public. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Tue Mar 12 02:20:20 2013 (r248180) +++ head/sys/modules/ath/Makefile Tue Mar 12 02:54:49 2013 (r248181) @@ -124,7 +124,7 @@ SRCS+= ah_eeprom_9287.c SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c # + AR9300 HAL -# .PATH: ${.CURDIR}/../../dev/ath/ath_hal/ar9003 +# .PATH: ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/ar9300 #SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c #SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c #SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c @@ -149,6 +149,7 @@ SRCS+= amrr.c SRCS+= dfs_null.c CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal +# CFLAGS+= -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/ .if !defined(KERNBUILDDIR) opt_ah.h: From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 03:03: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]) by hub.freebsd.org (Postfix) with ESMTP id 364CC47C; Tue, 12 Mar 2013 03:03:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2955628A; Tue, 12 Mar 2013 03:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C33Ph9001842; Tue, 12 Mar 2013 03:03:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C33PcC001841; Tue, 12 Mar 2013 03:03:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303120303.r2C33PcC001841@svn.freebsd.org> From: Adrian Chadd Date: Tue, 12 Mar 2013 03:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248182 - head/sys/dev/ath/ath_hal/ar9002 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.14 Precedence: list List-Id: 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, 12 Mar 2013 03:03:25 -0000 Author: adrian Date: Tue Mar 12 03:03:24 2013 New Revision: 248182 URL: http://svnweb.freebsd.org/changeset/base/248182 Log: Use the correct antenna configuration variable here. "diversity" just controls whether it's on or off. Found by: clang Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Tue Mar 12 02:54:49 2013 (r248181) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Tue Mar 12 03:03:24 2013 (r248182) @@ -50,7 +50,7 @@ ar9285BTCoexAntennaDiversity(struct ath_ if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && - (AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) { + (AH5212(ah)->ah_antControl == HAL_ANT_VARIABLE)) { /* Enable antenna diversity */ ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE; ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE; @@ -63,7 +63,7 @@ ar9285BTCoexAntennaDiversity(struct ath_ OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, HAL_BT_COEX_ANT_DIV_SWITCH_COM); OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000); - } else if (AH5212(ah)->ah_diversity == HAL_ANT_FIXED_B) { + } else if (AH5212(ah)->ah_antControl == HAL_ANT_FIXED_B) { /* Disable antenna diversity. Use antenna B(LNA2) only. */ ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B; ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B; From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 04:37: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]) by hub.freebsd.org (Postfix) with ESMTP id 1F7491A4; Tue, 12 Mar 2013 04:37:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ECC22789; Tue, 12 Mar 2013 04:37:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C4b454029429; Tue, 12 Mar 2013 04:37:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C4b4MS029428; Tue, 12 Mar 2013 04:37:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201303120437.r2C4b4MS029428@svn.freebsd.org> From: Eitan Adler Date: Tue, 12 Mar 2013 04:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248184 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 04:37:05 -0000 Author: eadler Date: Tue Mar 12 04:37:04 2013 New Revision: 248184 URL: http://svnweb.freebsd.org/changeset/base/248184 Log: Remove two members of portmgr that have recently stepped down. Thank you for your time on portmgr. Remove one member from bugmeister that has stepped down recently. Thank you for your time on bugmeister. While here clean up the graph a bit (remove dead cvs repos) Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Tue Mar 12 03:48:05 2013 (r248183) +++ head/share/misc/organization.dot Tue Mar 12 04:37:04 2013 (r248184) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, \nerwin, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] @@ -43,13 +43,12 @@ srccommitters [label="Src Committers\nsr accounts [label="Accounts Team\naccounts@FreeBSD.org\nmarkm, simon, kensmith,\ndhw"] backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] -bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo, linimon"] +bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo"] clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbrd, simon, ps,\nkensmith, peter"] cvsupmaster [label="CVSup Mirror Site Coordinators\ncvsup-master@FreeBSD.org\nkuriyama, jdp,\nkensmith"] dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] ncvs [label="CVS src Repository Managers\nncvs@FreeBSD.org\njoe, kuriyama, markm,\nsimon, peter"] -pcvs [label="CVS ports Repository Managers\npcvs@FreeBSD.org\nmarcus, joe, kuriyama,\nmarkm, simon"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] @@ -70,8 +69,6 @@ _admin -> backups _admin -> bugmeister _admin -> clusteradm _admin -> ncvs -_admin -> pcvs -_admin -> dcvs _admin -> cvsupmaster _admin -> dnsadm _admin -> mirroradmin From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 06:58:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0FB4439B; Tue, 12 Mar 2013 06:58:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 00C3DBFA; Tue, 12 Mar 2013 06:58:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C6wnoB071065; Tue, 12 Mar 2013 06:58:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C6wnI8071062; Tue, 12 Mar 2013 06:58:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201303120658.r2C6wnI8071062@svn.freebsd.org> From: Alexander Motin Date: Tue, 12 Mar 2013 06:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248186 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 06:58:50 -0000 Author: mav Date: Tue Mar 12 06:58:49 2013 New Revision: 248186 URL: http://svnweb.freebsd.org/changeset/base/248186 Log: Make kern_nanosleep() and pause_sbt() to use per-CPU sleep queues. This removes significant sleep queue lock congestion on multithreaded microbenchmarks, making them scale to multiple CPUs almost linearly. Modified: head/sys/kern/kern_synch.c head/sys/kern/kern_time.c head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Mar 12 06:14:31 2013 (r248185) +++ head/sys/kern/kern_synch.c Tue Mar 12 06:58:49 2013 (r248186) @@ -85,7 +85,7 @@ SYSINIT(synch_setup, SI_SUB_KICK_SCHEDUL NULL); int hogticks; -static int pause_wchan; +static uint8_t pause_wchan[MAXCPU]; static struct callout loadav_callout; @@ -198,7 +198,8 @@ _sleep(void *ident, struct lock_object * if (TD_ON_SLEEPQ(td)) sleepq_remove(td, td->td_wchan); - if (ident == &pause_wchan) + if ((uint8_t *)ident >= &pause_wchan[0] && + (uint8_t *)ident <= &pause_wchan[MAXCPU - 1]) sleepq_flags = SLEEPQ_PAUSE; else sleepq_flags = SLEEPQ_SLEEP; @@ -372,7 +373,7 @@ pause_sbt(const char *wmesg, sbintime_t DELAY((sbt & 0xffffffff) / SBT_1US); return (0); } - return (_sleep(&pause_wchan, NULL, 0, wmesg, sbt, pr, flags)); + return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags)); } /* Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Tue Mar 12 06:14:31 2013 (r248185) +++ head/sys/kern/kern_time.c Tue Mar 12 06:58:49 2013 (r248186) @@ -477,7 +477,7 @@ kern_clock_getres(struct thread *td, clo return (0); } -static int nanowait; +static uint8_t nanowait[MAXCPU]; int kern_nanosleep(struct thread *td, struct timespec *rqt, struct timespec *rmt) @@ -503,8 +503,8 @@ kern_nanosleep(struct thread *td, struct if (TIMESEL(&sbt, tmp)) sbt += tc_tick_sbt; sbt += tmp; - error = tsleep_sbt(&nanowait, PWAIT | PCATCH, "nanslp", sbt, prec, - C_ABSOLUTE); + error = tsleep_sbt(&nanowait[curcpu], PWAIT | PCATCH, "nanslp", + sbt, prec, C_ABSOLUTE); if (error != EWOULDBLOCK) { if (error == ERESTART) error = EINTR; Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue Mar 12 06:14:31 2013 (r248185) +++ head/sys/kern/subr_sleepqueue.c Tue Mar 12 06:58:49 2013 (r248186) @@ -88,16 +88,14 @@ __FBSDID("$FreeBSD$"); #endif /* - * Constants for the hash table of sleep queue chains. These constants are - * the same ones that 4BSD (and possibly earlier versions of BSD) used. - * Basically, we ignore the lower 8 bits of the address since most wait - * channel pointers are aligned and only look at the next 7 bits for the - * hash. SC_TABLESIZE must be a power of two for SC_MASK to work properly. + * Constants for the hash table of sleep queue chains. + * SC_TABLESIZE must be a power of two for SC_MASK to work properly. */ -#define SC_TABLESIZE 128 /* Must be power of 2. */ +#define SC_TABLESIZE 256 /* Must be power of 2. */ #define SC_MASK (SC_TABLESIZE - 1) #define SC_SHIFT 8 -#define SC_HASH(wc) (((uintptr_t)(wc) >> SC_SHIFT) & SC_MASK) +#define SC_HASH(wc) ((((uintptr_t)(wc) >> SC_SHIFT) ^ (uintptr_t)(wc)) & \ + SC_MASK) #define SC_LOOKUP(wc) &sleepq_chains[SC_HASH(wc)] #define NR_SLEEPQS 2 /* From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 08:45:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1803115; Tue, 12 Mar 2013 08:45:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC8D124C; Tue, 12 Mar 2013 08:45:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C8jhEf004368; Tue, 12 Mar 2013 08:45:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C8jhAn004366; Tue, 12 Mar 2013 08:45:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303120845.r2C8jhAn004366@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 08:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248187 - head/sys/dev/sound/pci/hda 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.14 Precedence: list List-Id: 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, 12 Mar 2013 08:45:44 -0000 Author: glebius Date: Tue Mar 12 08:45:42 2013 New Revision: 248187 URL: http://svnweb.freebsd.org/changeset/base/248187 Log: More Lenovo headphones redirection quirks: Lenovo T430, Lenovo T430S. Submitted by: Sergey Nasonov , T430 Submitted by: Johannes Dieterich , T430S Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c head/sys/dev/sound/pci/hda/hdac.h Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Mar 12 06:58:49 2013 (r248186) +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Mar 12 08:45:42 2013 (r248187) @@ -344,7 +344,9 @@ hdac_pin_patch(struct hdaa_widget *w) break; } } else if (id == HDA_CODEC_ALC269 && - subid == LENOVO_X1CRBN_SUBVENDOR) { + (subid == LENOVO_X1CRBN_SUBVENDOR || + subid == LENOVO_T430_SUBVENDOR || + subid == LENOVO_T430S_SUBVENDOR)) { switch (nid) { case 21: patch = "as=1 seq=15"; Modified: head/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.h Tue Mar 12 06:58:49 2013 (r248186) +++ head/sys/dev/sound/pci/hda/hdac.h Tue Mar 12 08:45:42 2013 (r248187) @@ -225,6 +225,8 @@ #define LENOVO_X220_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21da) #define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_T420_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21ce) +#define LENOVO_T430_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f3) +#define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 08:59: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]) by hub.freebsd.org (Postfix) with ESMTP id 36520422; Tue, 12 Mar 2013 08:59:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1079C2D1; Tue, 12 Mar 2013 08:59:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2C8xpHq007969; Tue, 12 Mar 2013 08:59:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2C8xpa6007963; Tue, 12 Mar 2013 08:59:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303120859.r2C8xpa6007963@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 08:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248188 - in head/sys: dev/iscsi/initiator fs/nfs xdr 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.14 Precedence: list List-Id: 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, 12 Mar 2013 08:59:52 -0000 Author: glebius Date: Tue Mar 12 08:59:51 2013 New Revision: 248188 URL: http://svnweb.freebsd.org/changeset/base/248188 Log: Finish r243882: mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys. Sponsored by: Nginx, Inc. Modified: head/sys/dev/iscsi/initiator/isc_soc.c head/sys/fs/nfs/nfsport.h head/sys/xdr/xdr_mbuf.c Modified: head/sys/dev/iscsi/initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi/initiator/isc_soc.c Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/dev/iscsi/initiator/isc_soc.c Tue Mar 12 08:59:51 2013 (r248188) @@ -91,7 +91,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p /* | mbuf for the iSCSI header */ - MGETHDR(mh, M_TRYWAIT, MT_DATA); + MGETHDR(mh, M_WAITOK, MT_DATA); mh->m_pkthdr.rcvif = NULL; mh->m_next = NULL; mh->m_len = sizeof(union ipdu_u); @@ -132,7 +132,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p while(len > 0) { int l; - MGET(md, M_TRYWAIT, MT_DATA); + MGET(md, M_WAITOK, MT_DATA); md->m_ext.ref_cnt = &ou_refcnt; l = min(MCLBYTES, len); debug(4, "setting ext_free(arg=%p len/l=%d/%d)", pq->buf, len, l); @@ -150,7 +150,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p off += l; } if(((pp->ds_len & 03) != 0) || ISOK2DIG(sp->dataDigest, pp)) { - MGET(md, M_TRYWAIT, MT_DATA); + MGET(md, M_WAITOK, MT_DATA); if(pp->ds_len & 03) len = 4 - (pp->ds_len & 03); else Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/fs/nfs/nfsport.h Tue Mar 12 08:59:51 2013 (r248188) @@ -140,32 +140,32 @@ * Allocate mbufs. Must succeed and never set the mbuf ptr to NULL. */ #define NFSMGET(m) do { \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMGETHDR(m) do { \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMCLGET(m, w) do { \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGET((m), M_TRYWAIT, MT_DATA); \ + MGET((m), M_WAITOK, MT_DATA); \ } \ MCLGET((m), (w)); \ } while (0) #define NFSMCLGETHDR(m, w) do { \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ while ((m) == NULL ) { \ (void) nfs_catnap(PZERO, 0, "nfsmget"); \ - MGETHDR((m), M_TRYWAIT, MT_DATA); \ + MGETHDR((m), M_WAITOK, MT_DATA); \ } \ } while (0) #define NFSMTOD mtod Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Tue Mar 12 08:45:42 2013 (r248187) +++ head/sys/xdr/xdr_mbuf.c Tue Mar 12 08:59:51 2013 (r248188) @@ -228,9 +228,9 @@ xdrmbuf_putbytes(XDR *xdrs, const char * if (xdrs->x_handy == m->m_len && M_TRAILINGSPACE(m) == 0) { if (!m->m_next) { - MGET(n, M_TRYWAIT, m->m_type); + MGET(n, M_WAITOK, m->m_type); if (m->m_flags & M_EXT) - MCLGET(n, M_TRYWAIT); + MCLGET(n, M_WAITOK); m->m_next = n; } m = m->m_next; From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 10:05: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]) by hub.freebsd.org (Postfix) with ESMTP id D06EBF58; Tue, 12 Mar 2013 10:05:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AAFA17F1; Tue, 12 Mar 2013 10:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CA5ak6028532; Tue, 12 Mar 2013 10:05:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CA5aL8028531; Tue, 12 Mar 2013 10:05:36 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121005.r2CA5aL8028531@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 10:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248189 - head/sys/arm/at91 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.14 Precedence: list List-Id: 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, 12 Mar 2013 10:05:37 -0000 Author: glebius Date: Tue Mar 12 10:05:36 2013 New Revision: 248189 URL: http://svnweb.freebsd.org/changeset/base/248189 Log: Use m_get2() to get an mbuf of appropriate size. Reviewed by: marius Sponsored by: Nginx, Inc. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Tue Mar 12 08:59:51 2013 (r248188) +++ head/sys/arm/at91/if_ate.c Tue Mar 12 10:05:36 2013 (r248189) @@ -899,12 +899,9 @@ ate_intr(void *xsc) /* FCS is not coppied into mbuf. */ remain = (sc->rx_descs[idx].status & ETH_LEN_MASK) - 4; - /* Get an appropriately sized mbuf */ - if (remain + ETHER_ALIGN >= MINCLSIZE) - mb = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - else - MGETHDR(mb, M_NOWAIT, MT_DATA); - + /* Get an appropriately sized mbuf. */ + mb = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, + remain + ETHER_ALIGN); if (mb == NULL) { sc->ifp->if_iqdrops++; rxdhead->status = 0; From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:12:17 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]) by hub.freebsd.org (Postfix) with ESMTP id B62F5B10; Tue, 12 Mar 2013 12:12:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9A71412D; Tue, 12 Mar 2013 12:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCCHxq068658; Tue, 12 Mar 2013 12:12:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCCGLd068655; Tue, 12 Mar 2013 12:12:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121212.r2CCCGLd068655@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 12:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248193 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:12:17 -0000 Author: glebius Date: Tue Mar 12 12:12:16 2013 New Revision: 248193 URL: http://svnweb.freebsd.org/changeset/base/248193 Log: The m_extadd() can fail due to memory allocation failure, thus: - Make it return int, not void. - Add wait parameter. - Update MEXTADD() macro appropriately, defaults to M_NOWAIT, as before this change. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Mar 12 12:10:32 2013 (r248192) +++ head/sys/kern/uipc_mbuf.c Tue Mar 12 12:12:16 2013 (r248193) @@ -255,25 +255,30 @@ m_freem(struct mbuf *mb) * Returns: * Nothing. */ -void +int m_extadd(struct mbuf *mb, caddr_t buf, u_int size, - void (*freef)(void *, void *), void *arg1, void *arg2, int flags, int type) + void (*freef)(void *, void *), void *arg1, void *arg2, int flags, int type, + int wait) { KASSERT(type != EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__)); if (type != EXT_EXTREF) - mb->m_ext.ref_cnt = (u_int *)uma_zalloc(zone_ext_refcnt, M_NOWAIT); - if (mb->m_ext.ref_cnt != NULL) { - *(mb->m_ext.ref_cnt) = 1; - mb->m_flags |= (M_EXT | flags); - mb->m_ext.ext_buf = buf; - mb->m_data = mb->m_ext.ext_buf; - mb->m_ext.ext_size = size; - mb->m_ext.ext_free = freef; - mb->m_ext.ext_arg1 = arg1; - mb->m_ext.ext_arg2 = arg2; - mb->m_ext.ext_type = type; - } + mb->m_ext.ref_cnt = uma_zalloc(zone_ext_refcnt, wait); + + if (mb->m_ext.ref_cnt == NULL) + return (ENOMEM); + + *(mb->m_ext.ref_cnt) = 1; + mb->m_flags |= (M_EXT | flags); + mb->m_ext.ext_buf = buf; + mb->m_data = mb->m_ext.ext_buf; + mb->m_ext.ext_size = size; + mb->m_ext.ext_free = freef; + mb->m_ext.ext_arg1 = arg1; + mb->m_ext.ext_arg2 = arg2; + mb->m_ext.ext_type = type; + + return (0); } /* Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Mar 12 12:10:32 2013 (r248192) +++ head/sys/sys/mbuf.h Tue Mar 12 12:12:16 2013 (r248193) @@ -655,7 +655,8 @@ m_last(struct mbuf *m) #define MGETHDR(m, how, type) ((m) = m_gethdr((how), (type))) #define MCLGET(m, how) m_clget((m), (how)) #define MEXTADD(m, buf, size, free, arg1, arg2, flags, type) \ - m_extadd((m), (caddr_t)(buf), (size), (free),(arg1),(arg2),(flags), (type)) + (void )m_extadd((m), (caddr_t)(buf), (size), (free), (arg1), (arg2),\ + (flags), (type), M_NOWAIT) #define m_getm(m, len, how, type) \ m_getm2((m), (len), (how), (type), M_PKTHDR) @@ -780,8 +781,8 @@ int m_apply(struct mbuf *, int, int, int (*)(void *, void *, u_int), void *); int m_append(struct mbuf *, int, c_caddr_t); void m_cat(struct mbuf *, struct mbuf *); -void m_extadd(struct mbuf *, caddr_t, u_int, - void (*)(void *, void *), void *, void *, int, int); +int m_extadd(struct mbuf *, caddr_t, u_int, + void (*)(void *, void *), void *, void *, int, int, int); struct mbuf *m_collapse(struct mbuf *, int, int); void m_copyback(struct mbuf *, int, int, c_caddr_t); void m_copydata(const struct mbuf *, int, int, caddr_t); From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:15: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]) by hub.freebsd.org (Postfix) with ESMTP id EA961DE2; Tue, 12 Mar 2013 12:15:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DD344170; Tue, 12 Mar 2013 12:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCFOeW069193; Tue, 12 Mar 2013 12:15:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCFOpw069192; Tue, 12 Mar 2013 12:15:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121215.r2CCFOpw069192@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 12:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248194 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:15:25 -0000 Author: glebius Date: Tue Mar 12 12:15:24 2013 New Revision: 248194 URL: http://svnweb.freebsd.org/changeset/base/248194 Log: In kern_sendfile() use m_extadd() instead of MEXTADD() macro, supplying appropriate wait argument and checking return value. Before this change m_extadd() could fail, and kern_sendfile() ignored that. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Mar 12 12:12:16 2013 (r248193) +++ head/sys/kern/uipc_syscalls.c Tue Mar 12 12:15:24 2013 (r248194) @@ -2222,8 +2222,14 @@ retry_space: sf_buf_mext((void *)sf_buf_kva(sf), sf); break; } - MEXTADD(m0, sf_buf_kva(sf), PAGE_SIZE, sf_buf_mext, - sfs, sf, M_RDONLY, EXT_SFBUF); + if (m_extadd(m0, (caddr_t )sf_buf_kva(sf), PAGE_SIZE, + sf_buf_mext, sfs, sf, M_RDONLY, EXT_SFBUF, + (mnw ? M_NOWAIT : M_WAITOK)) != 0) { + error = (mnw ? EAGAIN : ENOBUFS); + sf_buf_mext((void *)sf_buf_kva(sf), sf); + m_freem(m0); + break; + } m0->m_data = (char *)sf_buf_kva(sf) + pgoff; m0->m_len = xfsize; From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:17:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 378E0F7D; Tue, 12 Mar 2013 12:17:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2A67D18F; Tue, 12 Mar 2013 12:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCHK7H069488; Tue, 12 Mar 2013 12:17:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCHJ2J069478; Tue, 12 Mar 2013 12:17:19 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121217.r2CCHJ2J069478@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 12:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248195 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:17:21 -0000 Author: glebius Date: Tue Mar 12 12:17:19 2013 New Revision: 248195 URL: http://svnweb.freebsd.org/changeset/base/248195 Log: Use m_get(), m_gethdr() and m_getcl() instead of historic macros. Sponsored by: Nginx, Inc. Modified: head/sys/rpc/clnt_dg.c head/sys/rpc/clnt_vc.c head/sys/rpc/rpc_generic.c head/sys/rpc/rpcm_subs.h head/sys/rpc/svc.c head/sys/rpc/svc_dg.c head/sys/rpc/svc_vc.c Modified: head/sys/rpc/clnt_dg.c ============================================================================== --- head/sys/rpc/clnt_dg.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/clnt_dg.c Tue Mar 12 12:17:19 2013 (r248195) @@ -431,7 +431,7 @@ call_again: send_again: mtx_unlock(&cs->cs_lock); - MGETHDR(mreq, M_WAITOK, MT_DATA); + mreq = m_gethdr(M_WAITOK, MT_DATA); KASSERT(cu->cu_mcalllen <= MHLEN, ("RPC header too big")); bcopy(cu->cu_mcallc, mreq->m_data, cu->cu_mcalllen); mreq->m_len = cu->cu_mcalllen; Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/clnt_vc.c Tue Mar 12 12:17:19 2013 (r248195) @@ -349,7 +349,7 @@ call_again: /* * Leave space to pre-pend the record mark. */ - MGETHDR(mreq, M_WAITOK, MT_DATA); + mreq = m_gethdr(M_WAITOK, MT_DATA); mreq->m_data += sizeof(uint32_t); KASSERT(ct->ct_mpos + sizeof(uint32_t) <= MHLEN, ("RPC header too big")); Modified: head/sys/rpc/rpc_generic.c ============================================================================== --- head/sys/rpc/rpc_generic.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/rpc_generic.c Tue Mar 12 12:17:19 2013 (r248195) @@ -750,9 +750,7 @@ clnt_call_private( struct mbuf *mrep; enum clnt_stat stat; - MGET(mreq, M_WAITOK, MT_DATA); - MCLGET(mreq, M_WAITOK); - mreq->m_len = 0; + mreq = m_getcl(M_WAITOK, MT_DATA, 0); xdrmbuf_create(&xdrs, mreq, XDR_ENCODE); if (!xargs(&xdrs, argsp)) { Modified: head/sys/rpc/rpcm_subs.h ============================================================================== --- head/sys/rpc/rpcm_subs.h Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/rpcm_subs.h Tue Mar 12 12:17:19 2013 (r248195) @@ -80,7 +80,7 @@ #define rpcm_build(a,c,s) \ { if ((s) > M_TRAILINGSPACE(mb)) { \ - MGET(mb2, M_WAITOK, MT_DATA); \ + mb2 = m_get(M_WAITOK, MT_DATA); \ if ((s) > MLEN) \ panic("build > MLEN"); \ mb->m_next = mb2; \ Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/svc.c Tue Mar 12 12:17:19 2013 (r248195) @@ -563,9 +563,7 @@ svc_sendreply(struct svc_req *rqstp, xdr rply.acpted_rply.ar_results.where = NULL; rply.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void; - MGET(m, M_WAITOK, MT_DATA); - MCLGET(m, M_WAITOK); - m->m_len = 0; + m = m_getcl(M_WAITOK, MT_DATA, 0); xdrmbuf_create(&xdrs, m, XDR_ENCODE); ok = xdr_results(&xdrs, xdr_location); XDR_DESTROY(&xdrs); Modified: head/sys/rpc/svc_dg.c ============================================================================== --- head/sys/rpc/svc_dg.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/svc_dg.c Tue Mar 12 12:17:19 2013 (r248195) @@ -238,8 +238,7 @@ svc_dg_reply(SVCXPRT *xprt, struct rpc_m bool_t stat = TRUE; int error; - MGETHDR(mrep, M_WAITOK, MT_DATA); - mrep->m_len = 0; + mrep = m_gethdr(M_WAITOK, MT_DATA); xdrmbuf_create(&xdrs, mrep, XDR_ENCODE); Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Tue Mar 12 12:15:24 2013 (r248194) +++ head/sys/rpc/svc_vc.c Tue Mar 12 12:17:19 2013 (r248195) @@ -796,8 +796,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_m /* * Leave space for record mark. */ - MGETHDR(mrep, M_WAITOK, MT_DATA); - mrep->m_len = 0; + mrep = m_gethdr(M_WAITOK, MT_DATA); mrep->m_data += sizeof(uint32_t); xdrmbuf_create(&xdrs, mrep, XDR_ENCODE); @@ -850,8 +849,7 @@ svc_vc_backchannel_reply(SVCXPRT *xprt, /* * Leave space for record mark. */ - MGETHDR(mrep, M_WAITOK, MT_DATA); - mrep->m_len = 0; + mrep = m_gethdr(M_WAITOK, MT_DATA); mrep->m_data += sizeof(uint32_t); xdrmbuf_create(&xdrs, mrep, XDR_ENCODE); From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:19:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 98C5A1BA; Tue, 12 Mar 2013 12:19:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8C77E1B3; Tue, 12 Mar 2013 12:19:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCJNQ6069790; Tue, 12 Mar 2013 12:19:23 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCJN5Z069789; Tue, 12 Mar 2013 12:19:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121219.r2CCJN5Z069789@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 12:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248196 - head/sys/nfs 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:19:23 -0000 Author: glebius Date: Tue Mar 12 12:19:23 2013 New Revision: 248196 URL: http://svnweb.freebsd.org/changeset/base/248196 Log: Use m_get2() to get mbuf of appropriate size. Sponsored by: Nginx, Inc. Modified: head/sys/nfs/krpc_subr.c Modified: head/sys/nfs/krpc_subr.c ============================================================================== --- head/sys/nfs/krpc_subr.c Tue Mar 12 12:17:19 2013 (r248195) +++ head/sys/nfs/krpc_subr.c Tue Mar 12 12:19:23 2013 (r248196) @@ -459,9 +459,7 @@ xdr_string_encode(char *str, int len) if (mlen > MCLBYTES) /* If too big, we just can't do it. */ return (NULL); - m = m_get(M_WAITOK, MT_DATA); - if (mlen > MLEN) - MCLGET(m, M_WAITOK); + m = m_get2(M_WAITOK, MT_DATA, 0, mlen); xs = mtod(m, struct xdr_string *); m->m_len = mlen; xs->len = txdr_unsigned(len); From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:20: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]) by hub.freebsd.org (Postfix) with ESMTP id 3930C36D; Tue, 12 Mar 2013 12:20:50 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2782F1C9; Tue, 12 Mar 2013 12:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCKo3G070183; Tue, 12 Mar 2013 12:20:50 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCKo8w070182; Tue, 12 Mar 2013 12:20:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201303121220.r2CCKo8w070182@svn.freebsd.org> From: Attilio Rao Date: Tue, 12 Mar 2013 12:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248197 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:20:50 -0000 Author: attilio Date: Tue Mar 12 12:20:49 2013 New Revision: 248197 URL: http://svnweb.freebsd.org/changeset/base/248197 Log: Simplify vm_page_is_valid(). Sponsored by: EMC / Isilon storage division Reviewed by: alc Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Mar 12 12:19:23 2013 (r248196) +++ head/sys/vm/vm_page.c Tue Mar 12 12:20:49 2013 (r248197) @@ -2898,10 +2898,7 @@ vm_page_is_valid(vm_page_t m, int base, VM_OBJECT_ASSERT_WLOCKED(m->object); bits = vm_page_bits(base, size); - if (m->valid && ((m->valid & bits) == bits)) - return 1; - else - return 0; + return (m->valid != 0 && (m->valid & bits) == bits); } /* From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:23: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]) by hub.freebsd.org (Postfix) with ESMTP id C85AA536; Tue, 12 Mar 2013 12:23:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B502A1FA; Tue, 12 Mar 2013 12:23:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCNmVn072054; Tue, 12 Mar 2013 12:23:48 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCNluc072050; Tue, 12 Mar 2013 12:23:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121223.r2CCNluc072050@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 12:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248198 - head/sys/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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:23:48 -0000 Author: glebius Date: Tue Mar 12 12:23:47 2013 New Revision: 248198 URL: http://svnweb.freebsd.org/changeset/base/248198 Log: - Use m_get2() instead of nfsm_reqhead(). - Use m_get(), m_getcl() instead of historic macros. Sponsored by: Nginx, Inc. Modified: head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsm_subs.h Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Tue Mar 12 12:20:49 2013 (r248197) +++ head/sys/nfsclient/nfs_subs.c Tue Mar 12 12:23:47 2013 (r248198) @@ -172,23 +172,6 @@ nfs_xid_gen(void) } /* - * Create the header for an rpc request packet - * The hsiz is the size of the rest of the nfs request header. - * (just used to decide if a cluster is a good idea) - */ -struct mbuf * -nfsm_reqhead(struct vnode *vp, u_long procid, int hsiz) -{ - struct mbuf *mb; - - MGET(mb, M_WAITOK, MT_DATA); - if (hsiz >= MINCLSIZE) - MCLGET(mb, M_WAITOK); - mb->m_len = 0; - return (mb); -} - -/* * copies a uio scatter/gather list to an mbuf chain. * NOTE: can ony handle iovcnt == 1 */ @@ -218,10 +201,10 @@ nfsm_uiotombuf(struct uio *uiop, struct while (left > 0) { mlen = M_TRAILINGSPACE(mp); if (mlen == 0) { - MGET(mp, M_WAITOK, MT_DATA); if (clflg) - MCLGET(mp, M_WAITOK); - mp->m_len = 0; + mp = m_getcl(M_WAITOK, MT_DATA, 0); + else + mp = m_get(M_WAITOK, MT_DATA); mp2->m_next = mp; mp2 = mp; mlen = M_TRAILINGSPACE(mp); @@ -251,8 +234,7 @@ nfsm_uiotombuf(struct uio *uiop, struct } if (rem > 0) { if (rem > M_TRAILINGSPACE(mp)) { - MGET(mp, M_WAITOK, MT_DATA); - mp->m_len = 0; + mp = m_get(M_WAITOK, MT_DATA); mp2->m_next = mp; } cp = mtod(mp, caddr_t)+mp->m_len; @@ -296,10 +278,13 @@ nfsm_strtmbuf(struct mbuf **mb, char **b } /* Loop around adding mbufs */ while (siz > 0) { - MGET(m1, M_WAITOK, MT_DATA); - if (siz > MLEN) - MCLGET(m1, M_WAITOK); - m1->m_len = NFSMSIZ(m1); + if (siz > MLEN) { + m1 = m_getcl(M_WAITOK, MT_DATA, 0); + m1->m_len = MCLBYTES; + } else { + m1 = m_get(M_WAITOK, MT_DATA); + m1->m_len = MLEN; + } m2->m_next = m1; m2 = m1; tl = mtod(m1, u_int32_t *); Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Tue Mar 12 12:20:49 2013 (r248197) +++ head/sys/nfsclient/nfs_vfsops.c Tue Mar 12 12:23:47 2013 (r248198) @@ -298,7 +298,7 @@ nfs_statfs(struct mount *mp, struct stat } else mtx_unlock(&nmp->nm_mtx); nfsstats.rpccnt[NFSPROC_FSSTAT]++; - mreq = nfsm_reqhead(vp, NFSPROC_FSSTAT, NFSX_FH(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -356,7 +356,7 @@ nfs_fsinfo(struct nfsmount *nmp, struct u_int64_t maxfsize; nfsstats.rpccnt[NFSPROC_FSINFO]++; - mreq = nfsm_reqhead(vp, NFSPROC_FSINFO, NFSX_FH(1)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(1)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Tue Mar 12 12:20:49 2013 (r248197) +++ head/sys/nfsclient/nfs_vnops.c Tue Mar 12 12:23:47 2013 (r248198) @@ -294,7 +294,7 @@ nfs3_access_otw(struct vnode *vp, int wm struct nfsnode *np = VTONFS(vp); nfsstats.rpccnt[NFSPROC_ACCESS]++; - mreq = nfsm_reqhead(vp, NFSPROC_ACCESS, NFSX_FH(v3) + NFSX_UNSIGNED); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + NFSX_UNSIGNED); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -714,7 +714,7 @@ nfs_getattr(struct vop_getattr_args *ap) goto nfsmout; } nfsstats.rpccnt[NFSPROC_GETATTR]++; - mreq = nfsm_reqhead(vp, NFSPROC_GETATTR, NFSX_FH(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -873,7 +873,7 @@ nfs_setattrrpc(struct vnode *vp, struct int v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_SETATTR]++; - mreq = nfsm_reqhead(vp, NFSPROC_SETATTR, NFSX_FH(v3) + NFSX_SATTR(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + NFSX_SATTR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1037,8 +1037,8 @@ nfs_lookup(struct vop_lookup_args *ap) nfsstats.lookupcache_misses++; nfsstats.rpccnt[NFSPROC_LOOKUP]++; len = cnp->cn_namelen; - mreq = nfsm_reqhead(dvp, NFSPROC_LOOKUP, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1251,7 +1251,7 @@ nfs_readlinkrpc(struct vnode *vp, struct int v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_READLINK]++; - mreq = nfsm_reqhead(vp, NFSPROC_READLINK, NFSX_FH(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1306,7 +1306,8 @@ nfs_readrpc(struct vnode *vp, struct uio while (tsiz > 0) { nfsstats.rpccnt[NFSPROC_READ]++; len = (tsiz > rsize) ? rsize : tsiz; - mreq = nfsm_reqhead(vp, NFSPROC_READ, NFSX_FH(v3) + NFSX_UNSIGNED * 3); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED * 3); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1378,8 +1379,8 @@ nfs_writerpc(struct vnode *vp, struct ui while (tsiz > 0) { nfsstats.rpccnt[NFSPROC_WRITE]++; len = (tsiz > wsize) ? wsize : tsiz; - mreq = nfsm_reqhead(vp, NFSPROC_WRITE, - NFSX_FH(v3) + 5 * NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + 5 * NFSX_UNSIGNED + nfsm_rndup(len)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1501,8 +1502,8 @@ nfs_mknodrpc(struct vnode *dvp, struct v if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) return (error); nfsstats.rpccnt[NFSPROC_MKNOD]++; - mreq = nfsm_reqhead(dvp, NFSPROC_MKNOD, NFSX_FH(v3) + 4 * NFSX_UNSIGNED + - + nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 4 * NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1605,8 +1606,8 @@ nfs_create(struct vop_create_args *ap) fmode |= O_EXCL; again: nfsstats.rpccnt[NFSPROC_CREATE]++; - mreq = nfsm_reqhead(dvp, NFSPROC_CREATE, NFSX_FH(v3) + 2 * NFSX_UNSIGNED + - nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 2 * NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1787,8 +1788,8 @@ nfs_removerpc(struct vnode *dvp, const c int v3 = NFS_ISV3(dvp); nfsstats.rpccnt[NFSPROC_REMOVE]++; - mreq = nfsm_reqhead(dvp, NFSPROC_REMOVE, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(namelen)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(namelen)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1923,9 +1924,8 @@ nfs_renamerpc(struct vnode *fdvp, const int v3 = NFS_ISV3(fdvp); nfsstats.rpccnt[NFSPROC_RENAME]++; - mreq = nfsm_reqhead(fdvp, NFSPROC_RENAME, - (NFSX_FH(v3) + NFSX_UNSIGNED)*2 + nfsm_rndup(fnamelen) + - nfsm_rndup(tnamelen)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, (NFSX_FH(v3) + NFSX_UNSIGNED)*2 + + nfsm_rndup(fnamelen) + nfsm_rndup(tnamelen)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(fdvp, v3); @@ -1983,8 +1983,8 @@ nfs_link(struct vop_link_args *ap) v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_LINK]++; - mreq = nfsm_reqhead(vp, NFSPROC_LINK, - NFSX_FH(v3)*2 + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3)*2 + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -2029,7 +2029,7 @@ nfs_symlink(struct vop_symlink_args *ap) nfsstats.rpccnt[NFSPROC_SYMLINK]++; slen = strlen(ap->a_target); - mreq = nfsm_reqhead(dvp, NFSPROC_SYMLINK, NFSX_FH(v3) + 2*NFSX_UNSIGNED + + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 2*NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen) + nfsm_rndup(slen) + NFSX_SATTR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); @@ -2123,8 +2123,8 @@ nfs_mkdir(struct vop_mkdir_args *ap) return (error); len = cnp->cn_namelen; nfsstats.rpccnt[NFSPROC_MKDIR]++; - mreq = nfsm_reqhead(dvp, NFSPROC_MKDIR, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len) + NFSX_SATTR(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len) + NFSX_SATTR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2188,8 +2188,8 @@ nfs_rmdir(struct vop_rmdir_args *ap) if (dvp == vp) return (EINVAL); nfsstats.rpccnt[NFSPROC_RMDIR]++; - mreq = nfsm_reqhead(dvp, NFSPROC_RMDIR, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2307,8 +2307,8 @@ nfs_readdirrpc(struct vnode *vp, struct */ while (more_dirs && bigenough) { nfsstats.rpccnt[NFSPROC_READDIR]++; - mreq = nfsm_reqhead(vp, NFSPROC_READDIR, NFSX_FH(v3) + - NFSX_READDIR(v3)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_READDIR(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -2513,8 +2513,8 @@ nfs_readdirplusrpc(struct vnode *vp, str */ while (more_dirs && bigenough) { nfsstats.rpccnt[NFSPROC_READDIRPLUS]++; - mreq = nfsm_reqhead(vp, NFSPROC_READDIRPLUS, - NFSX_FH(1) + 6 * NFSX_UNSIGNED); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(1) + 6 * NFSX_UNSIGNED); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); @@ -2818,8 +2818,8 @@ nfs_lookitup(struct vnode *dvp, const ch int v3 = NFS_ISV3(dvp); nfsstats.rpccnt[NFSPROC_LOOKUP]++; - mreq = nfsm_reqhead(dvp, NFSPROC_LOOKUP, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, + NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2897,7 +2897,7 @@ nfs_commit(struct vnode *vp, u_quad_t of } mtx_unlock(&nmp->nm_mtx); nfsstats.rpccnt[NFSPROC_COMMIT]++; - mreq = nfsm_reqhead(vp, NFSPROC_COMMIT, NFSX_FH(1)); + mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(1)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); Modified: head/sys/nfsclient/nfsm_subs.h ============================================================================== --- head/sys/nfsclient/nfsm_subs.h Tue Mar 12 12:20:49 2013 (r248197) +++ head/sys/nfsclient/nfsm_subs.h Tue Mar 12 12:23:47 2013 (r248198) @@ -53,34 +53,6 @@ struct vnode; * First define what the actual subs. return */ u_int32_t nfs_xid_gen(void); -struct mbuf *nfsm_reqhead(struct vnode *vp, u_long procid, int hsiz); - -#define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMINOFF(m) \ - do { \ - if (M_HASCL(m)) \ - (m)->m_data = (m)->m_ext.ext_buf; \ - else if ((m)->m_flags & M_PKTHDR) \ - (m)->m_data = (m)->m_pktdat; \ - else \ - (m)->m_data = (m)->m_dat; \ - } while (0) -#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ - (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) - -/* - * Now for the macros that do the simple stuff and call the functions - * for the hard stuff. - * These macros use several vars. declared in nfsm_reqhead and these - * vars. must not be used elsewhere unless you are careful not to corrupt - * them. The vars. starting with pN and tN (N=1,2,3,..) are temporaries - * that may be used so long as the value is not expected to retained - * after a macro. - * I know, this is kind of dorkey, but it makes the actual op functions - * fairly clean and deals with the mess caused by the xdr discriminating - * unions. - */ - /* *********************************** */ /* Request generation phase macros */ From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 12:35: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]) by hub.freebsd.org (Postfix) with ESMTP id 0C801899; Tue, 12 Mar 2013 12:35:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C474F267; Tue, 12 Mar 2013 12:35:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CCZ2L8075217; Tue, 12 Mar 2013 12:35:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CCZ2k7075216; Tue, 12 Mar 2013 12:35:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201303121235.r2CCZ2k7075216@svn.freebsd.org> From: John Baldwin Date: Tue, 12 Mar 2013 12:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248200 - head/games/fortune/datfiles 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.14 Precedence: list List-Id: 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, 12 Mar 2013 12:35:03 -0000 Author: jhb Date: Tue Mar 12 12:35:02 2013 New Revision: 248200 URL: http://svnweb.freebsd.org/changeset/base/248200 Log: Remove fortunes-o from the base system. Debating what does or does not belong in this file is not a useful exercise or conducive to producing a high quality advanced operating system. While here, simplify the make rules to autocompute BLDS and FILES from a single DB variable. Approved by: core MFC after: 1 week Deleted: head/games/fortune/datfiles/fortunes-o.fake head/games/fortune/datfiles/fortunes-o.real head/games/fortune/datfiles/fortunes-o.sp.ok Modified: head/games/fortune/datfiles/Makefile Modified: head/games/fortune/datfiles/Makefile ============================================================================== --- head/games/fortune/datfiles/Makefile Tue Mar 12 12:33:50 2013 (r248199) +++ head/games/fortune/datfiles/Makefile Tue Mar 12 12:35:02 2013 (r248200) @@ -1,37 +1,22 @@ # @(#)Makefile 8.2 (Berkeley) 4/19/94 # $FreeBSD$ -FILES= fortunes freebsd-tips murphy startrek zippy -BLDS= fortunes.dat murphy.dat startrek.dat zippy.dat \ - fortunes-o fortunes-o.dat freebsd-tips.dat +DB= fortunes freebsd-tips murphy startrek zippy # TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, COMMENT OUT THE -# THREE LINES AND UNCOMMENT THE FOURTH LINE. +# NEXT LINE. +DB+= limerick murphy-o gerrold.limerick -# THE THREE LINES: -FILES+= limerick murphy-o gerrold.limerick -BLDS+= limerick.dat murphy-o.dat gerrold.limerick.dat -TYPE= real - -# THE FOURTH LINE: -#TYPE= fake - -FILES+= ${BLDS} +BLDS= ${DB:S/$/.dat/} +FILES= ${DB} ${BLDS} CLEANFILES+=${BLDS} FILESDIR= ${SHAREDIR}/games/fortune -.for f in fortunes freebsd-tips gerrold.limerick limerick murphy murphy-o startrek zippy +.for f in ${DB} $f.dat: $f PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \ strfile -Cs ${.ALLSRC} ${.TARGET} .endfor -fortunes-o.dat: fortunes-o - PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \ - strfile -Csx ${.ALLSRC} ${.TARGET} - -fortunes-o: fortunes-o.${TYPE} - LC_ALL=C tr a-zA-Z n-za-mN-ZA-M < ${.ALLSRC} > ${.TARGET} - .include From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 13:03:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 23A55DD5; Tue, 12 Mar 2013 13:03:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CED537A; Tue, 12 Mar 2013 13:03:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CD3VVB083872; Tue, 12 Mar 2013 13:03:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CD3VcI083871; Tue, 12 Mar 2013 13:03:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201303121303.r2CD3VcI083871@svn.freebsd.org> From: Eitan Adler Date: Tue, 12 Mar 2013 13:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248201 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 13:03:32 -0000 Author: eadler Date: Tue Mar 12 13:03:31 2013 New Revision: 248201 URL: http://svnweb.freebsd.org/changeset/base/248201 Log: Update Ruslan's last name per request. Submitted by: rm Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Mar 12 12:35:02 2013 (r248200) +++ head/share/misc/committers-ports.dot Tue Mar 12 13:03:31 2013 (r248201) @@ -171,7 +171,7 @@ philip [label="Philip Paeps\nphilip@Free rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] -rm [label="Ruslan Mahmatkhanov\nrm@FreeBSD.org\n2011/11/06"] +rm [label="Ruslan Makhmatkhanov\nrm@FreeBSD.org\n2011/11/06"] rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"] romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"] sahil [label="Sahil Tandon\nsahil@FreeBSD.org\n2010/04/11"] From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 13:42:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A912F313; Tue, 12 Mar 2013 13:42:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8D11EA23; Tue, 12 Mar 2013 13:42:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CDgnfd096144; Tue, 12 Mar 2013 13:42:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CDgl72096130; Tue, 12 Mar 2013 13:42:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303121342.r2CDgl72096130@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 12 Mar 2013 13:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248207 - in head/sys: arm/at91 kern net netinet/libalias netpfil/pf nfs nfsclient 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.14 Precedence: list List-Id: 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, 12 Mar 2013 13:42:49 -0000 Author: glebius Date: Tue Mar 12 13:42:47 2013 New Revision: 248207 URL: http://svnweb.freebsd.org/changeset/base/248207 Log: Functions m_getm2() and m_get2() have different order of arguments, and that can drive someone crazy. While m_get2() is young and not documented yet, change its order of arguments to match m_getm2(). Sorry for churn, but better now than later. Modified: head/sys/arm/at91/if_ate.c head/sys/kern/uipc_mbuf.c head/sys/net/bpf.c head/sys/netinet/libalias/alias.c head/sys/netpfil/pf/if_pfsync.c head/sys/nfs/krpc_subr.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/sys/mbuf.h Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/arm/at91/if_ate.c Tue Mar 12 13:42:47 2013 (r248207) @@ -900,8 +900,8 @@ ate_intr(void *xsc) remain = (sc->rx_descs[idx].status & ETH_LEN_MASK) - 4; /* Get an appropriately sized mbuf. */ - mb = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, - remain + ETHER_ALIGN); + mb = m_get2(remain + ETHER_ALIGN, M_NOWAIT, MT_DATA, + M_PKTHDR); if (mb == NULL) { sc->ifp->if_iqdrops++; rxdhead->status = 0; Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/kern/uipc_mbuf.c Tue Mar 12 13:42:47 2013 (r248207) @@ -88,7 +88,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defrag * m_get2() allocates minimum mbuf that would fit "size" argument. */ struct mbuf * -m_get2(int how, short type, int flags, int size) +m_get2(int size, int how, short type, int flags) { struct mb_args args; struct mbuf *m, *n; Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/net/bpf.c Tue Mar 12 13:42:47 2013 (r248207) @@ -525,7 +525,7 @@ bpf_movein(struct uio *uio, int linktype if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - m = m_get2(M_WAITOK, MT_DATA, M_PKTHDR, len); + m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); if (m == NULL) return (EIO); m->m_pkthdr.len = m->m_len = len; Modified: head/sys/netinet/libalias/alias.c ============================================================================== --- head/sys/netinet/libalias/alias.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/netinet/libalias/alias.c Tue Mar 12 13:42:47 2013 (r248207) @@ -1760,7 +1760,7 @@ m_megapullup(struct mbuf *m, int len) { if (m->m_next == NULL && M_WRITABLE(m) && M_TRAILINGSPACE(m) >= RESERVE) return (m); - mcl = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, len + RESERVE); + mcl = m_get2(len + RESERVE, M_NOWAIT, MT_DATA, M_PKTHDR); if (mcl == NULL) goto bad; Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/netpfil/pf/if_pfsync.c Tue Mar 12 13:42:47 2013 (r248207) @@ -1505,7 +1505,7 @@ pfsync_sendout(int schedswi) return; } - m = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, max_linkhdr + sc->sc_len); + m = m_get2(max_linkhdr + sc->sc_len, M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { sc->sc_ifp->if_oerrors++; V_pfsyncstats.pfsyncs_onomem++; Modified: head/sys/nfs/krpc_subr.c ============================================================================== --- head/sys/nfs/krpc_subr.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/nfs/krpc_subr.c Tue Mar 12 13:42:47 2013 (r248207) @@ -459,7 +459,7 @@ xdr_string_encode(char *str, int len) if (mlen > MCLBYTES) /* If too big, we just can't do it. */ return (NULL); - m = m_get2(M_WAITOK, MT_DATA, 0, mlen); + m = m_get2(mlen, M_WAITOK, MT_DATA, 0); xs = mtod(m, struct xdr_string *); m->m_len = mlen; xs->len = txdr_unsigned(len); Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/nfsclient/nfs_vfsops.c Tue Mar 12 13:42:47 2013 (r248207) @@ -298,7 +298,7 @@ nfs_statfs(struct mount *mp, struct stat } else mtx_unlock(&nmp->nm_mtx); nfsstats.rpccnt[NFSPROC_FSSTAT]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); + mreq = m_get2(NFSX_FH(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -356,7 +356,7 @@ nfs_fsinfo(struct nfsmount *nmp, struct u_int64_t maxfsize; nfsstats.rpccnt[NFSPROC_FSINFO]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(1)); + mreq = m_get2(NFSX_FH(1), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/nfsclient/nfs_vnops.c Tue Mar 12 13:42:47 2013 (r248207) @@ -294,7 +294,7 @@ nfs3_access_otw(struct vnode *vp, int wm struct nfsnode *np = VTONFS(vp); nfsstats.rpccnt[NFSPROC_ACCESS]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + NFSX_UNSIGNED); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED, M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -714,7 +714,7 @@ nfs_getattr(struct vop_getattr_args *ap) goto nfsmout; } nfsstats.rpccnt[NFSPROC_GETATTR]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); + mreq = m_get2(NFSX_FH(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -873,7 +873,7 @@ nfs_setattrrpc(struct vnode *vp, struct int v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_SETATTR]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + NFSX_SATTR(v3)); + mreq = m_get2(NFSX_FH(v3) + NFSX_SATTR(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1037,8 +1037,8 @@ nfs_lookup(struct vop_lookup_args *ap) nfsstats.lookupcache_misses++; nfsstats.rpccnt[NFSPROC_LOOKUP]++; len = cnp->cn_namelen; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len), M_WAITOK, + MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1251,7 +1251,7 @@ nfs_readlinkrpc(struct vnode *vp, struct int v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_READLINK]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3)); + mreq = m_get2(NFSX_FH(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1306,8 +1306,8 @@ nfs_readrpc(struct vnode *vp, struct uio while (tsiz > 0) { nfsstats.rpccnt[NFSPROC_READ]++; len = (tsiz > rsize) ? rsize : tsiz; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED * 3); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED * 3, M_WAITOK, + MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1379,8 +1379,8 @@ nfs_writerpc(struct vnode *vp, struct ui while (tsiz > 0) { nfsstats.rpccnt[NFSPROC_WRITE]++; len = (tsiz > wsize) ? wsize : tsiz; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + 5 * NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(NFSX_FH(v3) + 5 * NFSX_UNSIGNED + nfsm_rndup(len), + M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -1502,8 +1502,8 @@ nfs_mknodrpc(struct vnode *dvp, struct v if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) return (error); nfsstats.rpccnt[NFSPROC_MKNOD]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 4 * NFSX_UNSIGNED + - nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); + mreq = m_get2(NFSX_FH(v3) + 4 * NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1606,8 +1606,8 @@ nfs_create(struct vop_create_args *ap) fmode |= O_EXCL; again: nfsstats.rpccnt[NFSPROC_CREATE]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 2 * NFSX_UNSIGNED + - nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3)); + mreq = m_get2(NFSX_FH(v3) + 2 * NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen) + NFSX_SATTR(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1788,8 +1788,8 @@ nfs_removerpc(struct vnode *dvp, const c int v3 = NFS_ISV3(dvp); nfsstats.rpccnt[NFSPROC_REMOVE]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(namelen)); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(namelen), + M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -1924,8 +1924,8 @@ nfs_renamerpc(struct vnode *fdvp, const int v3 = NFS_ISV3(fdvp); nfsstats.rpccnt[NFSPROC_RENAME]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, (NFSX_FH(v3) + NFSX_UNSIGNED)*2 + - nfsm_rndup(fnamelen) + nfsm_rndup(tnamelen)); + mreq = m_get2((NFSX_FH(v3) + NFSX_UNSIGNED)*2 + nfsm_rndup(fnamelen) + + nfsm_rndup(tnamelen), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(fdvp, v3); @@ -1983,8 +1983,8 @@ nfs_link(struct vop_link_args *ap) v3 = NFS_ISV3(vp); nfsstats.rpccnt[NFSPROC_LINK]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3)*2 + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); + mreq = m_get2(NFSX_FH(v3)*2 + NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -2029,8 +2029,9 @@ nfs_symlink(struct vop_symlink_args *ap) nfsstats.rpccnt[NFSPROC_SYMLINK]++; slen = strlen(ap->a_target); - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(v3) + 2*NFSX_UNSIGNED + - nfsm_rndup(cnp->cn_namelen) + nfsm_rndup(slen) + NFSX_SATTR(v3)); + mreq = m_get2(NFSX_FH(v3) + 2*NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen) + nfsm_rndup(slen) + NFSX_SATTR(v3), + M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2123,8 +2124,8 @@ nfs_mkdir(struct vop_mkdir_args *ap) return (error); len = cnp->cn_namelen; nfsstats.rpccnt[NFSPROC_MKDIR]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len) + NFSX_SATTR(v3)); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len) + + NFSX_SATTR(v3), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2188,8 +2189,8 @@ nfs_rmdir(struct vop_rmdir_args *ap) if (dvp == vp) return (EINVAL); nfsstats.rpccnt[NFSPROC_RMDIR]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen)); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED + + nfsm_rndup(cnp->cn_namelen), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2307,8 +2308,8 @@ nfs_readdirrpc(struct vnode *vp, struct */ while (more_dirs && bigenough) { nfsstats.rpccnt[NFSPROC_READDIR]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_READDIR(v3)); + mreq = m_get2(NFSX_FH(v3) + NFSX_READDIR(v3), M_WAITOK, + MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); @@ -2513,8 +2514,8 @@ nfs_readdirplusrpc(struct vnode *vp, str */ while (more_dirs && bigenough) { nfsstats.rpccnt[NFSPROC_READDIRPLUS]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(1) + 6 * NFSX_UNSIGNED); + mreq = m_get2(NFSX_FH(1) + 6 * NFSX_UNSIGNED, M_WAITOK, + MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); @@ -2818,8 +2819,8 @@ nfs_lookitup(struct vnode *dvp, const ch int v3 = NFS_ISV3(dvp); nfsstats.rpccnt[NFSPROC_LOOKUP]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, - NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len)); + mreq = m_get2(NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len), + M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(dvp, v3); @@ -2897,7 +2898,7 @@ nfs_commit(struct vnode *vp, u_quad_t of } mtx_unlock(&nmp->nm_mtx); nfsstats.rpccnt[NFSPROC_COMMIT]++; - mreq = m_get2(M_WAITOK, MT_DATA, 0, NFSX_FH(1)); + mreq = m_get2(NFSX_FH(1), M_WAITOK, MT_DATA, 0); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, 1); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Mar 12 13:29:24 2013 (r248206) +++ head/sys/sys/mbuf.h Tue Mar 12 13:42:47 2013 (r248207) @@ -801,7 +801,7 @@ int m_dup_pkthdr(struct mbuf *, struct u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); -struct mbuf *m_get2(int, short, int, int); +struct mbuf *m_get2(int, int, short, int); struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); struct mbuf *m_getptr(struct mbuf *, int, int *); From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 14:21:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 220CAF07; Tue, 12 Mar 2013 14:21:53 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1502CCB1; Tue, 12 Mar 2013 14:21:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CELqEK008669; Tue, 12 Mar 2013 14:21:52 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CELqQQ008668; Tue, 12 Mar 2013 14:21:52 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201303121421.r2CELqQQ008668@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 12 Mar 2013 14:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248209 - head/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.14 Precedence: list List-Id: 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, 12 Mar 2013 14:21:53 -0000 Author: bryanv Date: Tue Mar 12 14:21:52 2013 New Revision: 248209 URL: http://svnweb.freebsd.org/changeset/base/248209 Log: Remove netncp cscope entry missed in r248097 Reviewed by: attilio Modified: head/sys/Makefile Modified: head/sys/Makefile ============================================================================== --- head/sys/Makefile Tue Mar 12 13:46:30 2013 (r248208) +++ head/sys/Makefile Tue Mar 12 14:21:52 2013 (r248209) @@ -10,7 +10,7 @@ SUBDIR= boot # Directories to include in cscope name file and TAGS. CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 netatalk \ - netgraph netinet netinet6 netipsec netipx netnatm netncp \ + netgraph netinet netinet6 netipsec netipx netnatm \ netsmb nfs nfsclient nfsserver nlm ofed opencrypto \ pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR} .if !defined(CSCOPE_ARCHDIR) From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 14:23:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DB6DA11F for ; Tue, 12 Mar 2013 14:23:26 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8DCCC7 for ; Tue, 12 Mar 2013 14:23:25 +0000 (UTC) Received: (qmail 10735 invoked from network); 12 Mar 2013 15:35:52 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 12 Mar 2013 15:35:52 -0000 Message-ID: <513F3A54.3090702@freebsd.org> Date: Tue, 12 Mar 2013 15:23:16 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> In-Reply-To: <201303121219.r2CCJN5Z069789@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 12 Mar 2013 14:23:26 -0000 On 12.03.2013 13:19, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Mar 12 12:19:23 2013 > New Revision: 248196 > URL: http://svnweb.freebsd.org/changeset/base/248196 > > Log: > Use m_get2() to get mbuf of appropriate size. The problem with m_get2() is that it will attempt to use jumbo mbufs larger than PAGE_SIZE if the request size is sufficiently large. In light of the recent issues with jumbo > PAGE_SIZE allocations on loaded systems I don't think it is appropriate to extend this practice further. Anything that needs more than PAGE_SIZE (where PAGE_SIZE == 4K) mbuf space should allocate an mbuf chain with m_getm2(). That is what we have mbuf chains for. Sufficient availability of mbufs > PAGE_SIZE cannot be guaranteed after some uptime and/or a loaded system due to memory fragmentation. Allocation can fail non-deterministically for mbufs > PAGE_SIZE long before smaller mbufs become unavailable due to overall (kernel) memory exhaustion. Mbufs > PAGE_SIZE are not only contiguous in kernel address space but also in real memory address space. They are intended jumbo frames on poor NIC's without scatter-capable DMA engines. When you put the m_get2() function proposal for review and comments I already highlighted these issues and put forward serious concerns about this. Please change m_get2() to limit itself to mbuf allocations <= PAGE_SIZE. -- Andre Please note that I applaud your general clean up of mbuf related allocation functions and users thereof. :-) From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 14:30:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D31B730B; Tue, 12 Mar 2013 14:30:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C4D81D14; Tue, 12 Mar 2013 14:30:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CEUaiQ011472; Tue, 12 Mar 2013 14:30:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CEUa71011471; Tue, 12 Mar 2013 14:30:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201303121430.r2CEUa71011471@svn.freebsd.org> From: Attilio Rao Date: Tue, 12 Mar 2013 14:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248210 - head/sys/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.14 Precedence: list List-Id: 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, 12 Mar 2013 14:30:36 -0000 Author: attilio Date: Tue Mar 12 14:30:36 2013 New Revision: 248210 URL: http://svnweb.freebsd.org/changeset/base/248210 Log: Bump __FreeBSD_version after r248084, breaking VM KPI to introduce read/write lockers. Sponsored by: EMC / Isilon storage division Requested by: flo Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Mar 12 14:21:52 2013 (r248209) +++ head/sys/sys/param.h Tue Mar 12 14:30:36 2013 (r248210) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000029 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000030 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 15:01: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]) by hub.freebsd.org (Postfix) with ESMTP id 8AD178F7; Tue, 12 Mar 2013 15:01:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 09BD1E53; Tue, 12 Mar 2013 15:01:01 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2CF0rZv096936; Tue, 12 Mar 2013 19:00:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2CF0rm7096935; Tue, 12 Mar 2013 19:00:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 12 Mar 2013 19:00:53 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Message-ID: <20130312150053.GI48089@FreeBSD.org> References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vkEkAx9hr54EJ73W" Content-Disposition: inline In-Reply-To: <513F3A54.3090702@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 12 Mar 2013 15:01:02 -0000 --vkEkAx9hr54EJ73W Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Andre, On Tue, Mar 12, 2013 at 03:23:16PM +0100, Andre Oppermann wrote: A> On 12.03.2013 13:19, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Tue Mar 12 12:19:23 2013 A> > New Revision: 248196 A> > URL: http://svnweb.freebsd.org/changeset/base/248196 A> > A> > Log: A> > Use m_get2() to get mbuf of appropriate size. A> A> The problem with m_get2() is that it will attempt to use jumbo mbufs A> larger than PAGE_SIZE if the request size is sufficiently large. A> A> In light of the recent issues with jumbo > PAGE_SIZE allocations on A> loaded systems I don't think it is appropriate to extend this practice A> further. A> A> Anything that needs more than PAGE_SIZE (where PAGE_SIZE == 4K) mbuf A> space should allocate an mbuf chain with m_getm2(). That is what we A> have mbuf chains for. A> A> Sufficient availability of mbufs > PAGE_SIZE cannot be guaranteed after A> some uptime and/or a loaded system due to memory fragmentation. Allocation A> can fail non-deterministically for mbufs > PAGE_SIZE long before smaller A> mbufs become unavailable due to overall (kernel) memory exhaustion. A> A> Mbufs > PAGE_SIZE are not only contiguous in kernel address space but A> also in real memory address space. They are intended jumbo frames on A> poor NIC's without scatter-capable DMA engines. A> A> When you put the m_get2() function proposal for review and comments I A> already highlighted these issues and put forward serious concerns about A> this. A> A> Please change m_get2() to limit itself to mbuf allocations <= PAGE_SIZE. I already got similar patch in my queue. We have a lot of code that could benefit from using both m_get2() and m_getm2() that are limited to not use jumbos at all. If you are concerned about using jumbos that are > PAGE_SIZE, then I can extend API in my patch. ... done. Patch attached. The NFS code itself guarantees that it won't request > than MCLBYTES, so using bare m_get2() here is safe. I can add flag there later for clarity. -- Totus tuus, Glebius. --vkEkAx9hr54EJ73W Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="m_get2,m_getm2.diff" Index: kern/uipc_mbuf.c =================================================================== --- kern/uipc_mbuf.c (revision 248207) +++ kern/uipc_mbuf.c (working copy) @@ -93,15 +93,20 @@ m_get2(int size, int how, short type, int flags) struct mb_args args; struct mbuf *m, *n; uma_zone_t zone; + int nojumbos, pgjumbos; - args.flags = flags; + nojumbos = (flags & M_NOJUMBO) ? 1 : 0; + pgjumbos = (flags & M_PGJUMBONLY) ? 1 : 0; + + args.flags = flags & (M_PKTHDR | M_EOR); args.type = type; if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) return (uma_zalloc_arg(zone_mbuf, &args, how)); if (size <= MCLBYTES) return (uma_zalloc_arg(zone_pack, &args, how)); - if (size > MJUM16BYTES) + + if (nojumbos || (pgjumbos && size > MJUMPAGESIZE) || size > MJUM16BYTES) return (NULL); m = uma_zalloc_arg(zone_mbuf, &args, how); @@ -168,9 +173,12 @@ struct mbuf * m_getm2(struct mbuf *m, int len, int how, short type, int flags) { struct mbuf *mb, *nm = NULL, *mtail = NULL; + int usejumbos; KASSERT(len >= 0, ("%s: len is < 0", __func__)); + usejumbos = (flags & M_NOJUMBO) ? 0 : 1; + /* Validate flags. */ flags &= (M_PKTHDR | M_EOR); @@ -180,7 +188,7 @@ m_getm2(struct mbuf *m, int len, int how, short ty /* Loop and append maximum sized mbufs to the chain tail. */ while (len > 0) { - if (len > MCLBYTES) + if (usejumbos && len > MCLBYTES) mb = m_getjcl(how, type, (flags & M_PKTHDR), MJUMPAGESIZE); else if (len >= MINCLSIZE) Index: sys/mbuf.h =================================================================== --- sys/mbuf.h (revision 248207) +++ sys/mbuf.h (working copy) @@ -206,6 +206,13 @@ struct mbuf { #define M_HASHTYPEBITS 0x0F000000 /* mask of bits holding flowid hash type */ /* + * Flags to pass with mbuf flags to some functions, not written in + * an mbuf itself. + */ +#define M_NOJUMBO M_PROTO1 +#define M_PGJUMBONLY M_PROTO2 + +/* * For RELENG_{6,7} steal these flags for limited multiple routing table * support. In RELENG_8 and beyond, use just one flag and a tag. */ --vkEkAx9hr54EJ73W-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 15:31: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]) by hub.freebsd.org (Postfix) with ESMTP id 99C855BA for ; Tue, 12 Mar 2013 15:31:09 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id E21A731A for ; Tue, 12 Mar 2013 15:31:08 +0000 (UTC) Received: (qmail 10962 invoked from network); 12 Mar 2013 16:43:41 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 12 Mar 2013 16:43:41 -0000 Message-ID: <513F4A39.8040107@freebsd.org> Date: Tue, 12 Mar 2013 16:31:05 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> In-Reply-To: <20130312150053.GI48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed 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.14 Precedence: list List-Id: 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, 12 Mar 2013 15:31:09 -0000 On 12.03.2013 16:00, Gleb Smirnoff wrote: > Andre, > > On Tue, Mar 12, 2013 at 03:23:16PM +0100, Andre Oppermann wrote: > A> On 12.03.2013 13:19, Gleb Smirnoff wrote: > A> > Author: glebius > A> > Date: Tue Mar 12 12:19:23 2013 > A> > New Revision: 248196 > A> > URL: http://svnweb.freebsd.org/changeset/base/248196 > A> > > A> > Log: > A> > Use m_get2() to get mbuf of appropriate size. > A> > A> The problem with m_get2() is that it will attempt to use jumbo mbufs > A> larger than PAGE_SIZE if the request size is sufficiently large. > A> > A> In light of the recent issues with jumbo > PAGE_SIZE allocations on > A> loaded systems I don't think it is appropriate to extend this practice > A> further. > A> > A> Anything that needs more than PAGE_SIZE (where PAGE_SIZE == 4K) mbuf > A> space should allocate an mbuf chain with m_getm2(). That is what we > A> have mbuf chains for. > A> > A> Sufficient availability of mbufs > PAGE_SIZE cannot be guaranteed after > A> some uptime and/or a loaded system due to memory fragmentation. Allocation > A> can fail non-deterministically for mbufs > PAGE_SIZE long before smaller > A> mbufs become unavailable due to overall (kernel) memory exhaustion. > A> > A> Mbufs > PAGE_SIZE are not only contiguous in kernel address space but > A> also in real memory address space. They are intended jumbo frames on > A> poor NIC's without scatter-capable DMA engines. > A> > A> When you put the m_get2() function proposal for review and comments I > A> already highlighted these issues and put forward serious concerns about > A> this. > A> > A> Please change m_get2() to limit itself to mbuf allocations <= PAGE_SIZE. > > I already got similar patch in my queue. We have a lot of code that could > benefit from using both m_get2() and m_getm2() that are limited to not > use jumbos at all. Indeed. That's why I applaud your work in converting them. > If you are concerned about using jumbos that are > PAGE_SIZE, then I can > extend API in my patch. ... done. > > Patch attached. > > The NFS code itself guarantees that it won't request > than MCLBYTES, > so using bare m_get2() here is safe. I can add flag there later for > clarity. Using PAGE_SIZE clusters is perfectly fine and no flag to prevent that is necessary. In fact we're doing it for years on socket writes without complaints (through m_getm2()). However I think that m_get2() should never ever even try to attempt to allocate mbuf clusters larger than PAGE_SIZE. Not even with flags. All mbufs > PAGE_SIZE should be exclusively and only ever be used by drivers for NIC's with "challenged" DMA engines. Possibly only available through a dedicated API to prevent all other uses of it. -- Andre From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 15:50:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 164D1D11; Tue, 12 Mar 2013 15:50:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 7F24D739; Tue, 12 Mar 2013 15:50:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2CFo53C097176; Tue, 12 Mar 2013 19:50:05 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2CFo5ix097175; Tue, 12 Mar 2013 19:50:05 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 12 Mar 2013 19:50:05 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Message-ID: <20130312155005.GJ48089@FreeBSD.org> References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <513F4A39.8040107@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 12 Mar 2013 15:50:07 -0000 On Tue, Mar 12, 2013 at 04:31:05PM +0100, Andre Oppermann wrote: A> > If you are concerned about using jumbos that are > PAGE_SIZE, then I can A> > extend API in my patch. ... done. A> > A> > Patch attached. A> > A> > The NFS code itself guarantees that it won't request > than MCLBYTES, A> > so using bare m_get2() here is safe. I can add flag there later for A> > clarity. A> A> Using PAGE_SIZE clusters is perfectly fine and no flag to prevent that A> is necessary. In fact we're doing it for years on socket writes without A> complaints (through m_getm2()). mbuf usage isn't limited to sockets. There is some code that right now utilizes only mbufs and standard clusters, netipsec for example. I'd like to remove a lot of handmade mbuf allocating, in different places in kernel and this can be done with M_NOJUMBO flag. I don't have time to dig more deep into large chunks of code trying to understand whether it is possible to convert them into using PAGE_SIZE clusters or not, I just want to reduce amount of pasted hand allocating. We have very common case when we allocate either mbuf or mbuf + cluster, depending on size. Everywhere this is made by hand, but can be substituted with m_get2(len, ..., M_NOJUMBO); A> However I think that m_get2() should never ever even try to attempt to A> allocate mbuf clusters larger than PAGE_SIZE. Not even with flags. A> A> All mbufs > PAGE_SIZE should be exclusively and only ever be used by drivers A> for NIC's with "challenged" DMA engines. Possibly only available through a A> dedicated API to prevent all other uses of it. Have you done any benchmarking that proves that scatter-gather on the level of busdma is any worse than chaining on mbuf level? Dealing with contiguous in virtual memory mbuf is handy, for protocols that look through entire payload, for example pfsync. I guess NFS may also benefit from that. P.S. Ok about the patch? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 16:33:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BC388BF9 for ; Tue, 12 Mar 2013 16:33:07 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF77B2F for ; Tue, 12 Mar 2013 16:33:07 +0000 (UTC) Received: (qmail 11216 invoked from network); 12 Mar 2013 17:45:38 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 12 Mar 2013 17:45:38 -0000 Message-ID: <513F58C0.4050302@freebsd.org> Date: Tue, 12 Mar 2013 17:33:04 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> In-Reply-To: <20130312155005.GJ48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed 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.14 Precedence: list List-Id: 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, 12 Mar 2013 16:33:07 -0000 On 12.03.2013 16:50, Gleb Smirnoff wrote: > On Tue, Mar 12, 2013 at 04:31:05PM +0100, Andre Oppermann wrote: > A> > If you are concerned about using jumbos that are > PAGE_SIZE, then I can > A> > extend API in my patch. ... done. > A> > > A> > Patch attached. > A> > > A> > The NFS code itself guarantees that it won't request > than MCLBYTES, > A> > so using bare m_get2() here is safe. I can add flag there later for > A> > clarity. > A> > A> Using PAGE_SIZE clusters is perfectly fine and no flag to prevent that > A> is necessary. In fact we're doing it for years on socket writes without > A> complaints (through m_getm2()). > > mbuf usage isn't limited to sockets. There is some code that right now utilizes > only mbufs and standard clusters, netipsec for example. Yes, I understand that. > I'd like to remove a lot of handmade mbuf allocating, in different places in > kernel and this can be done with M_NOJUMBO flag. I don't have time to dig more > deep into large chunks of code trying to understand whether it is possible to > convert them into using PAGE_SIZE clusters or not, I just want to reduce > amount of pasted hand allocating. Reducing the amount of hand allocation is very good. > We have very common case when we allocate either mbuf or mbuf + cluster, > depending on size. Everywhere this is made by hand, but can be substituted > with m_get2(len, ..., M_NOJUMBO); I guess what I'm trying to say is that not wanting jumbo > PAGE_SIZE is normal and shouldn't be specified all the time. This makes the API look like this: m_get2(len, ..., 0); /* w/o flags I get at most MJUMPAGESIZE */ If someone really, really, really knows what he is doing he can say he wants jumbo > PAGE_SIZE returned with M_JUMBOOK or such. However IMHO even that shouldn't be offered and m_getm2() should be used for a chain. > A> However I think that m_get2() should never ever even try to attempt to > A> allocate mbuf clusters larger than PAGE_SIZE. Not even with flags. > A> > A> All mbufs > PAGE_SIZE should be exclusively and only ever be used by drivers > A> for NIC's with "challenged" DMA engines. Possibly only available through a > A> dedicated API to prevent all other uses of it. > > Have you done any benchmarking that proves that scatter-gather on the level of > busdma is any worse than chaining on mbuf level? The problem is different. With our current jumbo mbufs > PAGE_SIZE there isn't any scatter-gather at busdma level because they are contiguous at physical *and* KVA level. Allocating such jumbo mbufs shifts the burden of mbuf chains to the VM and pmap layer in trying to come up with such contiguous patches of physical memory. This fails quickly after some activity and memory fragmentation on the machine as we've seen in recent days even with 96GB of RAM available. It gets worse the more load the machine has. Which is exactly what we *don't* want. > Dealing with contiguous in virtual memory mbuf is handy, for protocols that > look through entire payload, for example pfsync. I guess NFS may also benefit > from that. Of course it is handy. However that carries other tradeoffs, some significant, in other parts of the system. And then for incoming packets it depends on the MTU size. For NFS, as far as I've read through the code today, the control messages tend to be rather small. The vast bulk of the data is transported between mbuf and VFS/filesystem. > P.S. Ok about the patch? No. m_getm2() doesn't need the flag at all. PAGE_SIZE mbufs are always good. Calling m_get2() without flag should return at most a PAGE_SIZE mbuf. The (ab)use of M_PROTO1|2 flags is icky and may conflict with protocol specific uses. -- Andre From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 19:18:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D738CE20; Tue, 12 Mar 2013 19:18:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C9ABA85C; Tue, 12 Mar 2013 19:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CJIABL098660; Tue, 12 Mar 2013 19:18:10 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CJIAHK098658; Tue, 12 Mar 2013 19:18:10 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201303121918.r2CJIAHK098658@svn.freebsd.org> From: Mark Johnston Date: Tue, 12 Mar 2013 19:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248214 - head/usr.bin/grep/regex 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.14 Precedence: list List-Id: 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, 12 Mar 2013 19:18:10 -0000 Author: markj Date: Tue Mar 12 19:18:10 2013 New Revision: 248214 URL: http://svnweb.freebsd.org/changeset/base/248214 Log: Revert r246917, as it is causing incorrect behaviour as reported on freebsd-current. PR: bin/175213 Approved by: emaste (co-mentor) Modified: head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Tue Mar 12 18:57:12 2013 (r248213) +++ head/usr.bin/grep/regex/tre-fastmatch.c Tue Mar 12 19:18:10 2013 (r248214) @@ -103,7 +103,7 @@ static int fastcmp(const fastmatch_t *fg ((!fg->reversed \ ? ((type == STR_WIDE) ? ((j + fg->wlen) > len) \ : ((j + fg->len) > len)) \ - : (j <= 0))) + : (j < 0))) /* * Checks whether the new position after shifting in the input string From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 19:49: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]) by hub.freebsd.org (Postfix) with ESMTP id 2E17B55A; Tue, 12 Mar 2013 19:49:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8CD1E6; Tue, 12 Mar 2013 19:49:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2CJnaN9097986; Tue, 12 Mar 2013 23:49:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2CJna8X097985; Tue, 12 Mar 2013 23:49:36 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 12 Mar 2013 23:49:36 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Message-ID: <20130312194936.GL48089@FreeBSD.org> References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <513F58C0.4050302@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 12 Mar 2013 19:49:47 -0000 Andre, On Tue, Mar 12, 2013 at 05:33:04PM +0100, Andre Oppermann wrote: A> > We have very common case when we allocate either mbuf or mbuf + cluster, A> > depending on size. Everywhere this is made by hand, but can be substituted A> > with m_get2(len, ..., M_NOJUMBO); A> A> I guess what I'm trying to say is that not wanting jumbo > PAGE_SIZE is A> normal and shouldn't be specified all the time. A> A> This makes the API look like this: A> A> m_get2(len, ..., 0); /* w/o flags I get at most MJUMPAGESIZE */ A> A> If someone really, really, really knows what he is doing he can say A> he wants jumbo > PAGE_SIZE returned with M_JUMBOOK or such. However A> IMHO even that shouldn't be offered and m_getm2() should be used for A> a chain. Once again: there are cases when chain is not anticipated, a single contigous mbuf is. A> > A> However I think that m_get2() should never ever even try to attempt to A> > A> allocate mbuf clusters larger than PAGE_SIZE. Not even with flags. A> > A> A> > A> All mbufs > PAGE_SIZE should be exclusively and only ever be used by drivers A> > A> for NIC's with "challenged" DMA engines. Possibly only available through a A> > A> dedicated API to prevent all other uses of it. A> > A> > Have you done any benchmarking that proves that scatter-gather on the level of A> > busdma is any worse than chaining on mbuf level? A> A> The problem is different. With our current jumbo mbufs > PAGE_SIZE there A> isn't any scatter-gather at busdma level because they are contiguous at A> physical *and* KVA level. Allocating such jumbo mbufs shifts the burden A> of mbuf chains to the VM and pmap layer in trying to come up with such A> contiguous patches of physical memory. This fails quickly after some A> activity and memory fragmentation on the machine as we've seen in recent A> days even with 96GB of RAM available. It gets worse the more load the A> machine has. Which is exactly what we *don't* want. I somehow missed the r174247. How did that work since jumbo clusters were introduced and up to r174247 (3 years)? AFAIK, it worked fine before jumbos were not physically contigous. Most modern NICs can use several descriptors per one packet, and that's what we do when using PAGE_SIZE clusters. But we arm it manually. With a virtually contigous single mbuf we can just do bus_dmamap_load_mbuf_sg() and do not care about physical continuity in the stack and upper part of a driver. I should probably consult gallatin@ and youngari@ on this. A> > Dealing with contiguous in virtual memory mbuf is handy, for protocols that A> > look through entire payload, for example pfsync. I guess NFS may also benefit A> > from that. A> A> Of course it is handy. However that carries other tradeoffs, some significant, A> in other parts of the system. And then for incoming packets it depends on the A> MTU size. For NFS, as far as I've read through the code today, the control A> messages tend to be rather small. The vast bulk of the data is transported A> between mbuf and VFS/filesystem. A> A> > P.S. Ok about the patch? A> A> No. m_getm2() doesn't need the flag at all. PAGE_SIZE mbufs are always A> good. Let me repeat: there is a lot of code, that does handmade allocation of an mbuf chain of an arbitrary length using mbufs and common clusters. This code can be cut and use m_getm2(), if we can restrict it to avoid page size clusters. I don't have time to dig deeper in the code and analyze and test whether it can support page sized clusters in chains. Example: netipsec/key.c:key_alloc_mbuf(). A> Calling m_get2() without flag should return at most a PAGE_SIZE A> mbuf. This is not logical. A default limit in the middle of possible values isn't logical. A> The (ab)use of M_PROTO1|2 flags is icky and may conflict with A> protocol specific uses. Please review the patch. The flag isn't stored anywhere, it is just extension of m_getm2() and m_get2() API. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 21:07:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DFF3470C; Tue, 12 Mar 2013 21:07:55 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 8AFE382B; Tue, 12 Mar 2013 21:07:55 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id D34A034D; Tue, 12 Mar 2013 22:04:36 +0100 (CET) Date: Tue, 12 Mar 2013 22:09:21 +0100 From: Pawel Jakub Dawidek To: "Kenneth D. Merry" Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf Message-ID: <20130312210921.GB1390@garage.freebsd.pl> References: <201303042118.r24LIj5e008913@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <201303042118.r24LIj5e008913@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) 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.14 Precedence: list List-Id: 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, 12 Mar 2013 21:07:56 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: > Author: ken > Date: Mon Mar 4 21:18:45 2013 > New Revision: 247814 > URL: http://svnweb.freebsd.org/changeset/base/247814 >=20 > Log: > Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL disable > tunable by default. > =20 > This will allow GENERIC configurations to boot on small memory boxes, b= ut > not require end users who want to use CTL to recompile their kernel. T= hey > can simply set kern.cam.ctl.disable=3D0 in loader.conf. Could you rename it to kern.cam.ctl.enable(d)? There was discussion at some point about sysctl/tunable names and the consensus was, AFAIR, to use positive(?) names as they are more obvious. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlE/mYEACgkQForvXbEpPzTPNQCbByKCcJAr3xt8N55TmyItV6u1 ZVkAoM5Mn08IMIKhJKYqYzm53T1TnO7S =SnX/ -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ-- From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 21:12: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]) by hub.freebsd.org (Postfix) with ESMTP id D9FF6A67; Tue, 12 Mar 2013 21:12:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DB69B853; Tue, 12 Mar 2013 21:12:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3713BB972; Tue, 12 Mar 2013 17:12:03 -0400 (EDT) From: John Baldwin To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Date: Tue, 12 Mar 2013 13:27:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> In-Reply-To: <513F58C0.4050302@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201303121327.58164.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 12 Mar 2013 17:12:03 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 12 Mar 2013 21:12:06 -0000 On Tuesday, March 12, 2013 12:33:04 pm Andre Oppermann wrote: > On 12.03.2013 16:50, Gleb Smirnoff wrote: > > On Tue, Mar 12, 2013 at 04:31:05PM +0100, Andre Oppermann wrote: > > A> > If you are concerned about using jumbos that are > PAGE_SIZE, then I can > > A> > extend API in my patch. ... done. > > A> > > > A> > Patch attached. > > A> > > > A> > The NFS code itself guarantees that it won't request > than MCLBYTES, > > A> > so using bare m_get2() here is safe. I can add flag there later for > > A> > clarity. > > A> > > A> Using PAGE_SIZE clusters is perfectly fine and no flag to prevent that > > A> is necessary. In fact we're doing it for years on socket writes without > > A> complaints (through m_getm2()). > > > > mbuf usage isn't limited to sockets. There is some code that right now utilizes > > only mbufs and standard clusters, netipsec for example. > > Yes, I understand that. > > > I'd like to remove a lot of handmade mbuf allocating, in different places in > > kernel and this can be done with M_NOJUMBO flag. I don't have time to dig more > > deep into large chunks of code trying to understand whether it is possible to > > convert them into using PAGE_SIZE clusters or not, I just want to reduce > > amount of pasted hand allocating. > > Reducing the amount of hand allocation is very good. > > > We have very common case when we allocate either mbuf or mbuf + cluster, > > depending on size. Everywhere this is made by hand, but can be substituted > > with m_get2(len, ..., M_NOJUMBO); > > I guess what I'm trying to say is that not wanting jumbo > PAGE_SIZE is > normal and shouldn't be specified all the time. > > This makes the API look like this: > > m_get2(len, ..., 0); /* w/o flags I get at most MJUMPAGESIZE */ > > If someone really, really, really knows what he is doing he can say > he wants jumbo > PAGE_SIZE returned with M_JUMBOOK or such. However > IMHO even that shouldn't be offered and m_getm2() should be used for > a chain. I agree, large clusters should require opting-in, they should not be provided by default (if at all as Andre suggests). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 21:19:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 36AC9EC5 for ; Tue, 12 Mar 2013 21:19:10 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 698EF8CB for ; Tue, 12 Mar 2013 21:19:09 +0000 (UTC) Received: (qmail 12203 invoked from network); 12 Mar 2013 22:31:38 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 12 Mar 2013 22:31:38 -0000 Message-ID: <513F9BC9.3060300@freebsd.org> Date: Tue, 12 Mar 2013 22:19:05 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> <20130312194936.GL48089@FreeBSD.org> In-Reply-To: <20130312194936.GL48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed 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.14 Precedence: list List-Id: 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, 12 Mar 2013 21:19:10 -0000 On 12.03.2013 20:49, Gleb Smirnoff wrote: > Andre, > > On Tue, Mar 12, 2013 at 05:33:04PM +0100, Andre Oppermann wrote: > A> > We have very common case when we allocate either mbuf or mbuf + cluster, > A> > depending on size. Everywhere this is made by hand, but can be substituted > A> > with m_get2(len, ..., M_NOJUMBO); > A> > A> I guess what I'm trying to say is that not wanting jumbo > PAGE_SIZE is > A> normal and shouldn't be specified all the time. > A> > A> This makes the API look like this: > A> > A> m_get2(len, ..., 0); /* w/o flags I get at most MJUMPAGESIZE */ > A> > A> If someone really, really, really knows what he is doing he can say > A> he wants jumbo > PAGE_SIZE returned with M_JUMBOOK or such. However > A> IMHO even that shouldn't be offered and m_getm2() should be used for > A> a chain. > > Once again: there are cases when chain is not anticipated, a single > contigous mbuf is. My statement was at a design level. So far only 2K sized contiguous mbufs (as in classic clusters) were available. This can be relaxed to 4K page sized mbuf clusters without any trouble. Not that we have any of those requiring more than 2K clusters today. What I'm saying is that everything that requires > 4K clusters is broken by design. It should be designed differently to use chains of mbufs not more than 4K each. There are architectures whose page size is larger than 4K. However the majority is at 4K. > A> > A> However I think that m_get2() should never ever even try to attempt to > A> > A> allocate mbuf clusters larger than PAGE_SIZE. Not even with flags. > A> > A> > A> > A> All mbufs > PAGE_SIZE should be exclusively and only ever be used by drivers > A> > A> for NIC's with "challenged" DMA engines. Possibly only available through a > A> > A> dedicated API to prevent all other uses of it. > A> > > A> > Have you done any benchmarking that proves that scatter-gather on the level of > A> > busdma is any worse than chaining on mbuf level? > A> > A> The problem is different. With our current jumbo mbufs > PAGE_SIZE there > A> isn't any scatter-gather at busdma level because they are contiguous at > A> physical *and* KVA level. Allocating such jumbo mbufs shifts the burden > A> of mbuf chains to the VM and pmap layer in trying to come up with such > A> contiguous patches of physical memory. This fails quickly after some > A> activity and memory fragmentation on the machine as we've seen in recent > A> days even with 96GB of RAM available. It gets worse the more load the > A> machine has. Which is exactly what we *don't* want. > > I somehow missed the r174247. How did that work since jumbo clusters were > introduced and up to r174247 (3 years)? jumbo != jumbo. They are simply called jumbo because they are larger than the traditional 2K cluster. The PAGE_SIZE jumbo is special in that it is the largest mbuf that doesn't require any special VM or physical trickery to be allocated. This it is available as long as you have a single free page in the system. A page can be divided into two classic 2K clusters. The only difference to a 4K PAGE_SIZE jumbo being that it requires two 256B mbuf for descriptors instead of one. > AFAIK, it worked fine before jumbos were not physically contigous. Most > modern NICs can use several descriptors per one packet, and that's what > we do when using PAGE_SIZE clusters. But we arm it manually. With a virtually > contigous single mbuf we can just do bus_dmamap_load_mbuf_sg() and do not > care about physical continuity in the stack and upper part of a driver. Jumbos always were physically contiguous. That was the very reason for their existence. They were invented to allow early NIC's with limited DMA capabilities to handle jumbo ethernet frames. Today they should only be used for DMA challenged NIC's and nothing else. For PAGE_SIZE jumbo's there is only one descriptor being used. A page is largest physical unit on the CPU architecture that always is contiguous. What you apparently want is a new type of jumbo mbuf that is only contiguous in virtual address space but not physically. In theory that could be done, but it's totally different from the current jumbo mbufs we already have. While you get rid of the severe physical memory fragmentation problem the KVA fragmentation problem remains lurking somewhere in the back. Actually you could probably even do arbitrarily sized KVM contiguous-only mbufs on demand. The overhead cost is then simply shifted to the VM from the mbuf user that had to work with mbuf chains. > I should probably consult gallatin@ and youngari@ on this. > > A> > Dealing with contiguous in virtual memory mbuf is handy, for protocols that > A> > look through entire payload, for example pfsync. I guess NFS may also benefit > A> > from that. > A> > A> Of course it is handy. However that carries other tradeoffs, some significant, > A> in other parts of the system. And then for incoming packets it depends on the > A> MTU size. For NFS, as far as I've read through the code today, the control > A> messages tend to be rather small. The vast bulk of the data is transported > A> between mbuf and VFS/filesystem. > A> > A> > P.S. Ok about the patch? > A> > A> No. m_getm2() doesn't need the flag at all. PAGE_SIZE mbufs are always > A> good. > > Let me repeat: there is a lot of code, that does handmade allocation of > an mbuf chain of an arbitrary length using mbufs and common clusters. This > code can be cut and use m_getm2(), if we can restrict it to avoid page size > clusters. I don't have time to dig deeper in the code and analyze and test > whether it can support page sized clusters in chains. m_getm2() can be used in any such case and doesn't have to avoid PAGE_SIZE clusters. PAGE_SIZE jumbo clusters are fine. Larger than PAGE_SIZE is not. When the code is able to work with mbuf chains the exact size of each cluster isn't important anymore. We can use the optimal size. > Example: netipsec/key.c:key_alloc_mbuf(). > > A> Calling m_get2() without flag should return at most a PAGE_SIZE > A> mbuf. > > This is not logical. A default limit in the middle of possible values > isn't logical. It is very logical based on the fact that a page sized cluster can always be allocated as long as there is an available free page in the system. This isn't true for jumbo clusters larger than page size due to the additional constrains. The largest "natural" size of an mbuf (jumbo) cluster is equal the page size, typically 4K. > A> The (ab)use of M_PROTO1|2 flags is icky and may conflict with > A> protocol specific uses. > > Please review the patch. The flag isn't stored anywhere, it is just > extension of m_getm2() and m_get2() API. OK. However it's the wrong way around. Not allocating > page size jumbos should be normal when no flags are set. -- Andre From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 23:07: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]) by hub.freebsd.org (Postfix) with ESMTP id 944ABAF0; Tue, 12 Mar 2013 23:07:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3D0F3E; Tue, 12 Mar 2013 23:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CN7ZpH068822; Tue, 12 Mar 2013 23:07:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CN7ZGW068821; Tue, 12 Mar 2013 23:07:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201303122307.r2CN7ZGW068821@svn.freebsd.org> From: Eitan Adler Date: Tue, 12 Mar 2013 23:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248219 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 23:07:35 -0000 Author: eadler Date: Tue Mar 12 23:07:34 2013 New Revision: 248219 URL: http://svnweb.freebsd.org/changeset/base/248219 Log: Welcome Bryan to the team. Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Tue Mar 12 22:18:31 2013 (r248218) +++ head/share/misc/organization.dot Tue Mar 12 23:07:34 2013 (r248219) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, \nerwin, pav,\nitetcu, miwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt,\nerwin, pav, bdrewery,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] From owner-svn-src-head@FreeBSD.ORG Tue Mar 12 23: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]) by hub.freebsd.org (Postfix) with ESMTP id 6AA90DA3; Tue, 12 Mar 2013 23:14:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C432FA2; Tue, 12 Mar 2013 23:14:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CNEJVO071601; Tue, 12 Mar 2013 23:14:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2CNEJdF071599; Tue, 12 Mar 2013 23:14:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201303122314.r2CNEJdF071599@svn.freebsd.org> From: Eitan Adler Date: Tue, 12 Mar 2013 23:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248220 - 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.14 Precedence: list List-Id: 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, 12 Mar 2013 23:14:19 -0000 Author: eadler Date: Tue Mar 12 23:14:18 2013 New Revision: 248220 URL: http://svnweb.freebsd.org/changeset/base/248220 Log: Remove pav from portmgr whom had also stepped down a few months ago. Thank you for your years of service. Reported by: rene Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Tue Mar 12 23:07:34 2013 (r248219) +++ head/share/misc/organization.dot Tue Mar 12 23:14:18 2013 (r248220) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt,\nerwin, pav, bdrewery,\nitetcu, miwi"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt,\nerwin, bdrewery,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 01:40: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]) by hub.freebsd.org (Postfix) with ESMTP id 285F837E; Wed, 13 Mar 2013 01:40:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E01007F5; Wed, 13 Mar 2013 01:40:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2D1e1QC014816; Wed, 13 Mar 2013 01:40:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2D1e15p014815; Wed, 13 Mar 2013 01:40:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201303130140.r2D1e15p014815@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 13 Mar 2013 01:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248226 - head/sys/dev/bge 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.14 Precedence: list List-Id: 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, 13 Mar 2013 01:40:02 -0000 Author: yongari Date: Wed Mar 13 01:40:01 2013 New Revision: 248226 URL: http://svnweb.freebsd.org/changeset/base/248226 Log: r241438 broke IPMI access on Sun Fire X2200 M2(BCM5715). Fix the IPMI regression by sending BGE_FW_DRV_STATE_UNLOAD to ASF/IPMI firmware in driver attach phase. Sending heartheat to ASF/IPMI is enabled only after upping interface so setting driver state to BGE_FW_DRV_STATE_START in attach phase broke IPMI access. While I'm here, add NVRAM arbitration lock before performing controller reset. ASF/IPMI firmware may be able to access the NVRAM while controller reset is in progress. Without the arbitration lock before resetting the controller, ASF/IPMI may not initialize properly. Special thanks to Miroslav Lachman who provided full remote debugging environments. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Mar 13 01:38:32 2013 (r248225) +++ head/sys/dev/bge/if_bge.c Wed Mar 13 01:40:01 2013 (r248226) @@ -3594,15 +3594,15 @@ bge_attach(device_t dev) } bge_stop_fw(sc); - bge_sig_pre_reset(sc, BGE_RESET_START); + bge_sig_pre_reset(sc, BGE_RESET_SHUTDOWN); if (bge_reset(sc)) { device_printf(sc->bge_dev, "chip reset failed\n"); error = ENXIO; goto fail; } - bge_sig_legacy(sc, BGE_RESET_START); - bge_sig_post_reset(sc, BGE_RESET_START); + bge_sig_legacy(sc, BGE_RESET_SHUTDOWN); + bge_sig_post_reset(sc, BGE_RESET_SHUTDOWN); if (bge_chipinit(sc)) { device_printf(sc->bge_dev, "chip initialization failed\n"); @@ -3960,6 +3960,20 @@ bge_reset(struct bge_softc *sc) } else write_op = bge_writereg_ind; + if (sc->bge_asicrev != BGE_ASICREV_BCM5700 && + sc->bge_asicrev != BGE_ASICREV_BCM5701) { + CSR_WRITE_4(sc, BGE_NVRAM_SWARB, BGE_NVRAMSWARB_SET1); + for (i = 0; i < 8000; i++) { + if (CSR_READ_4(sc, BGE_NVRAM_SWARB) & + BGE_NVRAMSWARB_GNT1) + break; + DELAY(20); + } + if (i == 8000) { + if (bootverbose) + device_printf(dev, "NVRAM lock timedout!\n"); + } + } /* Take APE lock when performing reset. */ bge_ape_lock(sc, BGE_APE_LOCK_GRC); From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 02:11:46 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]) by hub.freebsd.org (Postfix) with ESMTP id B5DDFD97; Wed, 13 Mar 2013 02:11:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7A5917; Wed, 13 Mar 2013 02:11:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2D2Bk4B026116; Wed, 13 Mar 2013 02:11:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2D2Bk0O026115; Wed, 13 Mar 2013 02:11:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201303130211.r2D2Bk0O026115@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 13 Mar 2013 02:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248227 - head/sys/dev/re 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.14 Precedence: list List-Id: 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, 13 Mar 2013 02:11:46 -0000 Author: yongari Date: Wed Mar 13 02:11:45 2013 New Revision: 248227 URL: http://svnweb.freebsd.org/changeset/base/248227 Log: Disable TX IP header checksum offloading on RL_HWREV_8168CP. The controller generates wrong checksummed frame if the IP packet has IP options. Submitted by: Alexander Bluhm via brad@openbsd Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Mar 13 01:40:01 2013 (r248226) +++ head/sys/dev/re/if_re.c Wed Mar 13 02:11:45 2013 (r248227) @@ -1587,7 +1587,8 @@ re_attach(device_t dev) * packet has IP options so disable TX IP checksum offloading. */ if (sc->rl_hwrev->rl_rev == RL_HWREV_8168C || - sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2) + sc->rl_hwrev->rl_rev == RL_HWREV_8168C_SPIN2 || + sc->rl_hwrev->rl_rev == RL_HWREV_8168CP) ifp->if_hwassist = CSUM_TCP | CSUM_UDP; else ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; @@ -3419,7 +3420,8 @@ re_ioctl(struct ifnet *ifp, u_long comma if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) { rev = sc->rl_hwrev->rl_rev; if (rev == RL_HWREV_8168C || - rev == RL_HWREV_8168C_SPIN2) + rev == RL_HWREV_8168C_SPIN2 || + rev == RL_HWREV_8168CP) ifp->if_hwassist |= CSUM_TCP | CSUM_UDP; else ifp->if_hwassist |= RE_CSUM_FEATURES; From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 06:42:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 47B16F66; Wed, 13 Mar 2013 06:42:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 303C2689; Wed, 13 Mar 2013 06:42:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2D6g2eL009486; Wed, 13 Mar 2013 06:42:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2D6g2JL009485; Wed, 13 Mar 2013 06:42:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201303130642.r2D6g2JL009485@svn.freebsd.org> From: Alexander Motin Date: Wed, 13 Mar 2013 06:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248230 - 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.14 Precedence: list List-Id: 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, 13 Mar 2013 06:42:02 -0000 Author: mav Date: Wed Mar 13 06:42:01 2013 New Revision: 248230 URL: http://svnweb.freebsd.org/changeset/base/248230 Log: Fix incorrect assertion that caused panic when periodic-only timers used. Modified: head/sys/kern/kern_et.c Modified: head/sys/kern/kern_et.c ============================================================================== --- head/sys/kern/kern_et.c Wed Mar 13 03:27:32 2013 (r248229) +++ head/sys/kern/kern_et.c Wed Mar 13 06:42:01 2013 (r248230) @@ -168,7 +168,7 @@ et_start(struct eventtimer *et, sbintime KASSERT(period >= 0, ("et_start: negative period")); KASSERT((et->et_flags & ET_FLAGS_PERIODIC) || period == 0, ("et_start: period specified for oneshot-only timer")); - KASSERT((et->et_flags & ET_FLAGS_ONESHOT) && period == 0, + KASSERT((et->et_flags & ET_FLAGS_ONESHOT) || period != 0, ("et_start: period not specified for periodic-only timer")); if (period != 0) { if (period < et->et_min_period) From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 09:41: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]) by hub.freebsd.org (Postfix) with ESMTP id AC4132F4; Wed, 13 Mar 2013 09:41:55 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F40AFC; Wed, 13 Mar 2013 09:41:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2D9ftY7065314; Wed, 13 Mar 2013 09:41:55 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2D9ftfp065313; Wed, 13 Mar 2013 09:41:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201303130941.r2D9ftfp065313@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 13 Mar 2013 09:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248231 - head/crypto/openssh 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.14 Precedence: list List-Id: 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, 13 Mar 2013 09:41:55 -0000 Author: des Date: Wed Mar 13 09:41:55 2013 New Revision: 248231 URL: http://svnweb.freebsd.org/changeset/base/248231 Log: Unlike OpenBSD's, our setusercontext() will intentionally ignore the user's own umask setting (from ~/.login.conf) unless running with the user's UID. Therefore, we need to call it again with LOGIN_SETUMASK after changing UID. PR: bin/176740 Submitted by: John Marshall MFC after: 1 week Modified: head/crypto/openssh/session.c Modified: head/crypto/openssh/session.c ============================================================================== --- head/crypto/openssh/session.c Wed Mar 13 06:42:01 2013 (r248230) +++ head/crypto/openssh/session.c Wed Mar 13 09:41:55 2013 (r248231) @@ -1533,6 +1533,12 @@ do_setusercontext(struct passwd *pw) perror("unable to set user context (setuser)"); exit(1); } + + /* + * FreeBSD's setusercontext() will not apply the user's + * own umask setting unless running with the user's UID. + */ + setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUMASK); #else /* Permanently switch to the desired uid. */ permanently_set_uid(pw); From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 12:23:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 81EBB8C5; Wed, 13 Mar 2013 12:23:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 734F9DC3; Wed, 13 Mar 2013 12:23:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DCNHTh016860; Wed, 13 Mar 2013 12:23:17 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DCNELe016844; Wed, 13 Mar 2013 12:23:14 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201303131223.r2DCNELe016844@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 13 Mar 2013 12:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248236 - in head: lib/libusb usr.sbin/usbconfig 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.14 Precedence: list List-Id: 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, 13 Mar 2013 12:23:17 -0000 Author: hselasky Date: Wed Mar 13 12:23:14 2013 New Revision: 248236 URL: http://svnweb.freebsd.org/changeset/base/248236 Log: - Make the FreeBSD's USB library compile under Linux. - Fix a compile warning where the return value of a call to a write() function was ignored. - Remove redundant include files from userland USB header files. - Add some now needed include files to various C-files. Added: head/lib/libusb/libusb_global_linux.h (contents, props changed) Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.h head/lib/libusb/libusb01.c head/lib/libusb/libusb10.c head/lib/libusb/libusb10.h head/lib/libusb/libusb10_desc.c head/lib/libusb/libusb10_io.c head/lib/libusb/libusb20.c head/lib/libusb/libusb20.h head/lib/libusb/libusb20_desc.c head/lib/libusb/libusb20_desc.h head/lib/libusb/libusb20_ugen20.c head/lib/libusb/usb.h head/usr.sbin/usbconfig/usbconfig.c Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/Makefile Wed Mar 13 12:23:14 2013 (r248236) @@ -37,6 +37,19 @@ SRCS+= libusb10_io.c CFLAGS+= -DCOMPAT_32BIT .endif +# +# Cross platform support +# +# Examples: +# make LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h +# make COMPAT_32BIT=YES LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h +# +.if defined(LIBUSB_GLOBAL_INCLUDE_FILE) +CFLAGS+= -DLIBUSB_GLOBAL_INCLUDE_FILE=\"${LIBUSB_GLOBAL_INCLUDE_FILE}\" +CFLAGS+= -DUSB_GLOBAL_INCLUDE_FILE=\"${LIBUSB_GLOBAL_INCLUDE_FILE}\" +CFLAGS+= -I ../../sys +.endif + .include # LibUSB v1.0 Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb.h Wed Mar 13 12:23:14 2013 (r248236) @@ -27,8 +27,11 @@ #ifndef __LIBUSB_H__ #define __LIBUSB_H__ +#ifndef LIBUSB_GLOBAL_INCLUDE_FILE +#include #include #include +#endif #ifdef __cplusplus extern "C" { Modified: head/lib/libusb/libusb01.c ============================================================================== --- head/lib/libusb/libusb01.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb01.c Wed Mar 13 12:23:14 2013 (r248236) @@ -28,11 +28,16 @@ * This file contains the emulation layer for LibUSB v0.1 from sourceforge. */ -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include +#include +#include +#include +#endif #include "libusb20.h" #include "libusb20_desc.h" Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb10.c Wed Mar 13 12:23:14 2013 (r248236) @@ -25,17 +25,23 @@ * SUCH DAMAGE. */ -#include -#include -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include #include #include #include +#include #include +#include +#include +#include +#include +#include +#endif #define libusb_device_handle libusb20_device @@ -1331,7 +1337,7 @@ failure: /* make sure our event loop spins the done handler */ dummy = 0; - write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); + err = write(dev->ctx->ctrl_pipe[1], &dummy, sizeof(dummy)); } /* The following function must be called unlocked */ Modified: head/lib/libusb/libusb10.h ============================================================================== --- head/lib/libusb/libusb10.h Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb10.h Wed Mar 13 12:23:14 2013 (r248236) @@ -27,7 +27,9 @@ #ifndef __LIBUSB10_H__ #define __LIBUSB10_H__ +#ifndef LIBUSB_GLOBAL_INCLUDE_FILE #include +#endif #define GET_CONTEXT(ctx) (((ctx) == NULL) ? usbi_default_context : (ctx)) #define UNEXPORTED __attribute__((__visibility__("hidden"))) Modified: head/lib/libusb/libusb10_desc.c ============================================================================== --- head/lib/libusb/libusb10_desc.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb10_desc.c Wed Mar 13 12:23:14 2013 (r248236) @@ -24,10 +24,15 @@ * SUCH DAMAGE. */ -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include +#include +#include +#include +#endif #define libusb_device_handle libusb20_device Modified: head/lib/libusb/libusb10_io.c ============================================================================== --- head/lib/libusb/libusb10_io.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb10_io.c Wed Mar 13 12:23:14 2013 (r248236) @@ -24,15 +24,20 @@ * SUCH DAMAGE. */ -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include #include #include +#include #include #include +#include +#include +#endif #define libusb_device_handle libusb20_device Modified: head/lib/libusb/libusb20.c ============================================================================== --- head/lib/libusb/libusb20.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb20.c Wed Mar 13 12:23:14 2013 (r248236) @@ -24,13 +24,17 @@ * SUCH DAMAGE. */ -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include #include #include +#include +#include +#endif #include "libusb20.h" #include "libusb20_desc.h" Modified: head/lib/libusb/libusb20.h ============================================================================== --- head/lib/libusb/libusb20.h Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb20.h Wed Mar 13 12:23:14 2013 (r248236) @@ -29,13 +29,9 @@ #ifndef _LIBUSB20_H_ #define _LIBUSB20_H_ -#include -#include -#include - +#ifndef LIBUSB_GLOBAL_INCLUDE_FILE #include -#include -#include +#endif #ifdef __cplusplus extern "C" { Modified: head/lib/libusb/libusb20_desc.c ============================================================================== --- head/lib/libusb/libusb20_desc.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb20_desc.c Wed Mar 13 12:23:14 2013 (r248236) @@ -24,11 +24,15 @@ * SUCH DAMAGE. */ -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include +#include +#include +#endif #include "libusb20.h" #include "libusb20_desc.h" Modified: head/lib/libusb/libusb20_desc.h ============================================================================== --- head/lib/libusb/libusb20_desc.h Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb20_desc.h Wed Mar 13 12:23:14 2013 (r248236) @@ -45,6 +45,10 @@ #ifndef _LIBUSB20_DESC_H_ #define _LIBUSB20_DESC_H_ +#ifndef LIBUSB_GLOBAL_INCLUDE_FILE +#include +#endif + #ifdef __cplusplus extern "C" { #endif Modified: head/lib/libusb/libusb20_ugen20.c ============================================================================== --- head/lib/libusb/libusb20_ugen20.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/libusb20_ugen20.c Wed Mar 13 12:23:14 2013 (r248236) @@ -24,24 +24,28 @@ * SUCH DAMAGE. */ -#include -#include - +#ifdef LIBUSB_GLOBAL_INCLUDE_FILE +#include LIBUSB_GLOBAL_INCLUDE_FILE +#else #include #include #include #include #include #include - -#include "libusb20.h" -#include "libusb20_desc.h" -#include "libusb20_int.h" +#include +#include +#include +#endif #include #include #include +#include "libusb20.h" +#include "libusb20_desc.h" +#include "libusb20_int.h" + static libusb20_init_backend_t ugen20_init_backend; static libusb20_open_device_t ugen20_open_device; static libusb20_close_device_t ugen20_close_device; Added: head/lib/libusb/libusb_global_linux.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libusb/libusb_global_linux.h Wed Mar 13 12:23:14 2013 (r248236) @@ -0,0 +1,69 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2013 Hans Petter Selasky. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LIBUSB_GLOBAL_LINUX_H_ +#define _LIBUSB_GLOBAL_LINUX_H_ + +#define _XOPEN_SOURCE +#define _BSD_SOURCE +#define _POSIX_SOURCE +#define _POSIX_C_SOURCE 200809 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __aligned +#define __aligned(x) __attribute__((__aligned__(x))) +#endif + +#ifndef __packed +#define __packed __attribute__((__packed__)) +#endif + +#ifndef strlcpy +#define strlcpy(d,s,len) do { \ + strncpy(d,s,len); \ + ((char *)d)[(len) - 1] = 0; \ +} while (0) +#endif + +#endif /* _LIBUSB_GLOBAL_LINUX_H_ */ Modified: head/lib/libusb/usb.h ============================================================================== --- head/lib/libusb/usb.h Wed Mar 13 10:45:36 2013 (r248235) +++ head/lib/libusb/usb.h Wed Mar 13 12:23:14 2013 (r248236) @@ -27,10 +27,11 @@ #ifndef _LIBUSB20_COMPAT_01_H_ #define _LIBUSB20_COMPAT_01_H_ +#ifndef LIBUSB_GLOBAL_INCLUDE_FILE +#include #include #include - -#include +#endif /* USB interface class codes */ Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Wed Mar 13 10:45:36 2013 (r248235) +++ head/usr.sbin/usbconfig/usbconfig.c Wed Mar 13 12:23:14 2013 (r248236) @@ -33,6 +33,7 @@ #include #include #include +#include #include #include From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:18:46 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]) by hub.freebsd.org (Postfix) with ESMTP id 103E0E99; Wed, 13 Mar 2013 15:18:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 67B87DBD; Wed, 13 Mar 2013 15:18:44 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2DFIhMw070964; Wed, 13 Mar 2013 19:18:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2DFIhbN070963; Wed, 13 Mar 2013 19:18: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, 13 Mar 2013 19:18:43 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Message-ID: <20130313151843.GS48089@FreeBSD.org> References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> <20130312194936.GL48089@FreeBSD.org> <513F9BC9.3060300@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <513F9BC9.3060300@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 15:18:46 -0000 Okay, I will redo my patch to make default not to allow > PAGE_SIZE clusters. On Tue, Mar 12, 2013 at 10:19:05PM +0100, Andre Oppermann wrote: A> Jumbos always were physically contiguous. That was the very reason for A> their existence. They were invented to allow early NIC's with limited A> DMA capabilities to handle jumbo ethernet frames. Today they should only A> be used for DMA challenged NIC's and nothing else. They definitely were not physically contigous prior to r174247. A> > Let me repeat: there is a lot of code, that does handmade allocation of A> > an mbuf chain of an arbitrary length using mbufs and common clusters. This A> > code can be cut and use m_getm2(), if we can restrict it to avoid page size A> > clusters. I don't have time to dig deeper in the code and analyze and test A> > whether it can support page sized clusters in chains. A> A> m_getm2() can be used in any such case and doesn't have to avoid PAGE_SIZE A> clusters. PAGE_SIZE jumbo clusters are fine. Larger than PAGE_SIZE is not. A> A> When the code is able to work with mbuf chains the exact size of each cluster A> isn't important anymore. We can use the optimal size. Do you volunteer to fix if anything is broken? If not, I'd prefer to be conservative and make m_getm() capable to produce chains without clusters bigger than MCLBYTES. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:37:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AC587958 for ; Wed, 13 Mar 2013 15:37:47 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0A31AF2A for ; Wed, 13 Mar 2013 15:37:46 +0000 (UTC) Received: (qmail 27386 invoked from network); 13 Mar 2013 16:50:02 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Mar 2013 16:50:02 -0000 Message-ID: <51409D40.5050408@freebsd.org> Date: Wed, 13 Mar 2013 16:37:36 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248196 - head/sys/nfs References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> <20130312194936.GL48089@FreeBSD.org> <513F9BC9.3060300@freebsd.org> <20130313151843.GS48089@FreeBSD.org> In-Reply-To: <20130313151843.GS48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed 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.14 Precedence: list List-Id: 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, 13 Mar 2013 15:37:47 -0000 On 13.03.2013 16:18, Gleb Smirnoff wrote: > Okay, > > I will redo my patch to make default not to allow > PAGE_SIZE > clusters. Thanks. > On Tue, Mar 12, 2013 at 10:19:05PM +0100, Andre Oppermann wrote: > A> Jumbos always were physically contiguous. That was the very reason for > A> their existence. They were invented to allow early NIC's with limited > A> DMA capabilities to handle jumbo ethernet frames. Today they should only > A> be used for DMA challenged NIC's and nothing else. > > They definitely were not physically contigous prior to r174247. I'm pretty sure they were but implemented differently. Maybe this aspect got lost for a moment during the UMA transition of the mbuf allocator. Otherwise the Tigeon and other early GigE cards wouldn't have worked with jumbo frames on receive. They were not capable of, or very limited, on scatter DMA. For this particular purpose jumbo frames were introduced at the time. I added PAGE_SIZE jumbo frames around 2005 to make use of larger clusters but without getting into DMA and memory fragmentation trouble. > A> > Let me repeat: there is a lot of code, that does handmade allocation of > A> > an mbuf chain of an arbitrary length using mbufs and common clusters. This > A> > code can be cut and use m_getm2(), if we can restrict it to avoid page size > A> > clusters. I don't have time to dig deeper in the code and analyze and test > A> > whether it can support page sized clusters in chains. > A> > A> m_getm2() can be used in any such case and doesn't have to avoid PAGE_SIZE > A> clusters. PAGE_SIZE jumbo clusters are fine. Larger than PAGE_SIZE is not. > A> > A> When the code is able to work with mbuf chains the exact size of each cluster > A> isn't important anymore. We can use the optimal size. > > Do you volunteer to fix if anything is broken? If not, I'd prefer to > be conservative and make m_getm() capable to produce chains without > clusters bigger than MCLBYTES. There is nothing to fix. It works just fine and in fact is in use for all socket i/o (write) for about 6 years since r163916 and 163916. :-) Yes, if there is anything broken with PAGE_SIZE mbuf chains returned by m_getm2() I'm volunteering to fix it. -- Andre From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:38: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]) by hub.freebsd.org (Postfix) with ESMTP id E9F3FACD; Wed, 13 Mar 2013 15:38:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A755EF37; Wed, 13 Mar 2013 15:38:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DFc2oh075973; Wed, 13 Mar 2013 15:38:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DFc2RS075971; Wed, 13 Mar 2013 15:38:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201303131538.r2DFc2RS075971@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 13 Mar 2013 15:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248246 - head/sys/dev/usb 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.14 Precedence: list List-Id: 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, 13 Mar 2013 15:38:03 -0000 Author: hselasky Date: Wed Mar 13 15:38:01 2013 New Revision: 248246 URL: http://svnweb.freebsd.org/changeset/base/248246 Log: - Make quirk for reading device descriptor from broken USB devices. Else they won't enumerate at all: hw.usb.full_ddesc=1 - Reduce the USB descriptor read timeout from 1000ms to 500ms. Typical value for LOW speed devices is 50-100ms. - Enumerate USB device a maximum of 3 times when a port connection change event is detected, before giving up. MFC after: 1 month Modified: head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Mar 13 15:20:18 2013 (r248245) +++ head/sys/dev/usb/usb_device.c Wed Mar 13 15:38:01 2013 (r248246) @@ -1698,10 +1698,14 @@ usb_alloc_device(device_t parent_dev, st err = usbd_setup_device_desc(udev, NULL); if (err != 0) { - /* XXX try to re-enumerate the device */ + /* try to enumerate two more times */ err = usbd_req_re_enumerate(udev, NULL); - if (err) - goto done; + if (err != 0) { + err = usbd_req_re_enumerate(udev, NULL); + if (err != 0) { + goto done; + } + } } /* Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Wed Mar 13 15:20:18 2013 (r248245) +++ head/sys/dev/usb/usb_request.c Wed Mar 13 15:38:01 2013 (r248246) @@ -76,6 +76,11 @@ static int usb_no_cs_fail; SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW, &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set"); +static int usb_full_ddesc; + +SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW, + &usb_full_ddesc, 0, "USB always read complete device descriptor, if set"); + #ifdef USB_DEBUG #ifdef USB_REQ_DEBUG /* The following structures are used in connection to fault injection. */ @@ -1002,7 +1007,7 @@ usbd_req_get_desc(struct usb_device *ude USETW(req.wLength, min_len); err = usbd_do_request_flags(udev, mtx, &req, - desc, 0, NULL, 1000); + desc, 0, NULL, 500 /* ms */); if (err) { if (!retries) { @@ -1887,32 +1892,41 @@ usbd_setup_device_desc(struct usb_device */ switch (udev->speed) { case USB_SPEED_FULL: - case USB_SPEED_LOW: + if (usb_full_ddesc != 0) { + /* get full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + if (err == 0) + break; + } + + /* get partial device descriptor, some devices crash on this */ err = usbd_req_get_desc(udev, mtx, NULL, &udev->ddesc, USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); - if (err != 0) { - DPRINTFN(0, "getting device descriptor " - "at addr %d failed, %s\n", udev->address, - usbd_errstr(err)); - return (err); - } + if (err != 0) + break; + + /* get the full device descriptor */ + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); break; + default: DPRINTF("Minimum MaxPacketSize is large enough " - "to hold the complete device descriptor\n"); - break; - } + "to hold the complete device descriptor or " + "only once MaxPacketSize choice\n"); - /* get the full device descriptor */ - err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - - /* try one more time, if error */ - if (err) + /* get the full device descriptor */ err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); - if (err) { - DPRINTF("addr=%d, getting full desc failed\n", - udev->address); + /* try one more time, if error */ + if (err != 0) + err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); + break; + } + + if (err != 0) { + DPRINTFN(0, "getting device descriptor " + "at addr %d failed, %s\n", udev->address, + usbd_errstr(err)); return (err); } From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:42: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]) by hub.freebsd.org (Postfix) with ESMTP id 3829CEDB; Wed, 13 Mar 2013 15:42:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2AA19FA1; Wed, 13 Mar 2013 15:42:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DFg52O078218; Wed, 13 Mar 2013 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DFg5bl078217; Wed, 13 Mar 2013 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201303131542.r2DFg5bl078217@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 13 Mar 2013 15:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248247 - head/sys/dev/usb 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.14 Precedence: list List-Id: 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, 13 Mar 2013 15:42:05 -0000 Author: hselasky Date: Wed Mar 13 15:42:04 2013 New Revision: 248247 URL: http://svnweb.freebsd.org/changeset/base/248247 Log: Fix typo. Modified: head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Wed Mar 13 15:38:01 2013 (r248246) +++ head/sys/dev/usb/usb_request.c Wed Mar 13 15:42:04 2013 (r248247) @@ -1910,9 +1910,9 @@ usbd_setup_device_desc(struct usb_device break; default: - DPRINTF("Minimum MaxPacketSize is large enough " + DPRINTF("Minimum bMaxPacketSize is large enough " "to hold the complete device descriptor or " - "only once MaxPacketSize choice\n"); + "only one bMaxPacketSize choice\n"); /* get the full device descriptor */ err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc); From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 15:43:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75619100; Wed, 13 Mar 2013 15:43:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id EE0F5FBE; Wed, 13 Mar 2013 15:43:13 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2DFhC48071092; Wed, 13 Mar 2013 19:43:12 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2DFhCgM071091; Wed, 13 Mar 2013 19:43:12 +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, 13 Mar 2013 19:43:12 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248196 - head/sys/nfs Message-ID: <20130313154312.GT48089@FreeBSD.org> References: <201303121219.r2CCJN5Z069789@svn.freebsd.org> <513F3A54.3090702@freebsd.org> <20130312150053.GI48089@FreeBSD.org> <513F4A39.8040107@freebsd.org> <20130312155005.GJ48089@FreeBSD.org> <513F58C0.4050302@freebsd.org> <20130312194936.GL48089@FreeBSD.org> <513F9BC9.3060300@freebsd.org> <20130313151843.GS48089@FreeBSD.org> <51409D40.5050408@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <51409D40.5050408@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 15:43:14 -0000 On Wed, Mar 13, 2013 at 04:37:36PM +0100, Andre Oppermann wrote: A> > A> > Let me repeat: there is a lot of code, that does handmade allocation of A> > A> > an mbuf chain of an arbitrary length using mbufs and common clusters. This A> > A> > code can be cut and use m_getm2(), if we can restrict it to avoid page size A> > A> > clusters. I don't have time to dig deeper in the code and analyze and test A> > A> > whether it can support page sized clusters in chains. A> > A> A> > A> m_getm2() can be used in any such case and doesn't have to avoid PAGE_SIZE A> > A> clusters. PAGE_SIZE jumbo clusters are fine. Larger than PAGE_SIZE is not. A> > A> A> > A> When the code is able to work with mbuf chains the exact size of each cluster A> > A> isn't important anymore. We can use the optimal size. A> > A> > Do you volunteer to fix if anything is broken? If not, I'd prefer to A> > be conservative and make m_getm() capable to produce chains without A> > clusters bigger than MCLBYTES. A> A> There is nothing to fix. It works just fine and in fact is in use for all A> socket i/o (write) for about 6 years since r163916 and 163916. :-) A> A> Yes, if there is anything broken with PAGE_SIZE mbuf chains returned by m_getm2() A> I'm volunteering to fix it. I caught your tongue :) Be prepared to study netipsec code :) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 18:18:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CBDD9D3; Wed, 13 Mar 2013 18:18:16 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B47ECCFC; Wed, 13 Mar 2013 18:18:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DIIGo4025523; Wed, 13 Mar 2013 18:18:16 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DIIGT3025522; Wed, 13 Mar 2013 18:18:16 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201303131818.r2DIIGT3025522@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 13 Mar 2013 18:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248250 - head/lib/libc/gen 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.14 Precedence: list List-Id: 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, 13 Mar 2013 18:18:16 -0000 Author: pluknet Date: Wed Mar 13 18:18:16 2013 New Revision: 248250 URL: http://svnweb.freebsd.org/changeset/base/248250 Log: Add the getcontextx prototype to SYNOPSIS. Reviewed by: kib MFC after: 1 week Modified: head/lib/libc/gen/getcontext.3 Modified: head/lib/libc/gen/getcontext.3 ============================================================================== --- head/lib/libc/gen/getcontext.3 Wed Mar 13 17:37:13 2013 (r248249) +++ head/lib/libc/gen/getcontext.3 Wed Mar 13 18:18:16 2013 (r248250) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2011 +.Dd March 13, 2013 .Dt GETCONTEXT 3 .Os .Sh NAME @@ -47,6 +47,8 @@ .In ucontext.h .Ft int .Fn getcontext "ucontext_t *ucp" +.Ft ucontext_t * +.Fn getcontextx "void" .Ft int .Fn setcontext "const ucontext_t *ucp" .Sh DESCRIPTION From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 18:19:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF15F267; Wed, 13 Mar 2013 18:19:33 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AD3B0D19; Wed, 13 Mar 2013 18:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DIJXm7025727; Wed, 13 Mar 2013 18:19:33 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DIJXEl025726; Wed, 13 Mar 2013 18:19:33 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201303131819.r2DIJXEl025726@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 13 Mar 2013 18:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248251 - head/lib/libc/gen 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.14 Precedence: list List-Id: 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, 13 Mar 2013 18:19:33 -0000 Author: pluknet Date: Wed Mar 13 18:19:33 2013 New Revision: 248251 URL: http://svnweb.freebsd.org/changeset/base/248251 Log: Link getcontextx(3) to getcontext(3). Reviewed by: kib MFC after: 1 week Modified: head/lib/libc/gen/Makefile.inc Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Wed Mar 13 18:18:16 2013 (r248250) +++ head/lib/libc/gen/Makefile.inc Wed Mar 13 18:19:33 2013 (r248251) @@ -361,6 +361,7 @@ MLINKS+=getcap.3 cgetcap.3 \ getcap.3 cgetstr.3 \ getcap.3 cgetustr.3 MLINKS+=getcwd.3 getwd.3 +MLINKS+=getcontext.3 getcontextx.3 MLINKS+=getcontext.3 setcontext.3 MLINKS+=getdomainname.3 setdomainname.3 MLINKS+=getfsent.3 endfsent.3 \ From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 18:38:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 84D275E5; Wed, 13 Mar 2013 18:38:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6CFFCE0D; Wed, 13 Mar 2013 18:38:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DIcInl031502; Wed, 13 Mar 2013 18:38:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DIcIsm031501; Wed, 13 Mar 2013 18:38:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201303131838.r2DIcIsm031501@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 13 Mar 2013 18:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248252 - head/lib/libc/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.14 Precedence: list List-Id: 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, 13 Mar 2013 18:38:19 -0000 Author: jilles Date: Wed Mar 13 18:38:18 2013 New Revision: 248252 URL: http://svnweb.freebsd.org/changeset/base/248252 Log: libc: Avoid SIGPIPE when nscd closes the connection unexpectedly. It is almost always a bug if nscd closes the connection unexpectedly but programs should not be killed with SIGPIPE for it. Reviewed by: bushman Tested by: Jan Beich MFC after: 1 week Modified: head/lib/libc/net/nscachedcli.c Modified: head/lib/libc/net/nscachedcli.c ============================================================================== --- head/lib/libc/net/nscachedcli.c Wed Mar 13 18:19:33 2013 (r248251) +++ head/lib/libc/net/nscachedcli.c Wed Mar 13 18:38:18 2013 (r248252) @@ -75,9 +75,10 @@ safe_write(struct cached_connection_ *co nevents = _kevent(connection->write_queue, NULL, 0, &eventlist, 1, &timeout); if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) { - s_result = _write(connection->sockfd, data + result, + s_result = _sendto(connection->sockfd, data + result, eventlist.data < data_size - result ? - eventlist.data : data_size - result); + eventlist.data : data_size - result, MSG_NOSIGNAL, + NULL, 0); if (s_result == -1) return (-1); else @@ -175,8 +176,8 @@ send_credentials(struct cached_connectio nevents = _kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL); if (nevents == 1 && eventlist.filter == EVFILT_WRITE) { - result = (_sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? - -1 : 0; + result = (_sendmsg(connection->sockfd, &cred_hdr, + MSG_NOSIGNAL) == -1) ? -1 : 0; EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); _kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 18:43: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]) by hub.freebsd.org (Postfix) with ESMTP id E5B538C8; Wed, 13 Mar 2013 18:43:25 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D8420E53; Wed, 13 Mar 2013 18:43:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DIhPpF033807; Wed, 13 Mar 2013 18:43:25 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DIhP3p033805; Wed, 13 Mar 2013 18:43:25 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201303131843.r2DIhP3p033805@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 13 Mar 2013 18:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248253 - 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.14 Precedence: list List-Id: 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, 13 Mar 2013 18:43:26 -0000 Author: pluknet Date: Wed Mar 13 18:43:25 2013 New Revision: 248253 URL: http://svnweb.freebsd.org/changeset/base/248253 Log: Add missed `_load' to the `if_foo_load="YES"' line. PR: docs/176915 MFC after: 1 week Modified: head/share/man/man4/cas.4 head/share/man/man4/sge.4 Modified: head/share/man/man4/cas.4 ============================================================================== --- head/share/man/man4/cas.4 Wed Mar 13 18:38:18 2013 (r248252) +++ head/share/man/man4/cas.4 Wed Mar 13 18:43:25 2013 (r248253) @@ -44,7 +44,7 @@ Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -if_cas="YES" +if_cas_load="YES" .Ed .Sh DESCRIPTION The Modified: head/share/man/man4/sge.4 ============================================================================== --- head/share/man/man4/sge.4 Wed Mar 13 18:38:18 2013 (r248252) +++ head/share/man/man4/sge.4 Wed Mar 13 18:43:25 2013 (r248253) @@ -43,7 +43,7 @@ Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -if_sge="YES" +if_sge_load="YES" .Ed .Sh DESCRIPTION The From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 19:20:26 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]) by hub.freebsd.org (Postfix) with ESMTP id 6FF64649; Wed, 13 Mar 2013 19:20:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4A46A123; Wed, 13 Mar 2013 19:20:26 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6DFA8B915; Wed, 13 Mar 2013 15:20:25 -0400 (EDT) From: John Baldwin To: Pawel Jakub Dawidek Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf Date: Wed, 13 Mar 2013 11:08:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303042118.r24LIj5e008913@svn.freebsd.org> <20130312210921.GB1390@garage.freebsd.pl> In-Reply-To: <20130312210921.GB1390@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201303131108.27005.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 13 Mar 2013 15:20:25 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Kenneth D. Merry" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 19:20:26 -0000 On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote: > On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: > > Author: ken > > Date: Mon Mar 4 21:18:45 2013 > > New Revision: 247814 > > URL: http://svnweb.freebsd.org/changeset/base/247814 > > > > Log: > > Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL disable > > tunable by default. > > > > This will allow GENERIC configurations to boot on small memory boxes, but > > not require end users who want to use CTL to recompile their kernel. They > > can simply set kern.cam.ctl.disable=0 in loader.conf. > > Could you rename it to kern.cam.ctl.enable(d)? There was discussion at > some point about sysctl/tunable names and the consensus was, AFAIR, to > use positive(?) names as they are more obvious. Except that all the hints we use for devices are hint.foo.X.disable=1 :) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 20:35:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 702339F9; Wed, 13 Mar 2013 20:35:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE61804; Wed, 13 Mar 2013 20:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DKZqKJ067917; Wed, 13 Mar 2013 20:35:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DKZqqA067915; Wed, 13 Mar 2013 20:35:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303132035.r2DKZqqA067915@svn.freebsd.org> From: Xin LI Date: Wed, 13 Mar 2013 20:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248254 - head/sys/dev/sound/pci/hda 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.14 Precedence: list List-Id: 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, 13 Mar 2013 20:35:52 -0000 Author: delphij Date: Wed Mar 13 20:35:51 2013 New Revision: 248254 URL: http://svnweb.freebsd.org/changeset/base/248254 Log: Add quirk for Lenovo T530 headphone redirection. MFC after: 2 weeks Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c head/sys/dev/sound/pci/hda/hdac.h Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa_patches.c Wed Mar 13 18:43:25 2013 (r248253) +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Wed Mar 13 20:35:51 2013 (r248254) @@ -346,7 +346,8 @@ hdac_pin_patch(struct hdaa_widget *w) } else if (id == HDA_CODEC_ALC269 && (subid == LENOVO_X1CRBN_SUBVENDOR || subid == LENOVO_T430_SUBVENDOR || - subid == LENOVO_T430S_SUBVENDOR)) { + subid == LENOVO_T430S_SUBVENDOR || + subid == LENOVO_T530_SUBVENDOR)) { switch (nid) { case 21: patch = "as=1 seq=15"; Modified: head/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.h Wed Mar 13 18:43:25 2013 (r248253) +++ head/sys/dev/sound/pci/hda/hdac.h Wed Mar 13 20:35:51 2013 (r248254) @@ -228,6 +228,7 @@ #define LENOVO_T430_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f3) #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) +#define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 21:06:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DD56E488; Wed, 13 Mar 2013 21:06:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C4864A41; Wed, 13 Mar 2013 21:06:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DL654j077096; Wed, 13 Mar 2013 21:06:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DL64Ko077081; Wed, 13 Mar 2013 21:06:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201303132106.r2DL64Ko077081@svn.freebsd.org> From: John Baldwin Date: Wed, 13 Mar 2013 21:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248255 - in head/sys: fs/nfs fs/nfsclient nfsclient 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.14 Precedence: list List-Id: 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, 13 Mar 2013 21:06:05 -0000 Author: jhb Date: Wed Mar 13 21:06:03 2013 New Revision: 248255 URL: http://svnweb.freebsd.org/changeset/base/248255 Log: Revert 195703 and 195821 as this special stop handling in NFS is now implemented via VFCF_SBDRY rather than passing PBDRY to individual sleep calls. Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsmount.h head/sys/rpc/clnt_rc.c head/sys/rpc/clnt_vc.c Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/fs/nfs/nfsport.h Wed Mar 13 21:06:03 2013 (r248255) @@ -981,13 +981,6 @@ struct nfsreq { #define NFSVNO_DELEGOK(v) (1) #endif -/* - * Define this as the flags argument for msleep() when catching signals - * while holding a resource that other threads would block for, such as - * a vnode lock. - */ -#define NFS_PCATCH (PCATCH | PBDRY) - #endif /* _KERNEL */ #endif /* _NFS_NFSPORT_H */ Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Mar 13 21:06:03 2013 (r248255) @@ -1297,7 +1297,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_ sigset_t oldset; newnfs_set_sigmask(td, &oldset); - bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); + bp = getblk(vp, bn, size, PCATCH, 0, 0); newnfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) @@ -1332,7 +1332,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)) intrflg = 1; if (intrflg) { - slpflag = NFS_PCATCH; + slpflag = PCATCH; slptimeo = 2 * hz; } else { slpflag = 0; @@ -1413,7 +1413,7 @@ ncl_asyncio(struct nfsmount *nmp, struct } again: if (nmp->nm_flag & NFSMNT_INT) - slpflag = NFS_PCATCH; + slpflag = PCATCH; gotiod = FALSE; /* @@ -1478,7 +1478,7 @@ again: mtx_unlock(&ncl_iod_mutex); return (error2); } - if (slpflag == NFS_PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Mar 13 21:06:03 2013 (r248255) @@ -2660,7 +2660,7 @@ ncl_flush(struct vnode *vp, int waitfor, if (called_from_renewthread != 0) slptimeo = hz; if (nmp->nm_flag & NFSMNT_INT) - slpflag = NFS_PCATCH; + slpflag = PCATCH; if (!commit) passone = 0; bo = &vp->v_bufobj; @@ -2866,7 +2866,7 @@ loop: error = EINTR; goto done; } - if (slpflag & PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } @@ -2912,7 +2912,7 @@ loop: error = newnfs_sigintr(nmp, td); if (error) goto done; - if (slpflag & PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/nfsclient/nfs_bio.c Wed Mar 13 21:06:03 2013 (r248255) @@ -1242,7 +1242,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_ sigset_t oldset; nfs_set_sigmask(td, &oldset); - bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); + bp = getblk(vp, bn, size, PCATCH, 0, 0); nfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (nfs_sigintr(nmp, td)) @@ -1275,7 +1275,7 @@ nfs_vinvalbuf(struct vnode *vp, int flag if ((nmp->nm_flag & NFSMNT_INT) == 0) intrflg = 0; if (intrflg) { - slpflag = NFS_PCATCH; + slpflag = PCATCH; slptimeo = 2 * hz; } else { slpflag = 0; @@ -1354,7 +1354,7 @@ nfs_asyncio(struct nfsmount *nmp, struct } again: if (nmp->nm_flag & NFSMNT_INT) - slpflag = NFS_PCATCH; + slpflag = PCATCH; gotiod = FALSE; /* @@ -1419,7 +1419,7 @@ again: mtx_unlock(&nfs_iod_mtx); return (error2); } - if (slpflag == NFS_PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/nfsclient/nfs_vnops.c Wed Mar 13 21:06:03 2013 (r248255) @@ -2992,7 +2992,7 @@ nfs_flush(struct vnode *vp, int waitfor, int bvecsize = 0, bveccount; if (nmp->nm_flag & NFSMNT_INT) - slpflag = NFS_PCATCH; + slpflag = PCATCH; if (!commit) passone = 0; bo = &vp->v_bufobj; @@ -3190,7 +3190,7 @@ loop: error = EINTR; goto done; } - if (slpflag & PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } @@ -3228,7 +3228,7 @@ loop: error = nfs_sigintr(nmp, td); if (error) goto done; - if (slpflag & PCATCH) { + if (slpflag == PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/nfsclient/nfsmount.h ============================================================================== --- head/sys/nfsclient/nfsmount.h Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/nfsclient/nfsmount.h Wed Mar 13 21:06:03 2013 (r248255) @@ -125,8 +125,6 @@ struct nfsmount { #define NFS_DEFAULT_NEGNAMETIMEO 60 #endif -#define NFS_PCATCH (PCATCH | PBDRY) - #endif #endif Modified: head/sys/rpc/clnt_rc.c ============================================================================== --- head/sys/rpc/clnt_rc.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/rpc/clnt_rc.c Wed Mar 13 21:06:03 2013 (r248255) @@ -247,8 +247,7 @@ clnt_reconnect_call( stat = clnt_reconnect_connect(cl); if (stat == RPC_SYSTEMERROR) { error = tsleep(&fake_wchan, - rc->rc_intr ? PCATCH | PBDRY : 0, "rpccon", - hz); + rc->rc_intr ? PCATCH : 0, "rpccon", hz); if (error == EINTR || error == ERESTART) return (RPC_INTR); tries++; Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Wed Mar 13 20:35:51 2013 (r248254) +++ head/sys/rpc/clnt_vc.c Wed Mar 13 21:06:03 2013 (r248255) @@ -162,7 +162,7 @@ clnt_vc_create( interrupted = 0; sleep_flag = PSOCK; if (intrflag != 0) - sleep_flag |= (PCATCH | PBDRY); + sleep_flag |= PCATCH; while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { error = msleep(&so->so_timeo, SOCK_MTX(so), @@ -470,7 +470,6 @@ call_again: errp->re_errno = error; switch (error) { case EINTR: - case ERESTART: stat = RPC_INTR; break; case EWOULDBLOCK: @@ -704,7 +703,7 @@ clnt_vc_control(CLIENT *cl, u_int reques case CLSET_INTERRUPTIBLE: if (*(int *) info) - ct->ct_waitflag = PCATCH | PBDRY; + ct->ct_waitflag = PCATCH; else ct->ct_waitflag = 0; break; From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 21:08:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5AE17666; Wed, 13 Mar 2013 21:08:24 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 1C69BA79; Wed, 13 Mar 2013 21:08:23 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 92F3769F; Wed, 13 Mar 2013 22:05:04 +0100 (CET) Date: Wed, 13 Mar 2013 22:09:51 +0100 From: Pawel Jakub Dawidek To: John Baldwin Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf Message-ID: <20130313210951.GB1372@garage.freebsd.pl> References: <201303042118.r24LIj5e008913@svn.freebsd.org> <20130312210921.GB1390@garage.freebsd.pl> <201303131108.27005.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v9Ux+11Zm5mwPlX6" Content-Disposition: inline In-Reply-To: <201303131108.27005.jhb@freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Kenneth D. Merry" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 21:08:24 -0000 --v9Ux+11Zm5mwPlX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 13, 2013 at 11:08:26AM -0400, John Baldwin wrote: > On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote: > > On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: > > > Author: ken > > > Date: Mon Mar 4 21:18:45 2013 > > > New Revision: 247814 > > > URL: http://svnweb.freebsd.org/changeset/base/247814 > > >=20 > > > Log: > > > Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL dis= able > > > tunable by default. > > > =20 > > > This will allow GENERIC configurations to boot on small memory boxe= s, but > > > not require end users who want to use CTL to recompile their kernel= =2E They > > > can simply set kern.cam.ctl.disable=3D0 in loader.conf. > >=20 > > Could you rename it to kern.cam.ctl.enable(d)? There was discussion at > > some point about sysctl/tunable names and the consensus was, AFAIR, to > > use positive(?) names as they are more obvious. >=20 > Except that all the hints we use for devices are hint.foo.X.disable=3D1 :) Well we have many sysctls too, but would be nice not to introduce new ones. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --v9Ux+11Zm5mwPlX6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFA6x8ACgkQForvXbEpPzSGkwCg83IUajZvqa9lBrrPoLG3qDuj kHEAn1/BNrNeyiT00JQAGheY4M9mPFsN =Zikp -----END PGP SIGNATURE----- --v9Ux+11Zm5mwPlX6-- From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 21:23: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]) by hub.freebsd.org (Postfix) with ESMTP id 67D75B07; Wed, 13 Mar 2013 21:23:15 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAD0BE8; Wed, 13 Mar 2013 21:23:14 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r2DLNDn9030320; Wed, 13 Mar 2013 15:23:13 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r2DLNDdO030319; Wed, 13 Mar 2013 15:23:13 -0600 (MDT) (envelope-from ken) Date: Wed, 13 Mar 2013 15:23:13 -0600 From: "Kenneth D. Merry" To: Pawel Jakub Dawidek Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf Message-ID: <20130313212313.GA29927@nargothrond.kdm.org> References: <201303042118.r24LIj5e008913@svn.freebsd.org> <20130312210921.GB1390@garage.freebsd.pl> <201303131108.27005.jhb@freebsd.org> <20130313210951.GB1372@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130313210951.GB1372@garage.freebsd.pl> User-Agent: Mutt/1.4.2i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 21:23:15 -0000 On Wed, Mar 13, 2013 at 22:09:51 +0100, Pawel Jakub Dawidek wrote: > On Wed, Mar 13, 2013 at 11:08:26AM -0400, John Baldwin wrote: > > On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote: > > > On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: > > > > Author: ken > > > > Date: Mon Mar 4 21:18:45 2013 > > > > New Revision: 247814 > > > > URL: http://svnweb.freebsd.org/changeset/base/247814 > > > > > > > > Log: > > > > Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL disable > > > > tunable by default. > > > > > > > > This will allow GENERIC configurations to boot on small memory boxes, but > > > > not require end users who want to use CTL to recompile their kernel. They > > > > can simply set kern.cam.ctl.disable=0 in loader.conf. > > > > > > Could you rename it to kern.cam.ctl.enable(d)? There was discussion at > > > some point about sysctl/tunable names and the consensus was, AFAIR, to > > > use positive(?) names as they are more obvious. > > > > Except that all the hints we use for devices are hint.foo.X.disable=1 :) > > Well we have many sysctls too, but would be nice not to introduce new ones. This particular sysctl/tunable is not new. It was in 9.1. My concern with changing it is that it will lead to surprises for users who already have it set. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 21:27: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]) by hub.freebsd.org (Postfix) with ESMTP id EEFCBF70; Wed, 13 Mar 2013 21:27:15 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id B6A3ECD0; Wed, 13 Mar 2013 21:27:15 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id C5BEF6B2; Wed, 13 Mar 2013 22:24:02 +0100 (CET) Date: Wed, 13 Mar 2013 22:28:49 +0100 From: Pawel Jakub Dawidek To: "Kenneth D. Merry" Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf Message-ID: <20130313212849.GD1372@garage.freebsd.pl> References: <201303042118.r24LIj5e008913@svn.freebsd.org> <20130312210921.GB1390@garage.freebsd.pl> <201303131108.27005.jhb@freebsd.org> <20130313210951.GB1372@garage.freebsd.pl> <20130313212313.GA29927@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Hf61M2y+wYpnELGG" Content-Disposition: inline In-Reply-To: <20130313212313.GA29927@nargothrond.kdm.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 13 Mar 2013 21:27:16 -0000 --Hf61M2y+wYpnELGG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 13, 2013 at 03:23:13PM -0600, Kenneth D. Merry wrote: > On Wed, Mar 13, 2013 at 22:09:51 +0100, Pawel Jakub Dawidek wrote: > > On Wed, Mar 13, 2013 at 11:08:26AM -0400, John Baldwin wrote: > > > On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote: > > > > On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: > > > > > Author: ken > > > > > Date: Mon Mar 4 21:18:45 2013 > > > > > New Revision: 247814 > > > > > URL: http://svnweb.freebsd.org/changeset/base/247814 > > > > >=20 > > > > > Log: > > > > > Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL= disable > > > > > tunable by default. > > > > > =20 > > > > > This will allow GENERIC configurations to boot on small memory = boxes, but > > > > > not require end users who want to use CTL to recompile their ke= rnel. They > > > > > can simply set kern.cam.ctl.disable=3D0 in loader.conf. > > > >=20 > > > > Could you rename it to kern.cam.ctl.enable(d)? There was discussion= at > > > > some point about sysctl/tunable names and the consensus was, AFAIR,= to > > > > use positive(?) names as they are more obvious. > > >=20 > > > Except that all the hints we use for devices are hint.foo.X.disable= =3D1 :) > >=20 > > Well we have many sysctls too, but would be nice not to introduce new o= nes. >=20 > This particular sysctl/tunable is not new. It was in 9.1. >=20 > My concern with changing it is that it will lead to surprises for users w= ho > already have it set. I see. I thought it was just introduced in HEAD. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --Hf61M2y+wYpnELGG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFA75EACgkQForvXbEpPzRLfQCgsiJPbcfMIeUfx3saW7kaVNLC 784Aniu7uPlcT8B2082k0D3GSEq5Htmg =wFT6 -----END PGP SIGNATURE----- --Hf61M2y+wYpnELGG-- From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 22:01:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B87CDF5C; Wed, 13 Mar 2013 22:01:32 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 915ABFDA; Wed, 13 Mar 2013 22:01:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DM1WgL094804; Wed, 13 Mar 2013 22:01:32 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DM1WIT094803; Wed, 13 Mar 2013 22:01:32 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201303132201.r2DM1WIT094803@svn.freebsd.org> From: Tijl Coosemans Date: Wed, 13 Mar 2013 22:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248256 - 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.14 Precedence: list List-Id: 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, 13 Mar 2013 22:01:32 -0000 Author: tijl Date: Wed Mar 13 22:01:31 2013 New Revision: 248256 URL: http://svnweb.freebsd.org/changeset/base/248256 Log: - Fix two possible overflows when testing if ELF program headers are on the first page: 1. Cast uint16_t operands in a multiplication to unsigned int because otherwise the implicit promotion to int results in a signed multiplication that can overflow and the behaviour on integer overflow is undefined. 2. Replace (offset + size > PAGE_SIZE) with (size > PAGE_SIZE - offset) because the sum may overflow. - Use the same tests to see if the path to the interpreter is on the first page. There's no overflow here because size is already limited by MAXPATHLEN, but the compiler optimises the new tests better. Also fix an off-by-one error. - Simplify tests to see if an ELF note program header is on the first page. This also fixes an off-by-one error. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Mar 13 21:06:03 2013 (r248255) +++ head/sys/kern/imgact_elf.c Wed Mar 13 22:01:31 2013 (r248256) @@ -661,9 +661,8 @@ __elfN(load_file)(struct proc *p, const } /* Only support headers that fit within first page for now */ - /* (multiplication of two Elf_Half fields will not overflow) */ if ((hdr->e_phoff > PAGE_SIZE) || - (hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE - hdr->e_phoff) { + (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { error = ENOEXEC; goto fail; } @@ -743,7 +742,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i */ if ((hdr->e_phoff > PAGE_SIZE) || - (hdr->e_phoff + hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE) { + (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { /* Only support headers in first page for now */ return (ENOEXEC); } @@ -762,8 +761,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i case PT_INTERP: /* Path to interpreter */ if (phdr[i].p_filesz > MAXPATHLEN || - phdr[i].p_offset >= PAGE_SIZE || - phdr[i].p_offset + phdr[i].p_filesz >= PAGE_SIZE) + phdr[i].p_offset > PAGE_SIZE || + phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) return (ENOEXEC); interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; @@ -1553,9 +1552,8 @@ __elfN(parse_notes)(struct image_params const char *note_name; int i; - if (pnote == NULL || pnote->p_offset >= PAGE_SIZE || - pnote->p_filesz > PAGE_SIZE || - pnote->p_offset + pnote->p_filesz >= PAGE_SIZE) + if (pnote == NULL || pnote->p_offset > PAGE_SIZE || + pnote->p_filesz > PAGE_SIZE - pnote->p_offset) return (FALSE); note = note0 = (const Elf_Note *)(imgp->image_header + pnote->p_offset); From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 22:27:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CB23BC8A; Wed, 13 Mar 2013 22:27:01 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BE2202FF; Wed, 13 Mar 2013 22:27:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DMR1db002053; Wed, 13 Mar 2013 22:27:01 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DMR1eo002052; Wed, 13 Mar 2013 22:27:01 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303132227.r2DMR1eo002052@svn.freebsd.org> From: Joel Dahl Date: Wed, 13 Mar 2013 22:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248257 - 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.14 Precedence: list List-Id: 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, 13 Mar 2013 22:27:01 -0000 Author: joel (doc committer) Date: Wed Mar 13 22:27:01 2013 New Revision: 248257 URL: http://svnweb.freebsd.org/changeset/base/248257 Log: vinum isn't a new product. Modified: head/share/man/man4/vinum.4 Modified: head/share/man/man4/vinum.4 ============================================================================== --- head/share/man/man4/vinum.4 Wed Mar 13 22:01:31 2013 (r248256) +++ head/share/man/man4/vinum.4 Wed Mar 13 22:27:01 2013 (r248257) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2002 +.Dd March 13, 2013 .Dt VINUM 4 .Os .Sh NAME @@ -856,9 +856,6 @@ for its NetMAX product. .Sh AUTHORS .An Greg Lehey Aq grog@lemis.com . .Sh BUGS -.Nm -is a new product. -Bugs can be expected. The configuration mechanism is not yet fully functional. If you have difficulties, please look at the section @@ -876,8 +873,6 @@ kernel and test with the KLD module. Detection of differences between the version of the kernel and the KLD is not yet implemented. .Pp -The RAID-5 functionality is new in -.Fx 3.3 . Some problems have been reported with .Nm From owner-svn-src-head@FreeBSD.ORG Wed Mar 13 22:50:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3B147574; Wed, 13 Mar 2013 22:50:15 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2CE797AC; Wed, 13 Mar 2013 22:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2DMoFWO008296; Wed, 13 Mar 2013 22:50:15 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2DMoFXw008295; Wed, 13 Mar 2013 22:50:15 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201303132250.r2DMoFXw008295@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 13 Mar 2013 22:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248258 - head/usr.bin/unifdef 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.14 Precedence: list List-Id: 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, 13 Mar 2013 22:50:15 -0000 Author: obrien Date: Wed Mar 13 22:50:14 2013 New Revision: 248258 URL: http://svnweb.freebsd.org/changeset/base/248258 Log: No need to call an external program. Modified: head/usr.bin/unifdef/unifdefall.sh Modified: head/usr.bin/unifdef/unifdefall.sh ============================================================================== --- head/usr.bin/unifdef/unifdefall.sh Wed Mar 13 22:27:01 2013 (r248257) +++ head/usr.bin/unifdef/unifdefall.sh Wed Mar 13 22:50:14 2013 (r248258) @@ -42,8 +42,7 @@ case "$@" in shift esac -basename=$(basename "$0") -tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2 +tmp=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXXXXXX") || exit 2 trap 'rm -r "$tmp" || exit 2' EXIT export LC_ALL=C From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 00:27: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]) by hub.freebsd.org (Postfix) with ESMTP id D579F7E9; Thu, 14 Mar 2013 00:27:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BD1A66CB; Thu, 14 Mar 2013 00:27:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2E0RsUS038444; Thu, 14 Mar 2013 00:27:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2E0RsJW038443; Thu, 14 Mar 2013 00:27:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303140027.r2E0RsJW038443@svn.freebsd.org> From: Adrian Chadd Date: Thu, 14 Mar 2013 00:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248259 - head/sys/modules/ath 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.14 Precedence: list List-Id: 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, 14 Mar 2013 00:27:54 -0000 Author: adrian Date: Thu Mar 14 00:27:53 2013 New Revision: 248259 URL: http://svnweb.freebsd.org/changeset/base/248259 Log: Disable warning/errors for two files for now - they don't compile clean with clang. I'll work on this soon. Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Wed Mar 13 22:50:14 2013 (r248258) +++ head/sys/modules/ath/Makefile Thu Mar 14 00:27:53 2013 (r248259) @@ -162,3 +162,7 @@ CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_C # XXX Work around clang warnings, until maintainer approves fix. CWARNFLAGS.if_ath.c= ${NO_WSOMETIMES_UNINITIALIZED} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} + +# AR9300 HAL build overrides, as there's still some code to tidy up +#CWARNFLAGS.ar9300_eeprom.c= ${NO_WCONSTANT_CONVERSION} +#CWARNFLAGS.ar9300_reset.c= ${NO_WSOMETIMES_UNINITIALIZED} From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 06:20: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]) by hub.freebsd.org (Postfix) with ESMTP id CBFABBF9; Thu, 14 Mar 2013 06:20:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AE7536F8; Thu, 14 Mar 2013 06:20:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2E6K3Qa046159; Thu, 14 Mar 2013 06:20:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2E6K3CP046154; Thu, 14 Mar 2013 06:20:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303140620.r2E6K3CP046154@svn.freebsd.org> From: Adrian Chadd Date: Thu, 14 Mar 2013 06:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248264 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 14 Mar 2013 06:20:03 -0000 Author: adrian Date: Thu Mar 14 06:20:02 2013 New Revision: 248264 URL: http://svnweb.freebsd.org/changeset/base/248264 Log: Implement "holding buffers" per TX queue rather than globally. When working on TDMA, Sam Leffler found that the MAC DMA hardware would re-read the last TX descriptor when getting ready to transmit the next one. Thus the whole ATH_BUF_BUSY came into existance - the descriptor must be left alone (very specifically the link pointer must be maintained) until the hardware has moved onto the next frame. He saw this in TDMA because the MAC would be frequently stopping during active transmit (ie, when it wasn't its turn to transmit.) Fast-forward to today. It turns out that this is a problem not with a single MAC DMA instance, but with each QCU (from 0->9). They each maintain separate descriptor pointers and will re-read the last descriptor when starting to transmit the next. So when your AP is busy transmitting from multiple TX queues, you'll (more) frequently see one QCU stopped, waiting for a higher-priority QCU to finsh transmitting, before it'll go ahead and continue. If you mess up the descriptor (ie by freeing it) then you're short of luck. Thanks to rpaulo for sticking with me whilst I diagnosed this issue that he was quite reliably triggering in his environment. This is a reimplementation; it doesn't have anything in common with the ath9k or the Qualcomm Atheros reference driver. Now - it in theory doesn't apply on the EDMA chips, as long as you push one complete frame into the FIFO at a time. But the MAC can DMA from a list of frames pushed into the hardware queue (ie, you concat 'n' frames together with link pointers, and then push the head pointer into the TXQ FIFO.) Since that's likely how I'm going to implement CABQ handling in hostap mode, it's likely that I will end up teaching the EDMA TX completion code about busy buffers, just to be "sure" this doesn't creep up. Tested - iperf ap->sta and sta->ap (with both sides running this code): * AR5416 STA * AR9160/AR9220 hostap To validate that it doesn't break the EDMA (FIFO) chips: * AR9380, AR9485, AR9462 STA Using iperf with the -S to set the TCP client side DSCP bits, mapping to different TIDs and thus different TX queues. TODO: * Make this work on the EDMA chips, if we end up pushing lists of frames to the hardware (eg how we eventually will handle cabq in hostap/ibss mode.) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Mar 14 05:24:25 2013 (r248263) +++ head/sys/dev/ath/if_ath.c Thu Mar 14 06:20:02 2013 (r248264) @@ -3750,39 +3750,6 @@ ath_tx_update_ratectrl(struct ath_softc } /* - * Update the busy status of the last frame on the free list. - * When doing TDMA, the busy flag tracks whether the hardware - * currently points to this buffer or not, and thus gated DMA - * may restart by re-reading the last descriptor in this - * buffer. - * - * This should be called in the completion function once one - * of the buffers has been used. - */ -static void -ath_tx_update_busy(struct ath_softc *sc) -{ - struct ath_buf *last; - - /* - * Since the last frame may still be marked - * as ATH_BUF_BUSY, unmark it here before - * finishing the frame processing. - * Since we've completed a frame (aggregate - * or otherwise), the hardware has moved on - * and is no longer referencing the previous - * descriptor. - */ - ATH_TXBUF_LOCK_ASSERT(sc); - last = TAILQ_LAST(&sc->sc_txbuf_mgmt, ath_bufhead_s); - if (last != NULL) - last->bf_flags &= ~ATH_BUF_BUSY; - last = TAILQ_LAST(&sc->sc_txbuf, ath_bufhead_s); - if (last != NULL) - last->bf_flags &= ~ATH_BUF_BUSY; -} - -/* * Process the completion of the given buffer. * * This calls the rate control update and then the buffer completion. @@ -3901,7 +3868,6 @@ ath_tx_processq(struct ath_softc *sc, st break; } ATH_TXQ_REMOVE(txq, bf, bf_list); -#ifdef IEEE80211_SUPPORT_TDMA if (txq->axq_depth > 0) { /* * More frames follow. Mark the buffer busy @@ -3914,9 +3880,6 @@ ath_tx_processq(struct ath_softc *sc, st */ bf->bf_last->bf_flags |= ATH_BUF_BUSY; } else -#else - if (txq->axq_depth == 0) -#endif txq->axq_link = NULL; if (bf->bf_state.bfs_aggr) txq->axq_aggr_depth--; @@ -4188,6 +4151,51 @@ ath_returnbuf_head(struct ath_softc *sc, } /* + * Free the holding buffer if it exists + */ +static void +ath_txq_freeholdingbuf(struct ath_softc *sc, struct ath_txq *txq) +{ + + if (txq->axq_holdingbf == NULL) + return; + + txq->axq_holdingbf->bf_flags &= ~ATH_BUF_BUSY; + ATH_TXBUF_LOCK(sc); + ath_returnbuf_tail(sc, txq->axq_holdingbf); + ATH_TXBUF_UNLOCK(sc); + txq->axq_holdingbf = NULL; +} + +/* + * Add this buffer to the holding queue, freeing the previous + * one if it exists. + */ +static void +ath_txq_addholdingbuf(struct ath_softc *sc, struct ath_buf *bf) +{ + struct ath_txq *txq; + + /* XXX assert ATH_BUF_BUSY is set */ + + /* XXX assert the tx queue is under the max number */ + if (bf->bf_state.bfs_tx_queue > HAL_NUM_TX_QUEUES) { + device_printf(sc->sc_dev, "%s: bf=%p: invalid tx queue (%d)\n", + __func__, + bf, + bf->bf_state.bfs_tx_queue); + bf->bf_flags &= ~ATH_BUF_BUSY; + ath_returnbuf_tail(sc, bf); + return; + } + + txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue]; + ath_txq_freeholdingbuf(sc, txq); + + txq->axq_holdingbf = bf; +} + +/* * Return a buffer to the pool and update the 'busy' flag on the * previous 'tail' entry. * @@ -4207,8 +4215,18 @@ ath_freebuf(struct ath_softc *sc, struct KASSERT((bf->bf_node == NULL), ("%s: bf->bf_node != NULL\n", __func__)); KASSERT((bf->bf_m == NULL), ("%s: bf->bf_m != NULL\n", __func__)); + /* + * If this buffer is busy, push it onto the holding queue + */ + if (bf->bf_flags & ATH_BUF_BUSY) { + ath_txq_addholdingbuf(sc, bf); + return; + } + + /* + * Not a busy buffer, so free normally + */ ATH_TXBUF_LOCK(sc); - ath_tx_update_busy(sc); ath_returnbuf_tail(sc, bf); ATH_TXBUF_UNLOCK(sc); } @@ -4261,15 +4279,6 @@ ath_tx_draintxq(struct ath_softc *sc, st * NB: this assumes output has been stopped and * we do not need to block ath_tx_proc */ - ATH_TXBUF_LOCK(sc); - bf = TAILQ_LAST(&sc->sc_txbuf, ath_bufhead_s); - if (bf != NULL) - bf->bf_flags &= ~ATH_BUF_BUSY; - bf = TAILQ_LAST(&sc->sc_txbuf_mgmt, ath_bufhead_s); - if (bf != NULL) - bf->bf_flags &= ~ATH_BUF_BUSY; - ATH_TXBUF_UNLOCK(sc); - for (ix = 0;; ix++) { ATH_TX_LOCK(sc); bf = TAILQ_FIRST(&txq->axq_q); @@ -4331,6 +4340,11 @@ ath_tx_draintxq(struct ath_softc *sc, st } /* + * Free the holding buffer if it exists + */ + ath_txq_freeholdingbuf(sc, txq); + + /* * Drain software queued frames which are on * active TIDs. */ Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Thu Mar 14 05:24:25 2013 (r248263) +++ head/sys/dev/ath/if_ath_sysctl.c Thu Mar 14 06:20:02 2013 (r248264) @@ -361,11 +361,13 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS) for (i = 0; i < HAL_NUM_TX_QUEUES; i++) { if (ATH_TXQ_SETUP(sc, i)) { - printf("HW TXQ %d: axq_depth=%d, axq_aggr_depth=%d, axq_fifo_depth=%d\n", + printf("HW TXQ %d: axq_depth=%d, axq_aggr_depth=%d, " + "axq_fifo_depth=%d, holdingbf=%p\n", i, sc->sc_txq[i].axq_depth, sc->sc_txq[i].axq_aggr_depth, - sc->sc_txq[i].axq_fifo_depth); + sc->sc_txq[i].axq_fifo_depth, + sc->sc_txq[i].axq_holdingbf); } } Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Thu Mar 14 05:24:25 2013 (r248263) +++ head/sys/dev/ath/if_athvar.h Thu Mar 14 06:20:02 2013 (r248264) @@ -329,6 +329,7 @@ struct ath_txq { u_int axq_intrcnt; /* interrupt count */ u_int32_t *axq_link; /* link ptr in last TX desc */ TAILQ_HEAD(axq_q_s, ath_buf) axq_q; /* transmit queue */ + struct ath_buf *axq_holdingbf; /* holding TX buffer */ char axq_name[12]; /* e.g. "ath0_txq4" */ /* Per-TID traffic queue for software -> hardware TX */ From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 08:18:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B028994B; Thu, 14 Mar 2013 08:18:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9810DAD1; Thu, 14 Mar 2013 08:18:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2E8Iew1083722; Thu, 14 Mar 2013 08:18:40 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2E8Iekw083721; Thu, 14 Mar 2013 08:18:40 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303140818.r2E8Iekw083721@svn.freebsd.org> From: Martin Matuska Date: Thu, 14 Mar 2013 08:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248265 - head/cddl/contrib/opensolaris/cmd/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.14 Precedence: list List-Id: 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, 14 Mar 2013 08:18:40 -0000 Author: mm Date: Thu Mar 14 08:18:40 2013 New Revision: 248265 URL: http://svnweb.freebsd.org/changeset/base/248265 Log: Update zfs.8 manpage date (missing in r247585) MFC: together with r247585 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Mar 14 06:20:02 2013 (r248264) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Mar 14 08:18:40 2013 (r248265) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2013 +.Dd March 1, 2013 .Dt ZFS 8 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 10:03:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A77B2C82; Thu, 14 Mar 2013 10:03:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B777F7F; Thu, 14 Mar 2013 10:03:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EA302T015665; Thu, 14 Mar 2013 10:03:00 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EA2xVN015654; Thu, 14 Mar 2013 10:02:59 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303141002.r2EA2xVN015654@svn.freebsd.org> From: Martin Matuska Date: Thu, 14 Mar 2013 10:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248267 - in head/cddl/contrib/opensolaris/cmd: zdb zpool 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.14 Precedence: list List-Id: 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, 14 Mar 2013 10:03:00 -0000 Author: mm Date: Thu Mar 14 10:02:59 2013 New Revision: 248267 URL: http://svnweb.freebsd.org/changeset/base/248267 Log: MFV r248266: Import minor ZFS changes from vendor Illumos ZFS issues: 3604 zdb should print bpobjs more verbosely (fix zdb hang) 3606 zpool status -x shouldn't warn about old on-disk format MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Mar 14 08:25:10 2013 (r248266) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Mar 14 10:02:59 2013 (r248267) @@ -1225,6 +1225,7 @@ dump_bpobj(bpobj_t *bpo, char *name, int continue; } dump_bpobj(&subbpo, "subobj", indent + 1); + bpobj_close(&subbpo); } } else { (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Mar 14 08:25:10 2013 (r248266) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Thu Mar 14 10:02:59 2013 (r248267) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2012 +.Dd March 14, 2013 .Dt ZPOOL 8 .Os .Sh NAME @@ -1608,14 +1608,15 @@ is specified, the command exits after .Ar count reports are printed. .Pp -If a scrub or resilver is in progress, this command reports the percentage done -and the estimated time to completion. Both of these are only approximate, +If a scrub or resilver is in progress, this command reports the percentage +done and the estimated time to completion. Both of these are only approximate, because the amount of data in the pool and the other workloads on the system can change. .Bl -tag -width indent .It Fl x Only display status for pools that are exhibiting errors or are otherwise unavailable. +Warnings about pools not using the latest on-disk format will not be included. .It Fl v Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Mar 14 08:25:10 2013 (r248266) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Mar 14 10:02:59 2013 (r248267) @@ -4031,7 +4031,10 @@ status_callback(zpool_handle_t *zhp, voi * If we were given 'zpool status -x', only report those pools with * problems. */ - if (reason == ZPOOL_STATUS_OK && cbp->cb_explain) { + if (cbp->cb_explain && + (reason == ZPOOL_STATUS_OK || + reason == ZPOOL_STATUS_VERSION_OLDER || + reason == ZPOOL_STATUS_FEAT_DISABLED)) { if (!cbp->cb_allpools) { (void) printf(gettext("pool '%s' is healthy\n"), zpool_get_name(zhp)); From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 10:09:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AC08FE92; Thu, 14 Mar 2013 10:09:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1C10BFD3; Thu, 14 Mar 2013 10:09:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2EA9jWY082280; Thu, 14 Mar 2013 14:09:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2EA9jjb082279; Thu, 14 Mar 2013 14:09:45 +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, 14 Mar 2013 14:09:45 +0400 From: Gleb Smirnoff To: Joel Dahl Subject: Re: svn commit: r248257 - head/share/man/man4 Message-ID: <20130314100945.GZ48089@FreeBSD.org> References: <201303132227.r2DMR1eo002052@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201303132227.r2DMR1eo002052@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 14 Mar 2013 10:09:47 -0000 On Wed, Mar 13, 2013 at 10:27:01PM +0000, Joel Dahl wrote: J> Author: joel (doc committer) J> Date: Wed Mar 13 22:27:01 2013 J> New Revision: 248257 J> URL: http://svnweb.freebsd.org/changeset/base/248257 J> J> Log: J> vinum isn't a new product. vinum is actually not present in modern FreeBSD, gvinum is. Well, the gvinum.4 page isn't written, but I strongly doubt that vinum.4 page has at least 20% of content that would precisely apply to geom_vinum module. IMO, it would be better to remove the vinum.4 page. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 10:39: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]) by hub.freebsd.org (Postfix) with ESMTP id BBC705C5; Thu, 14 Mar 2013 10:39:51 +0000 (UTC) (envelope-from joel@vnode.se) Received: from mail.vnode.se (mail.vnode.se [212.247.52.13]) by mx1.freebsd.org (Postfix) with ESMTP id 79FC019C; Thu, 14 Mar 2013 10:39:51 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 65872E3F07A; Thu, 14 Mar 2013 11:39:49 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9wNgId52bBYZ; Thu, 14 Mar 2013 11:39:44 +0100 (CET) Received: from devbox.vnode.local (unknown [83.223.1.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 9B30DE3F079; Thu, 14 Mar 2013 11:39:43 +0100 (CET) Date: Thu, 14 Mar 2013 11:39:42 +0100 From: Joel Dahl To: Gleb Smirnoff Subject: Re: svn commit: r248257 - head/share/man/man4 Message-ID: <20130314103942.GA74748@devbox.vnode.local> References: <201303132227.r2DMR1eo002052@svn.freebsd.org> <20130314100945.GZ48089@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130314100945.GZ48089@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 14 Mar 2013 10:39:51 -0000 On Thu, Mar 14, 2013 at 02:09:45PM +0400, Gleb Smirnoff wrote: > On Wed, Mar 13, 2013 at 10:27:01PM +0000, Joel Dahl wrote: > J> Author: joel (doc committer) > J> Date: Wed Mar 13 22:27:01 2013 > J> New Revision: 248257 > J> URL: http://svnweb.freebsd.org/changeset/base/248257 > J> > J> Log: > J> vinum isn't a new product. > > vinum is actually not present in modern FreeBSD, gvinum is. > > Well, the gvinum.4 page isn't written, but I strongly > doubt that vinum.4 page has at least 20% of content that > would precisely apply to geom_vinum module. > > IMO, it would be better to remove the vinum.4 page. No objection from me. -- Joel From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 18:46: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]) by hub.freebsd.org (Postfix) with ESMTP id 74C6A4FB; Thu, 14 Mar 2013 18:46:12 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 500162C1; Thu, 14 Mar 2013 18:46:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EIkCYl075506; Thu, 14 Mar 2013 18:46:12 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EIkCme075505; Thu, 14 Mar 2013 18:46:12 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303141846.r2EIkCme075505@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Mar 2013 18:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248273 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 18:46:12 -0000 Author: joel (doc committer) Date: Thu Mar 14 18:46:11 2013 New Revision: 248273 URL: http://svnweb.freebsd.org/changeset/base/248273 Log: Add GEOM_* kernel options to the SYNOPSIS. Modified: head/share/man/man4/geom.4 Modified: head/share/man/man4/geom.4 ============================================================================== --- head/share/man/man4/geom.4 Thu Mar 14 17:48:07 2013 (r248272) +++ head/share/man/man4/geom.4 Thu Mar 14 18:46:11 2013 (r248273) @@ -34,12 +34,47 @@ .\" .\" $FreeBSD$ .\" -.Dd May 25, 2006 +.Dd March 14, 2013 .Dt GEOM 4 .Os .Sh NAME .Nm GEOM .Nd "modular disk I/O request transformation framework" +.Sh SYNOPSIS +.Cd options GEOM_AES +.Cd options GEOM_BDE +.Cd options GEOM_BSD +.Cd options GEOM_CACHE +.Cd options GEOM_CONCAT +.Cd options GEOM_ELI +.Cd options GEOM_FOX +.Cd options GEOM_GATE +.Cd options GEOM_JOURNAL +.Cd options GEOM_LABEL +.Cd options GEOM_LINUX_LVM +.Cd options GEOM_MBR +.Cd options GEOM_MIRROR +.Cd options GEOM_MULTIPATH +.Cd options GEOM_NOP +.Cd options GEOM_PART_APM +.Cd options GEOM_PART_BSD +.Cd options GEOM_PART_EBR +.Cd options GEOM_PART_EBR_COMPAT +.Cd options GEOM_PART_GPT +.Cd options GEOM_PART_LDM +.Cd options GEOM_PART_MBR +.Cd options GEOM_PART_PC98 +.Cd options GEOM_PART_VTOC8 +.Cd options GEOM_PC98 +.Cd options GEOM_RAID +.Cd options GEOM_RAID3 +.Cd options GEOM_SHSEC +.Cd options GEOM_STRIPE +.Cd options GEOM_SUNLABEL +.Cd options GEOM_UZIP +.Cd options GEOM_VIRSTOR +.Cd options GEOM_VOL +.Cd options GEOM_ZERO .Sh DESCRIPTION The .Nm From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 18:55: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]) by hub.freebsd.org (Postfix) with ESMTP id A4F4CAC3; Thu, 14 Mar 2013 18:55:41 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8C92437E; Thu, 14 Mar 2013 18:55:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EItfvT078649; Thu, 14 Mar 2013 18:55:41 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EItf5o078648; Thu, 14 Mar 2013 18:55:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303141855.r2EItf5o078648@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Mar 2013 18:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248274 - head/sbin/gvinum 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.14 Precedence: list List-Id: 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, 14 Mar 2013 18:55:41 -0000 Author: joel (doc committer) Date: Thu Mar 14 18:55:41 2013 New Revision: 248274 URL: http://svnweb.freebsd.org/changeset/base/248274 Log: Minor mdoc fixes. Modified: head/sbin/gvinum/gvinum.8 Modified: head/sbin/gvinum/gvinum.8 ============================================================================== --- head/sbin/gvinum/gvinum.8 Thu Mar 14 18:46:11 2013 (r248273) +++ head/sbin/gvinum/gvinum.8 Thu Mar 14 18:55:41 2013 (r248274) @@ -388,7 +388,10 @@ documentation were added by .An "Chris Jones" through the 2005 Google Summer of Code program. -.Ic a partial rewrite of gvinum was done by "Lukas Ertl" and "Ulf Lilleengen" +A partial rewrite of gvinum was done by +.An "Lukas Ertl" +and +.An "Ulf Lilleengen" through the 2007 Google Summer of Code program. The documentation have been updated to reflect the new functionality. .Sh AUTHORS From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 19:36: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]) by hub.freebsd.org (Postfix) with ESMTP id 9182972E; Thu, 14 Mar 2013 19:36:20 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 840BC74B; Thu, 14 Mar 2013 19:36:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EJaKk1091419; Thu, 14 Mar 2013 19:36:20 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EJaKli091418; Thu, 14 Mar 2013 19:36:20 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303141936.r2EJaKli091418@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Mar 2013 19:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248275 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 19:36:20 -0000 Author: joel (doc committer) Date: Thu Mar 14 19:36:20 2013 New Revision: 248275 URL: http://svnweb.freebsd.org/changeset/base/248275 Log: Fix minor spelling error in a comment. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Mar 14 18:55:41 2013 (r248274) +++ head/sys/conf/NOTES Thu Mar 14 19:36:20 2013 (r248275) @@ -986,7 +986,7 @@ options DUMMYNET # See zero_copy(9) for more details. # XXX: The COW based send mechanism is not safe and may result in # kernel crashes. -# XXX: None of the current NIC drivers support disposeable pages. +# XXX: None of the current NIC drivers support disposable pages. options SOCKET_SEND_COW options SOCKET_RECV_PFLIP From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 19:48:26 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]) by hub.freebsd.org (Postfix) with ESMTP id 7AD46A07; Thu, 14 Mar 2013 19:48:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 507537F0; Thu, 14 Mar 2013 19:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EJmPhE094623; Thu, 14 Mar 2013 19:48:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EJmPcB094622; Thu, 14 Mar 2013 19:48:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303141948.r2EJmPcB094622@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 Mar 2013 19:48:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248276 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 19:48:26 -0000 Author: kib Date: Thu Mar 14 19:48:25 2013 New Revision: 248276 URL: http://svnweb.freebsd.org/changeset/base/248276 Log: Rewrite the vfs_bio_clrbuf(9) to not access the b_data for B_VMIO buffers directly, use pmap_zero_page_area(9) for each zeroing page region instead. Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 2 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Mar 14 19:36:20 2013 (r248275) +++ head/sys/kern/vfs_bio.c Thu Mar 14 19:48:25 2013 (r248276) @@ -3712,8 +3712,7 @@ vfs_bio_set_valid(struct buf *bp, int ba void vfs_bio_clrbuf(struct buf *bp) { - int i, j, mask; - caddr_t sa, ea; + int i, j, mask, sa, ea, slide; if ((bp->b_flags & (B_VMIO | B_MALLOC)) != B_VMIO) { clrbuf(bp); @@ -3731,30 +3730,33 @@ vfs_bio_clrbuf(struct buf *bp) if ((bp->b_pages[0]->valid & mask) == mask) goto unlock; if ((bp->b_pages[0]->valid & mask) == 0) { - bzero(bp->b_data, bp->b_bufsize); + pmap_zero_page_area(bp->b_pages[0], 0, bp->b_bufsize); bp->b_pages[0]->valid |= mask; goto unlock; } } - ea = sa = bp->b_data; - for(i = 0; i < bp->b_npages; i++, sa = ea) { - ea = (caddr_t)trunc_page((vm_offset_t)sa + PAGE_SIZE); - ea = (caddr_t)(vm_offset_t)ulmin( - (u_long)(vm_offset_t)ea, - (u_long)(vm_offset_t)bp->b_data + bp->b_bufsize); + sa = bp->b_offset & PAGE_MASK; + slide = 0; + for (i = 0; i < bp->b_npages; i++, sa = 0) { + slide = imin(slide + PAGE_SIZE, bp->b_offset + bp->b_bufsize); + ea = slide & PAGE_MASK; + if (ea == 0) + ea = PAGE_SIZE; if (bp->b_pages[i] == bogus_page) continue; - j = ((vm_offset_t)sa & PAGE_MASK) / DEV_BSIZE; + j = sa / DEV_BSIZE; mask = ((1 << ((ea - sa) / DEV_BSIZE)) - 1) << j; VM_OBJECT_ASSERT_WLOCKED(bp->b_pages[i]->object); if ((bp->b_pages[i]->valid & mask) == mask) continue; if ((bp->b_pages[i]->valid & mask) == 0) - bzero(sa, ea - sa); + pmap_zero_page_area(bp->b_pages[i], sa, ea - sa); else { for (; sa < ea; sa += DEV_BSIZE, j++) { - if ((bp->b_pages[i]->valid & (1 << j)) == 0) - bzero(sa, DEV_BSIZE); + if ((bp->b_pages[i]->valid & (1 << j)) == 0) { + pmap_zero_page_area(bp->b_pages[i], + sa, DEV_BSIZE); + } } } bp->b_pages[i]->valid |= mask; From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 19:50:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E2AF5BEB; Thu, 14 Mar 2013 19:50:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D442580F; Thu, 14 Mar 2013 19:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EJo9Rj094973; Thu, 14 Mar 2013 19:50:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EJo9H1094972; Thu, 14 Mar 2013 19:50:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303141950.r2EJo9H1094972@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 Mar 2013 19:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248277 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 19:50:10 -0000 Author: kib Date: Thu Mar 14 19:50:09 2013 New Revision: 248277 URL: http://svnweb.freebsd.org/changeset/base/248277 Log: Remove excessive and inconsistent initializers for the various kernel maps and submaps. MFC after: 2 weeks Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Mar 14 19:48:25 2013 (r248276) +++ head/sys/vm/vm_kern.c Thu Mar 14 19:50:09 2013 (r248277) @@ -85,11 +85,11 @@ __FBSDID("$FreeBSD$"); #include #include -vm_map_t kernel_map=0; -vm_map_t kmem_map=0; -vm_map_t exec_map=0; +vm_map_t kernel_map; +vm_map_t kmem_map; +vm_map_t exec_map; vm_map_t pipe_map; -vm_map_t buffer_map=0; +vm_map_t buffer_map; const void *zero_region; CTASSERT((ZERO_REGION_SIZE & PAGE_MASK) == 0); From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 19:56:22 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]) by hub.freebsd.org (Postfix) with ESMTP id 2B20CDBA; Thu, 14 Mar 2013 19:56:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F3C24852; Thu, 14 Mar 2013 19:56:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EJuLDL097405; Thu, 14 Mar 2013 19:56:21 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EJuLMf097404; Thu, 14 Mar 2013 19:56:21 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303141956.r2EJuLMf097404@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Mar 2013 19:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248278 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 19:56:22 -0000 Author: joel (doc committer) Date: Thu Mar 14 19:56:21 2013 New Revision: 248278 URL: http://svnweb.freebsd.org/changeset/base/248278 Log: Sort sections. Modified: head/share/man/man4/udp.4 Modified: head/share/man/man4/udp.4 ============================================================================== --- head/share/man/man4/udp.4 Thu Mar 14 19:50:09 2013 (r248277) +++ head/share/man/man4/udp.4 Thu Mar 14 19:56:21 2013 (r248278) @@ -103,29 +103,6 @@ transport level may be used with .Tn UDP ; see .Xr ip 4 . -.Sh ERRORS -A socket operation may fail with one of the following errors returned: -.Bl -tag -width Er -.It Bq Er EISCONN -when trying to establish a connection on a socket which -already has one, or when trying to send a datagram with the destination -address specified and the socket is already connected; -.It Bq Er ENOTCONN -when trying to send a datagram, but -no destination address is specified, and the socket has not been -connected; -.It Bq Er ENOBUFS -when the system runs out of memory for -an internal data structure; -.It Bq Er EADDRINUSE -when an attempt -is made to create a socket with a port which has already been -allocated; -.It Bq Er EADDRNOTAVAIL -when an attempt is made to create a -socket with a network address for which no network interface -exists. -.El .Sh MIB VARIABLES The .Nm @@ -154,6 +131,29 @@ listening, do not return an ICMP port un See .Xr blackhole 4 . ) .El +.Sh ERRORS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width Er +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket has not been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El .Sh SEE ALSO .Xr getsockopt 2 , .Xr recv 2 , From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 20:05:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 12E2896; Thu, 14 Mar 2013 20:05:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EFBAE8B3; Thu, 14 Mar 2013 20:05:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EK5nTD000621; Thu, 14 Mar 2013 20:05:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EK5nPg000620; Thu, 14 Mar 2013 20:05:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201303142005.r2EK5nPg000620@svn.freebsd.org> From: Xin LI Date: Thu, 14 Mar 2013 20:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248279 - head/sbin/recoverdisk 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.14 Precedence: list List-Id: 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, 14 Mar 2013 20:05:50 -0000 Author: delphij Date: Thu Mar 14 20:05:49 2013 New Revision: 248279 URL: http://svnweb.freebsd.org/changeset/base/248279 Log: Correct type for DIOCGSTRIPESIZE. Without this there would be a stack overflow which will crash the program later. PR: bin/176953 Submitted by: r4721 tormail org MFC after: 3 days Modified: head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/recoverdisk.c ============================================================================== --- head/sbin/recoverdisk/recoverdisk.c Thu Mar 14 19:56:21 2013 (r248278) +++ head/sbin/recoverdisk/recoverdisk.c Thu Mar 14 20:05:49 2013 (r248279) @@ -156,7 +156,7 @@ main(int argc, char * const argv[]) int error, state; u_char *buf; u_int sectorsize; - u_int stripesize; + off_t stripesize; time_t t1, t2; struct stat sb; u_int n, snapshot = 60; From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 20:18: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]) by hub.freebsd.org (Postfix) with ESMTP id 1C1056BE; Thu, 14 Mar 2013 20:18:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E8E7B932; Thu, 14 Mar 2013 20:18:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EKIFO2004268; Thu, 14 Mar 2013 20:18:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EKIDM0004250; Thu, 14 Mar 2013 20:18:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303142018.r2EKIDM0004250@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 Mar 2013 20:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248280 - in head/sys: amd64/amd64 arm/arm arm/include i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke powerpc/powerpc sparc64/sparc64 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.14 Precedence: list List-Id: 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, 14 Mar 2013 20:18:16 -0000 Author: kib Date: Thu Mar 14 20:18:12 2013 New Revision: 248280 URL: http://svnweb.freebsd.org/changeset/base/248280 Log: Add pmap function pmap_copy_pages(), which copies the content of the pages around, taking array of vm_page_t both for source and destination. Starting offsets and total transfer size are specified. The function implements optimal algorithm for copying using the platform-specific optimizations. For instance, on the architectures were the direct map is available, no transient mappings are created, for i386 the per-cpu ephemeral page frame is used. The code was typically borrowed from the pmap_copy_page() for the same architecture. Only i386/amd64, powerpc aim and arm/arm-v6 implementations were tested at the time of commit. High-level code, not committed yet to the tree, ensures that the use of the function is only allowed after explicit enablement. For sparc64, the existing code has known issues and a stab is added instead, to allow the kernel linking. Sponsored by: The FreeBSD Foundation Tested by: pho (i386, amd64), scottl (amd64), ian (arm and arm-v6) MFC after: 2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/include/pmap.h head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/powerpc/mmu_if.m head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/pmap.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/amd64/amd64/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -4272,6 +4272,30 @@ pmap_copy_page(vm_page_t msrc, vm_page_t pagecopy((void *)src, (void *)dst); } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + a_cp = (char *)PHYS_TO_DMAP(ma[a_offset >> PAGE_SHIFT]-> + phys_addr) + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + b_cp = (char *)PHYS_TO_DMAP(mb[b_offset >> PAGE_SHIFT]-> + phys_addr) + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/arm/arm/pmap-v6.c Thu Mar 14 20:18:12 2013 (r248280) @@ -3313,6 +3313,45 @@ pmap_copy_page_generic(vm_paddr_t src, v } void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + vm_page_t a_pg, b_pg; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + mtx_lock(&cmtx); + while (xfersize > 0) { + a_pg = ma[a_offset >> PAGE_SHIFT]; + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + b_pg = mb[b_offset >> PAGE_SHIFT]; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + *csrc_pte = L2_S_PROTO | VM_PAGE_TO_PHYS(a_pg) | + pte_l2_s_cache_mode; + pmap_set_prot(csrc_pte, VM_PROT_READ, 0); + PTE_SYNC(csrc_pte); + *cdst_pte = L2_S_PROTO | VM_PAGE_TO_PHYS(b_pg) | + pte_l2_s_cache_mode; + pmap_set_prot(cdst_pte, VM_PROT_READ | VM_PROT_WRITE, 0); + PTE_SYNC(cdst_pte); + cpu_tlb_flushD_SE(csrcp); + cpu_tlb_flushD_SE(cdstp); + cpu_cpwait(); + bcopy((char *)csrcp + a_pg_offset, (char *)cdstp + b_pg_offset, + cnt); + cpu_idcache_wbinv_range(cdstp + b_pg_offset, cnt); + pmap_l2cache_wbinv_range(cdstp + b_pg_offset, + VM_PAGE_TO_PHYS(b_pg) + b_pg_offset, cnt); + xfersize -= cnt; + a_offset += cnt; + b_offset += cnt; + } + mtx_unlock(&cmtx); +} + +void pmap_copy_page(vm_page_t src, vm_page_t dst) { Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/arm/arm/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -258,6 +258,9 @@ pt_entry_t pte_l1_c_proto; pt_entry_t pte_l2_s_proto; void (*pmap_copy_page_func)(vm_paddr_t, vm_paddr_t); +void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys, + vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, + int cnt); void (*pmap_zero_page_func)(vm_paddr_t, int, int); struct msgbuf *msgbufp = 0; @@ -400,6 +403,13 @@ static vm_paddr_t pmap_kernel_l2ptp_phys static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0; static struct rwlock pvh_global_lock; +void pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offset_t a_offs, + vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); +#if ARM_MMU_XSCALE == 1 +void pmap_copy_page_offs_xscale(vm_paddr_t a_phys, vm_offset_t a_offs, + vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); +#endif + /* * This list exists for the benefit of pmap_map_chunk(). It keeps track * of the kernel L2 tables during bootstrap, so that pmap_map_chunk() can @@ -484,6 +494,7 @@ pmap_pte_init_generic(void) pte_l2_s_proto = L2_S_PROTO_generic; pmap_copy_page_func = pmap_copy_page_generic; + pmap_copy_page_offs_func = pmap_copy_page_offs_generic; pmap_zero_page_func = pmap_zero_page_generic; } @@ -660,6 +671,7 @@ pmap_pte_init_xscale(void) #ifdef CPU_XSCALE_CORE3 pmap_copy_page_func = pmap_copy_page_generic; + pmap_copy_page_offs_func = pmap_copy_page_offs_generic; pmap_zero_page_func = pmap_zero_page_generic; xscale_use_minidata = 0; /* Make sure it is L2-cachable */ @@ -672,6 +684,7 @@ pmap_pte_init_xscale(void) #else pmap_copy_page_func = pmap_copy_page_xscale; + pmap_copy_page_offs_func = pmap_copy_page_offs_xscale; pmap_zero_page_func = pmap_zero_page_xscale; #endif @@ -4300,6 +4313,29 @@ pmap_copy_page_generic(vm_paddr_t src, v cpu_l2cache_inv_range(csrcp, PAGE_SIZE); cpu_l2cache_wbinv_range(cdstp, PAGE_SIZE); } + +void +pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offset_t a_offs, + vm_paddr_t b_phys, vm_offset_t b_offs, int cnt) +{ + + mtx_lock(&cmtx); + *csrc_pte = L2_S_PROTO | a_phys | + L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | pte_l2_s_cache_mode; + PTE_SYNC(csrc_pte); + *cdst_pte = L2_S_PROTO | b_phys | + L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) | pte_l2_s_cache_mode; + PTE_SYNC(cdst_pte); + cpu_tlb_flushD_SE(csrcp); + cpu_tlb_flushD_SE(cdstp); + cpu_cpwait(); + bcopy((char *)csrcp + a_offs, (char *)cdstp + b_offs, cnt); + mtx_unlock(&cmtx); + cpu_dcache_inv_range(csrcp + a_offs, cnt); + cpu_dcache_wbinv_range(cdstp + b_offs, cnt); + cpu_l2cache_inv_range(csrcp + a_offs, cnt); + cpu_l2cache_wbinv_range(cdstp + b_offs, cnt); +} #endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */ #if ARM_MMU_XSCALE == 1 @@ -4344,6 +4380,28 @@ pmap_copy_page_xscale(vm_paddr_t src, vm mtx_unlock(&cmtx); xscale_cache_clean_minidata(); } + +void +pmap_copy_page_offs_xscale(vm_paddr_t a_phys, vm_offset_t a_offs, + vm_paddr_t b_phys, vm_offset_t b_offs, int cnt) +{ + + mtx_lock(&cmtx); + *csrc_pte = L2_S_PROTO | a_phys | + L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | + L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); + PTE_SYNC(csrc_pte); + *cdst_pte = L2_S_PROTO | b_phys | + L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) | + L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); + PTE_SYNC(cdst_pte); + cpu_tlb_flushD_SE(csrcp); + cpu_tlb_flushD_SE(cdstp); + cpu_cpwait(); + bcopy((char *)csrcp + a_offs, (char *)cdstp + b_offs, cnt); + mtx_unlock(&cmtx); + xscale_cache_clean_minidata(); +} #endif /* ARM_MMU_XSCALE == 1 */ void @@ -4370,8 +4428,41 @@ pmap_copy_page(vm_page_t src, vm_page_t #endif } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + vm_page_t a_pg, b_pg; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; +#ifdef ARM_USE_SMALL_ALLOC + vm_offset_t a_va, b_va; +#endif - + cpu_dcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + while (xfersize > 0) { + a_pg = ma[a_offset >> PAGE_SHIFT]; + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + b_pg = mb[b_offset >> PAGE_SHIFT]; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); +#ifdef ARM_USE_SMALL_ALLOC + a_va = arm_ptovirt(VM_PAGE_TO_PHYS(a_pg)) + a_pg_offset; + b_va = arm_ptovirt(VM_PAGE_TO_PHYS(b_pg)) + b_pg_offset; + bcopy((char *)a_va, (char *)b_va, cnt); + cpu_dcache_wbinv_range(b_va, cnt); + cpu_l2cache_wbinv_range(b_va, cnt); +#else + pmap_copy_page_offs_func(VM_PAGE_TO_PHYS(a_pg), a_pg_offset, + VM_PAGE_TO_PHYS(b_pg), b_pg_offset, cnt); +#endif + xfersize -= cnt; + a_offset += cnt; + b_offset += cnt; + } +} /* * this routine returns true if a physical page resides Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/arm/include/pmap.h Thu Mar 14 20:18:12 2013 (r248280) @@ -533,6 +533,8 @@ extern pt_entry_t pte_l1_c_proto; extern pt_entry_t pte_l2_s_proto; extern void (*pmap_copy_page_func)(vm_paddr_t, vm_paddr_t); +extern void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys, + vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); extern void (*pmap_zero_page_func)(vm_paddr_t, int, int); #if (ARM_MMU_GENERIC + ARM_MMU_V6 + ARM_MMU_V7 + ARM_MMU_SA1) != 0 || defined(CPU_XSCALE_81342) Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/i386/i386/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -4238,6 +4238,49 @@ pmap_copy_page(vm_page_t src, vm_page_t mtx_unlock(&sysmaps->lock); } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + struct sysmaps *sysmaps; + vm_page_t a_pg, b_pg; + char *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; + mtx_lock(&sysmaps->lock); + if (*sysmaps->CMAP1 != 0) + panic("pmap_copy_pages: CMAP1 busy"); + if (*sysmaps->CMAP2 != 0) + panic("pmap_copy_pages: CMAP2 busy"); + sched_pin(); + while (xfersize > 0) { + invlpg((u_int)sysmaps->CADDR1); + invlpg((u_int)sysmaps->CADDR2); + a_pg = ma[a_offset >> PAGE_SHIFT]; + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + b_pg = mb[b_offset >> PAGE_SHIFT]; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + *sysmaps->CMAP1 = PG_V | VM_PAGE_TO_PHYS(a_pg) | PG_A | + pmap_cache_bits(b_pg->md.pat_mode, 0); + *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(b_pg) | PG_A | + PG_M | pmap_cache_bits(b_pg->md.pat_mode, 0); + a_cp = sysmaps->CADDR1 + a_pg_offset; + b_cp = sysmaps->CADDR2 + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } + *sysmaps->CMAP1 = 0; + *sysmaps->CMAP2 = 0; + sched_unpin(); + mtx_unlock(&sysmaps->lock); +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/i386/xen/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -3447,6 +3447,46 @@ pmap_copy_page(vm_page_t src, vm_page_t mtx_unlock(&sysmaps->lock); } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + struct sysmaps *sysmaps; + vm_page_t a_pg, b_pg; + char *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; + mtx_lock(&sysmaps->lock); + if (*sysmaps->CMAP1 != 0) + panic("pmap_copy_pages: CMAP1 busy"); + if (*sysmaps->CMAP2 != 0) + panic("pmap_copy_pages: CMAP2 busy"); + sched_pin(); + while (xfersize > 0) { + a_pg = ma[a_offset >> PAGE_SHIFT]; + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + b_pg = mb[b_offset >> PAGE_SHIFT]; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + PT_SET_MA(sysmaps->CADDR1, PG_V | VM_PAGE_TO_MACH(a_pg) | PG_A); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | + VM_PAGE_TO_MACH(b_pg) | PG_A | PG_M); + a_cp = sysmaps->CADDR1 + a_pg_offset; + b_cp = sysmaps->CADDR2 + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } + PT_SET_MA(sysmaps->CADDR1, 0); + PT_SET_MA(sysmaps->CADDR2, 0); + sched_unpin(); + mtx_unlock(&sysmaps->lock); +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/ia64/ia64/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -2014,6 +2014,30 @@ pmap_copy_page(vm_page_t msrc, vm_page_t bcopy(src, dst, PAGE_SIZE); } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + a_cp = (char *)pmap_page_to_va(ma[a_offset >> PAGE_SHIFT]) + + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + b_cp = (char *)pmap_page_to_va(mb[b_offset >> PAGE_SHIFT]) + + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/mips/mips/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -2576,6 +2576,51 @@ pmap_copy_page(vm_page_t src, vm_page_t } } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + char *a_cp, *b_cp; + vm_page_t a_m, b_m; + vm_offset_t a_pg_offset, b_pg_offset; + vm_paddr_t a_phys, b_phys; + int cnt; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + a_m = ma[a_offset >> PAGE_SHIFT]; + a_phys = VM_PAGE_TO_PHYS(a_m); + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + b_m = mb[b_offset >> PAGE_SHIFT]; + b_phys = VM_PAGE_TO_PHYS(b_m); + if (MIPS_DIRECT_MAPPABLE(a_phys) && + MIPS_DIRECT_MAPPABLE(b_phys)) { + pmap_flush_pvcache(a_m); + mips_dcache_wbinv_range_index( + MIPS_PHYS_TO_DIRECT(b_phys), PAGE_SIZE); + a_cp = (char *)MIPS_PHYS_TO_DIRECT(a_phys) + + a_pg_offset; + b_cp = (char *)MIPS_PHYS_TO_DIRECT(b_phys) + + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + mips_dcache_wbinv_range((vm_offset_t)b_cp, cnt); + } else { + a_cp = (char *)pmap_lmem_map2(a_phys, b_phys); + b_cp = (char *)a_cp + PAGE_SIZE; + a_cp += a_pg_offset; + b_cp += b_pg_offset; + bcopy(a_cp, b_cp, cnt); + mips_dcache_wbinv_range((vm_offset_t)b_cp, cnt); + pmap_lmem_unmap(); + } + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/powerpc/aim/mmu_oea.c Thu Mar 14 20:18:12 2013 (r248280) @@ -275,6 +275,8 @@ void moea_change_wiring(mmu_t, pmap_t, v void moea_clear_modify(mmu_t, vm_page_t); void moea_clear_reference(mmu_t, vm_page_t); void moea_copy_page(mmu_t, vm_page_t, vm_page_t); +void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize); void moea_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); void moea_enter_object(mmu_t, pmap_t, vm_offset_t, vm_offset_t, vm_page_t, vm_prot_t); @@ -320,6 +322,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_clear_modify, moea_clear_modify), MMUMETHOD(mmu_clear_reference, moea_clear_reference), MMUMETHOD(mmu_copy_page, moea_copy_page), + MMUMETHOD(mmu_copy_pages, moea_copy_pages), MMUMETHOD(mmu_enter, moea_enter), MMUMETHOD(mmu_enter_object, moea_enter_object), MMUMETHOD(mmu_enter_quick, moea_enter_quick), @@ -1043,6 +1046,30 @@ moea_copy_page(mmu_t mmu, vm_page_t msrc bcopy((void *)src, (void *)dst, PAGE_SIZE); } +void +moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + a_cp = (char *)VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT]) + + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + b_cp = (char *)VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT]) + + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } +} + /* * Zero a page of physical memory by temporarily mapping it into the tlb. */ Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Mar 14 20:18:12 2013 (r248280) @@ -290,6 +290,8 @@ void moea64_change_wiring(mmu_t, pmap_t, void moea64_clear_modify(mmu_t, vm_page_t); void moea64_clear_reference(mmu_t, vm_page_t); void moea64_copy_page(mmu_t, vm_page_t, vm_page_t); +void moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize); void moea64_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); void moea64_enter_object(mmu_t, pmap_t, vm_offset_t, vm_offset_t, vm_page_t, vm_prot_t); @@ -334,6 +336,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_clear_modify, moea64_clear_modify), MMUMETHOD(mmu_clear_reference, moea64_clear_reference), MMUMETHOD(mmu_copy_page, moea64_copy_page), + MMUMETHOD(mmu_copy_pages, moea64_copy_pages), MMUMETHOD(mmu_enter, moea64_enter), MMUMETHOD(mmu_enter_object, moea64_enter_object), MMUMETHOD(mmu_enter_quick, moea64_enter_quick), @@ -1104,6 +1107,72 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms } } +static inline void +moea64_copy_pages_dmap(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + a_cp = (char *)VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT]) + + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + b_cp = (char *)VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT]) + + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } +} + +static inline void +moea64_copy_pages_nodmap(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + mtx_lock(&moea64_scratchpage_mtx); + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + moea64_set_scratchpage_pa(mmu, 0, + VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT])); + a_cp = (char *)moea64_scratchpage_va[0] + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + moea64_set_scratchpage_pa(mmu, 1, + VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT])); + b_cp = (char *)moea64_scratchpage_va[1] + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } + mtx_unlock(&moea64_scratchpage_mtx); +} + +void +moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize) +{ + + if (hw_direct_map) { + moea64_copy_pages_dmap(mmu, ma, a_offset, mb, b_offset, + xfersize); + } else { + moea64_copy_pages_nodmap(mmu, ma, a_offset, mb, b_offset, + xfersize); + } +} + void moea64_zero_page_area(mmu_t mmu, vm_page_t m, int off, int size) { Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/powerpc/booke/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -274,6 +274,8 @@ static void mmu_booke_clear_reference(m static void mmu_booke_copy(mmu_t, pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); static void mmu_booke_copy_page(mmu_t, vm_page_t, vm_page_t); +static void mmu_booke_copy_pages(mmu_t, vm_page_t *, + vm_offset_t, vm_page_t *, vm_offset_t, int); static void mmu_booke_enter(mmu_t, pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t); static void mmu_booke_enter_object(mmu_t, pmap_t, vm_offset_t, vm_offset_t, @@ -334,6 +336,7 @@ static mmu_method_t mmu_booke_methods[] MMUMETHOD(mmu_clear_reference, mmu_booke_clear_reference), MMUMETHOD(mmu_copy, mmu_booke_copy), MMUMETHOD(mmu_copy_page, mmu_booke_copy_page), + MMUMETHOD(mmu_copy_pages, mmu_booke_copy_pages), MMUMETHOD(mmu_enter, mmu_booke_enter), MMUMETHOD(mmu_enter_object, mmu_booke_enter_object), MMUMETHOD(mmu_enter_quick, mmu_booke_enter_quick), @@ -2136,6 +2139,36 @@ mmu_booke_copy_page(mmu_t mmu, vm_page_t mtx_unlock(©_page_mutex); } +static inline void +mmu_booke_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, + vm_page_t *mb, vm_offset_t b_offset, int xfersize) +{ + void *a_cp, *b_cp; + vm_offset_t a_pg_offset, b_pg_offset; + int cnt; + + mtx_lock(©_page_mutex); + while (xfersize > 0) { + a_pg_offset = a_offset & PAGE_MASK; + cnt = min(xfersize, PAGE_SIZE - a_pg_offset); + mmu_booke_kenter(mmu, copy_page_src_va, + VM_PAGE_TO_PHYS(ma[a_offset >> PAGE_SHIFT])); + a_cp = (char *)copy_page_src_va + a_pg_offset; + b_pg_offset = b_offset & PAGE_MASK; + cnt = min(cnt, PAGE_SIZE - b_pg_offset); + mmu_booke_kenter(mmu, copy_page_dst_va, + VM_PAGE_TO_PHYS(mb[b_offset >> PAGE_SHIFT])); + b_cp = (char *)copy_page_dst_va + b_pg_offset; + bcopy(a_cp, b_cp, cnt); + mmu_booke_kremove(mmu, copy_page_dst_va); + mmu_booke_kremove(mmu, copy_page_src_va); + a_offset += cnt; + b_offset += cnt; + xfersize -= cnt; + } + mtx_unlock(©_page_mutex); +} + /* * mmu_booke_zero_page_idle zeros the specified hardware page by mapping it * into virtual memory and using bzero to clear its contents. This is intended Modified: head/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- head/sys/powerpc/powerpc/mmu_if.m Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/powerpc/powerpc/mmu_if.m Thu Mar 14 20:18:12 2013 (r248280) @@ -215,6 +215,14 @@ METHOD void copy_page { vm_page_t _dst; }; +METHOD void copy_pages { + mmu_t _mmu; + vm_page_t *_ma; + vm_offset_t _a_offset; + vm_page_t *_mb; + vm_offset_t _b_offset; + int _xfersize; +}; /** * @brief Create a mapping between a virtual/physical address pair in the Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Thu Mar 14 20:18:12 2013 (r248280) @@ -133,6 +133,16 @@ pmap_copy_page(vm_page_t src, vm_page_t } void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + + CTR6(KTR_PMAP, "%s(%p, %#x, %p, %#x, %#x)", __func__, ma, + a_offset, mb, b_offset, xfersize); + MMU_COPY_PAGES(mmu_obj, ma, a_offset, mb, b_offset, xfersize); +} + +void pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t p, vm_prot_t prot, boolean_t wired) { Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/sparc64/sparc64/pmap.c Thu Mar 14 20:18:12 2013 (r248280) @@ -1918,6 +1918,14 @@ pmap_copy_page(vm_page_t msrc, vm_page_t } } +void +pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], + vm_offset_t b_offset, int xfersize) +{ + + panic("pmap_copy_pages: not implemented"); +} + /* * Returns true if the pmap's pv is one of the first * 16 pvs linked to from this page. This count may Modified: head/sys/vm/pmap.h ============================================================================== --- head/sys/vm/pmap.h Thu Mar 14 20:05:49 2013 (r248279) +++ head/sys/vm/pmap.h Thu Mar 14 20:18:12 2013 (r248280) @@ -108,6 +108,8 @@ void pmap_clear_modify(vm_page_t m); void pmap_clear_reference(vm_page_t m); void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); void pmap_copy_page(vm_page_t, vm_page_t); +void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, + vm_page_t mb[], vm_offset_t b_offset, int xfersize); void pmap_enter(pmap_t, vm_offset_t, vm_prot_t, vm_page_t, vm_prot_t, boolean_t); void pmap_enter_object(pmap_t pmap, vm_offset_t start, From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 20:22:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B8B70AEA; Thu, 14 Mar 2013 20:22:52 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AB00B986; Thu, 14 Mar 2013 20:22:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EKMqcf006618; Thu, 14 Mar 2013 20:22:52 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EKMqMh006617; Thu, 14 Mar 2013 20:22:52 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142022.r2EKMqMh006617@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 20:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248281 - head/lib/libutil 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.14 Precedence: list List-Id: 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, 14 Mar 2013 20:22:52 -0000 Author: pjd Date: Thu Mar 14 20:22:52 2013 New Revision: 248281 URL: http://svnweb.freebsd.org/changeset/base/248281 Log: When pidptr was passed as NULL to pidfile_open(3), we were returning EAGAIN/EWOULDBLOCK when another daemon was running and had the pidfile open. We should return EEXIST in that case, fix it. Reported by: Dirk Engling Reviewed by: jhb, Dirk Engling MFC after: 1 week Modified: head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Thu Mar 14 20:18:12 2013 (r248280) +++ head/lib/libutil/pidfile.c Thu Mar 14 20:22:52 2013 (r248281) @@ -126,20 +126,25 @@ pidfile_open(const char *path, mode_t mo fd = flopen(pfh->pf_path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); if (fd == -1) { - if (errno == EWOULDBLOCK && pidptr != NULL) { - count = 20; - rqtp.tv_sec = 0; - rqtp.tv_nsec = 5000000; - for (;;) { - errno = pidfile_read(pfh->pf_path, pidptr); - if (errno != EAGAIN || --count == 0) - break; - nanosleep(&rqtp, 0); - } - if (errno == EAGAIN) - *pidptr = -1; - if (errno == 0 || errno == EAGAIN) + if (errno == EWOULDBLOCK) { + if (pidptr == NULL) { errno = EEXIST; + } else { + count = 20; + rqtp.tv_sec = 0; + rqtp.tv_nsec = 5000000; + for (;;) { + errno = pidfile_read(pfh->pf_path, + pidptr); + if (errno != EAGAIN || --count == 0) + break; + nanosleep(&rqtp, 0); + } + if (errno == EAGAIN) + *pidptr = -1; + if (errno == 0 || errno == EAGAIN) + errno = EEXIST; + } } free(pfh); return (NULL); From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 20:28:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 406DFE53; Thu, 14 Mar 2013 20:28:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 323599B7; Thu, 14 Mar 2013 20:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EKSTZT007538; Thu, 14 Mar 2013 20:28:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EKSRqQ007526; Thu, 14 Mar 2013 20:28:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303142028.r2EKSRqQ007526@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 Mar 2013 20:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248282 - in head/sys: fs/cd9660 fs/ext2fs fs/msdosfs fs/udf kern sys ufs/ffs 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.14 Precedence: list List-Id: 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, 14 Mar 2013 20:28:29 -0000 Author: kib Date: Thu Mar 14 20:28:26 2013 New Revision: 248282 URL: http://svnweb.freebsd.org/changeset/base/248282 Log: Add currently unused flag argument to the cluster_read(), cluster_write() and cluster_wbuild() functions. The flags to be allowed are a subset of the GB_* flags for getblk(). Sponsored by: The FreeBSD Foundation Tested by: pho Modified: head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/ext2fs/ext2_balloc.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/udf/udf_vnops.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/sys/buf.h head/sys/ufs/ffs/ffs_balloc.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/fs/cd9660/cd9660_vnops.c Thu Mar 14 20:28:26 2013 (r248282) @@ -329,7 +329,7 @@ cd9660_read(ap) if (lblktosize(imp, rablock) < ip->i_size) error = cluster_read(vp, (off_t)ip->i_size, lbn, size, NOCRED, uio->uio_resid, - (ap->a_ioflag >> 16), &bp); + (ap->a_ioflag >> 16), 0, &bp); else error = bread(vp, lbn, size, NOCRED, &bp); } else { Modified: head/sys/fs/ext2fs/ext2_balloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_balloc.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/fs/ext2fs/ext2_balloc.c Thu Mar 14 20:28:26 2013 (r248282) @@ -276,7 +276,7 @@ ext2_balloc(struct inode *ip, int32_t lb if (seqcount && (vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, ip->i_size, lbn, (int)fs->e2fs_bsize, NOCRED, - MAXBSIZE, seqcount, &nbp); + MAXBSIZE, seqcount, 0, &nbp); } else { error = bread(vp, lbn, (int)fs->e2fs_bsize, NOCRED, &nbp); } Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/fs/ext2fs/ext2_vnops.c Thu Mar 14 20:28:26 2013 (r248282) @@ -1618,10 +1618,11 @@ ext2_read(struct vop_read_args *ap) if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); - else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) + else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, ip->i_size, lbn, size, - NOCRED, blkoffset + uio->uio_resid, seqcount, &bp); - else if (seqcount > 1) { + NOCRED, blkoffset + uio->uio_resid, seqcount, + 0, &bp); + } else if (seqcount > 1) { int nextsize = blksize(fs, ip, nextlbn); error = breadn(vp, lbn, size, &nextlbn, &nextsize, 1, NOCRED, &bp); @@ -1831,7 +1832,7 @@ ext2_write(struct vop_write_args *ap) } else if (xfersize + blkoffset == fs->e2fs_fsize) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; - cluster_write(vp, bp, ip->i_size, seqcount); + cluster_write(vp, bp, ip->i_size, seqcount, 0); } else { bawrite(bp); } Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Thu Mar 14 20:28:26 2013 (r248282) @@ -600,7 +600,7 @@ msdosfs_read(ap) error = bread(vp, lbn, blsize, NOCRED, &bp); } else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, dep->de_FileSize, lbn, blsize, - NOCRED, on + uio->uio_resid, seqcount, &bp); + NOCRED, on + uio->uio_resid, seqcount, 0, &bp); } else if (seqcount > 1) { rasize = blsize; error = breadn(vp, lbn, @@ -820,7 +820,7 @@ msdosfs_write(ap) else if (n + croffset == pmp->pm_bpcluster) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) cluster_write(vp, bp, dep->de_FileSize, - seqcount); + seqcount, 0); else bawrite(bp); } else Modified: head/sys/fs/udf/udf_vnops.c ============================================================================== --- head/sys/fs/udf/udf_vnops.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/fs/udf/udf_vnops.c Thu Mar 14 20:28:26 2013 (r248282) @@ -478,8 +478,9 @@ udf_read(struct vop_read_args *ap) rablock = lbn + 1; if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { if (lblktosize(udfmp, rablock) < fsize) { - error = cluster_read(vp, fsize, lbn, size, NOCRED, - uio->uio_resid, (ap->a_ioflag >> 16), &bp); + error = cluster_read(vp, fsize, lbn, size, + NOCRED, uio->uio_resid, + (ap->a_ioflag >> 16), 0, &bp); } else { error = bread(vp, lbn, size, NOCRED, &bp); } Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/kern/vfs_bio.c Thu Mar 14 20:28:26 2013 (r248282) @@ -1794,8 +1794,9 @@ vfs_bio_awrite(struct buf *bp) */ if (ncl != 1) { BUF_UNLOCK(bp); - nwritten = cluster_wbuild(vp, size, lblkno - j, ncl); - return nwritten; + nwritten = cluster_wbuild(vp, size, lblkno - j, ncl, + 0); + return (nwritten); } } bremfree(bp); Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/kern/vfs_cluster.c Thu Mar 14 20:28:26 2013 (r248282) @@ -84,15 +84,9 @@ extern vm_page_t bogus_page; * cluster_read replaces bread. */ int -cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp) - struct vnode *vp; - u_quad_t filesize; - daddr_t lblkno; - long size; - struct ucred *cred; - long totread; - int seqcount; - struct buf **bpp; +cluster_read(struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size, + struct ucred *cred, long totread, int seqcount, int gbflags, + struct buf **bpp) { struct buf *bp, *rbp, *reqbp; struct bufobj *bo; @@ -576,7 +570,7 @@ cluster_wbuild_wb(struct vnode *vp, long start_lbn -= len; /* FALLTHROUGH */ case 1: - r = cluster_wbuild(vp, size, start_lbn, len); + r = cluster_wbuild(vp, size, start_lbn, len, 0); /* FALLTHROUGH */ default: /* FALLTHROUGH */ @@ -596,7 +590,8 @@ cluster_wbuild_wb(struct vnode *vp, long * 4. end of a cluster - asynchronously write cluster */ void -cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount) +cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, + int gbflags) { daddr_t lbn; int maxclen, cursize; @@ -742,11 +737,8 @@ cluster_write(struct vnode *vp, struct b * the current block (if last_bp == NULL). */ int -cluster_wbuild(vp, size, start_lbn, len) - struct vnode *vp; - long size; - daddr_t start_lbn; - int len; +cluster_wbuild(struct vnode *vp, long size, daddr_t start_lbn, int len, + int gbflags) { struct buf *bp, *tbp; struct bufobj *bo; Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/sys/buf.h Thu Mar 14 20:28:26 2013 (r248282) @@ -508,9 +508,9 @@ void bufdone_finish(struct buf *); void bd_speedup(void); int cluster_read(struct vnode *, u_quad_t, daddr_t, long, - struct ucred *, long, int, struct buf **); -int cluster_wbuild(struct vnode *, long, daddr_t, int); -void cluster_write(struct vnode *, struct buf *, u_quad_t, int); + struct ucred *, long, int, int, struct buf **); +int cluster_wbuild(struct vnode *, long, daddr_t, int, int); +void cluster_write(struct vnode *, struct buf *, u_quad_t, int, int); void vfs_bio_set_valid(struct buf *, int base, int size); void vfs_bio_clrbuf(struct buf *); void vfs_busy_pages(struct buf *, int clear_modify); Modified: head/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_balloc.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/ufs/ffs/ffs_balloc.c Thu Mar 14 20:28:26 2013 (r248282) @@ -418,7 +418,7 @@ retry: if (seqcount && (vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, ip->i_size, lbn, (int)fs->fs_bsize, NOCRED, - MAXBSIZE, seqcount, &nbp); + MAXBSIZE, seqcount, 0, &nbp); } else { error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp); } @@ -966,7 +966,7 @@ retry: if (seqcount && (vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { error = cluster_read(vp, ip->i_size, lbn, (int)fs->fs_bsize, NOCRED, - MAXBSIZE, seqcount, &nbp); + MAXBSIZE, seqcount, 0, &nbp); } else { error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp); } Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Thu Mar 14 20:22:52 2013 (r248281) +++ head/sys/ufs/ffs/ffs_vnops.c Thu Mar 14 20:28:26 2013 (r248282) @@ -519,7 +519,8 @@ ffs_read(ap) * doing sequential access. */ error = cluster_read(vp, ip->i_size, lbn, - size, NOCRED, blkoffset + uio->uio_resid, seqcount, &bp); + size, NOCRED, blkoffset + uio->uio_resid, + seqcount, 0, &bp); } else if (seqcount > 1) { /* * If we are NOT allowed to cluster, then @@ -784,7 +785,8 @@ ffs_write(ap) } else if (xfersize + blkoffset == fs->fs_bsize) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; - cluster_write(vp, bp, ip->i_size, seqcount); + cluster_write(vp, bp, ip->i_size, seqcount, + 0); } else { bawrite(bp); } From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 20:31:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B3B6F98; Thu, 14 Mar 2013 20:31:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A15749DB; Thu, 14 Mar 2013 20:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EKVeMo009616; Thu, 14 Mar 2013 20:31:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EKVdn7009612; Thu, 14 Mar 2013 20:31:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303142031.r2EKVdn7009612@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 Mar 2013 20:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248283 - in head/sys: kern ufs/ffs 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.14 Precedence: list List-Id: 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, 14 Mar 2013 20:31:40 -0000 Author: kib Date: Thu Mar 14 20:31:39 2013 New Revision: 248283 URL: http://svnweb.freebsd.org/changeset/base/248283 Log: Some style fixes. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/ufs/ffs/ffs_balloc.c head/sys/vm/vnode_pager.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Mar 14 20:28:26 2013 (r248282) +++ head/sys/kern/vfs_bio.c Thu Mar 14 20:31:39 2013 (r248283) @@ -830,9 +830,8 @@ breada(struct vnode * vp, daddr_t * rabl * getblk(). Also starts asynchronous I/O on read-ahead blocks. */ int -breadn_flags(struct vnode * vp, daddr_t blkno, int size, - daddr_t * rablkno, int *rabsize, int cnt, - struct ucred * cred, int flags, struct buf **bpp) +breadn_flags(struct vnode *vp, daddr_t blkno, int size, daddr_t *rablkno, + int *rabsize, int cnt, struct ucred *cred, int flags, struct buf **bpp) { struct buf *bp; int rv = 0, readwait = 0; @@ -1809,7 +1808,7 @@ vfs_bio_awrite(struct buf *bp) nwritten = bp->b_bufsize; (void) bwrite(bp); - return nwritten; + return (nwritten); } /* @@ -2631,7 +2630,7 @@ vfs_setdirty_locked_object(struct buf *b * prior to issuing the READ. biodone() will *not* clear B_INVAL. */ struct buf * -getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo, +getblk(struct vnode *vp, daddr_t blkno, int size, int slpflag, int slptimeo, int flags) { struct buf *bp; @@ -2709,9 +2708,8 @@ loop: } /* - * check for size inconsistancies for non-VMIO case. + * check for size inconsistencies for non-VMIO case. */ - if (bp->b_bcount != size) { if ((bp->b_flags & B_VMIO) == 0 || (size > bp->b_kvasize)) { Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Thu Mar 14 20:28:26 2013 (r248282) +++ head/sys/kern/vfs_cluster.c Thu Mar 14 20:31:39 2013 (r248283) @@ -563,7 +563,7 @@ cluster_wbuild_wb(struct vnode *vp, long { int r = 0; - switch(write_behind) { + switch (write_behind) { case 2: if (start_lbn < len) break; Modified: head/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_balloc.c Thu Mar 14 20:28:26 2013 (r248282) +++ head/sys/ufs/ffs/ffs_balloc.c Thu Mar 14 20:31:39 2013 (r248283) @@ -679,9 +679,9 @@ ffs_balloc_ufs2(struct vnode *vp, off_t if (osize < fs->fs_bsize && osize > 0) { UFS_LOCK(ump); error = ffs_realloccg(ip, nb, dp->di_db[nb], - ffs_blkpref_ufs2(ip, lastlbn, (int)nb, - &dp->di_db[0]), osize, (int)fs->fs_bsize, - flags, cred, &bp); + ffs_blkpref_ufs2(ip, lastlbn, (int)nb, + &dp->di_db[0]), osize, (int)fs->fs_bsize, + flags, cred, &bp); if (error) return (error); if (DOINGSOFTDEP(vp)) @@ -733,7 +733,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t UFS_LOCK(ump); error = ffs_realloccg(ip, lbn, dp->di_db[lbn], ffs_blkpref_ufs2(ip, lbn, (int)lbn, - &dp->di_db[0]), osize, nsize, flags, + &dp->di_db[0]), osize, nsize, flags, cred, &bp); if (error) return (error); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Thu Mar 14 20:28:26 2013 (r248282) +++ head/sys/vm/vnode_pager.c Thu Mar 14 20:31:39 2013 (r248283) @@ -900,7 +900,7 @@ vnode_pager_generic_getpages(vp, m, byte } bp = getpbuf(&vnode_pbuf_freecnt); - kva = (vm_offset_t) bp->b_data; + kva = (vm_offset_t)bp->b_data; /* * and map the pages to be read into the kva From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 21:20:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 46078DA9; Thu, 14 Mar 2013 21:20:47 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C0A7C37; Thu, 14 Mar 2013 21:20:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ELKkxw024956; Thu, 14 Mar 2013 21:20:47 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ELKk8R024955; Thu, 14 Mar 2013 21:20:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303142120.r2ELKk8R024955@svn.freebsd.org> From: Joel Dahl Date: Thu, 14 Mar 2013 21:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248285 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 21:20:47 -0000 Author: joel (doc committer) Date: Thu Mar 14 21:20:46 2013 New Revision: 248285 URL: http://svnweb.freebsd.org/changeset/base/248285 Log: Add FreeBSD 9.1. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Thu Mar 14 21:18:19 2013 (r248284) +++ head/share/misc/bsd-family-tree Thu Mar 14 21:20:46 2013 (r248285) @@ -252,12 +252,14 @@ FreeBSD 5.2 | | | | | | OpenBSD 5.0 | *--FreeBSD | | | | | | 9.0 | | | | DragonFly 3.0.1 - | v FreeBSD | | | | - | 8.3 | | OpenBSD 5.1 | - | Mac OS X | | | - | 10.8 | | | - | | NetBSD 6.0 | | - | | | OpenBSD 5.2 DragonFly 3.2.1 + | | FreeBSD | | | | + | | 8.3 | | OpenBSD 5.1 | + | | Mac OS X | | | + | | 10.8 | | | + | | | NetBSD 6.0 | | + | | | | OpenBSD 5.2 DragonFly 3.2.1 + | FreeBSD | | | | + | 9.1 | | | | | | | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | | | | | | @@ -555,6 +557,7 @@ Mac OS X 10.8 2012-07-25 [APL] NetBSD 6.0 2012-10-17 [NBD] OpenBSD 5.2 2012-11-01 [OBD] DragonFly 3.2.1 2012-11-02 [DFB] +FreeBSD 9.1 2012-12-30 [FBD] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 21:21:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8311CF17; Thu, 14 Mar 2013 21:21:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7316BC3F; Thu, 14 Mar 2013 21:21:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ELLFnu025082; Thu, 14 Mar 2013 21:21:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ELLFgc025081; Thu, 14 Mar 2013 21:21:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142121.r2ELLFgc025081@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 21:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248286 - head/sbin/hastctl 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.14 Precedence: list List-Id: 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, 14 Mar 2013 21:21:15 -0000 Author: pjd Date: Thu Mar 14 21:21:14 2013 New Revision: 248286 URL: http://svnweb.freebsd.org/changeset/base/248286 Log: Removed redundant includes. Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Thu Mar 14 21:20:46 2013 (r248285) +++ head/sbin/hastctl/hastctl.c Thu Mar 14 21:21:14 2013 (r248286) @@ -31,21 +31,11 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include #include -#include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 22:16:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D0B93F7F; Thu, 14 Mar 2013 22:16:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B7C07EC0; Thu, 14 Mar 2013 22:16:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EMGDh3041510; Thu, 14 Mar 2013 22:16:13 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EMGDuj041509; Thu, 14 Mar 2013 22:16:13 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201303142216.r2EMGDuj041509@svn.freebsd.org> From: Brooks Davis Date: Thu, 14 Mar 2013 22:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248290 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 22:16:13 -0000 Author: brooks Date: Thu Mar 14 22:16:13 2013 New Revision: 248290 URL: http://svnweb.freebsd.org/changeset/base/248290 Log: FDT_DTS_FILE is expanded in a Makefile so use :R to remove the suffix rather than using echo|cut to remove everything after the first '.'. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Mar 14 22:04:53 2013 (r248289) +++ head/sys/conf/files Thu Mar 14 22:16:13 2013 (r248290) @@ -55,9 +55,9 @@ aic79xx_reg_print.o optional ahd pci ah # from the specified source (DTS) file: .dts -> .dtb # fdt_dtb_file optional fdt \ - compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O dtb -o `echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 -p 1024 $S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \ + compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O dtb -o ${FDT_DTS_FILE:R}.dtb -b 0 -p 1024 $S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \ no-obj no-implicit-rule before-depend \ - clean "`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb" + clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \ no-obj no-implicit-rule before-depend \ From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 22:29:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8C6A721A; Thu, 14 Mar 2013 22:29:38 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E3CDF24; Thu, 14 Mar 2013 22:29:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EMTc9q044844; Thu, 14 Mar 2013 22:29:38 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EMTcwG044842; Thu, 14 Mar 2013 22:29:38 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201303142229.r2EMTcwG044842@svn.freebsd.org> From: Dmitry Morozovsky Date: Thu, 14 Mar 2013 22:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248291 - head/sbin/hastctl 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.14 Precedence: list List-Id: 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, 14 Mar 2013 22:29:38 -0000 Author: marck (doc committer) Date: Thu Mar 14 22:29:37 2013 New Revision: 248291 URL: http://svnweb.freebsd.org/changeset/base/248291 Log: Rename 'status' command to 'list' and introduce new 'status' which produces more terse output more observable for both scripts and humans. Also, it shifts hastctl closer to GEOM utilities with their list/status command pairs. Approved by: pjd MFC after: 4 weeks Modified: head/sbin/hastctl/hastctl.8 head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.8 ============================================================================== --- head/sbin/hastctl/hastctl.8 Thu Mar 14 22:16:13 2013 (r248290) +++ head/sbin/hastctl/hastctl.8 Thu Mar 14 22:29:37 2013 (r248291) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2011 +.Dd March 14, 2013 .Dt HASTCTL 8 .Os .Sh NAME @@ -49,6 +49,11 @@ .Aq init | primary | secondary .Ar all | name ... .Nm +.Cm list +.Op Fl d +.Op Fl c Ar config +.Op Ar all | name ... +.Nm .Cm status .Op Fl d .Op Fl c Ar config @@ -139,8 +144,11 @@ GEOM provider .Pa /dev/hast/ will not be created on secondary node. .El +.It Cm list +Present verbose status of the configured resources. .It Cm status -Present status of the configured resources. +Present terse (and more easy machine-parseable) status of the configured +resources. .It Cm dump Dump metadata stored on local component for the configured resources. .El Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Thu Mar 14 22:16:13 2013 (r248290) +++ head/sbin/hastctl/hastctl.c Thu Mar 14 22:29:37 2013 (r248291) @@ -60,7 +60,8 @@ enum { CMD_CREATE, CMD_ROLE, CMD_STATUS, - CMD_DUMP + CMD_DUMP, + CMD_LIST }; static __dead2 void @@ -75,6 +76,9 @@ usage(void) " %s role [-d] [-c config] all | name ...\n", getprogname()); fprintf(stderr, + " %s list [-d] [-c config] [all | name ...]\n", + getprogname()); + fprintf(stderr, " %s status [-d] [-c config] [all | name ...]\n", getprogname()); fprintf(stderr, @@ -287,7 +291,7 @@ control_set_role(struct nv *nv, const ch } static int -control_status(struct nv *nv) +control_list(struct nv *nv) { unsigned int ii; const char *str; @@ -351,6 +355,43 @@ control_status(struct nv *nv) return (ret); } +static int +control_status(struct nv *nv) +{ + unsigned int ii; + const char *str; + int error, hprinted, ret; + + hprinted = 0; + ret = 0; + + for (ii = 0; ; ii++) { + str = nv_get_string(nv, "resource%u", ii); + if (str == NULL) + break; + if (!hprinted) { + printf("Name\tStatus\t Role\t\tComponents\n"); + hprinted = 1; + } + printf("%s\t", str); + error = nv_get_int16(nv, "error%u", ii); + if (error != 0) { + if (ret == 0) + ret = error; + printf("ERR%d\n", error); + continue; + } + str = nv_get_string(nv, "status%u", ii); + printf("%-9s", (str != NULL) ? str : "-"); + printf("%-15s", nv_get_string(nv, "role%u", ii)); + printf("%s\t", + nv_get_string(nv, "localpath%u", ii)); + printf("%s\n", + nv_get_string(nv, "remoteaddr%u", ii)); + } + return (ret); +} + int main(int argc, char *argv[]) { @@ -371,6 +412,9 @@ main(int argc, char *argv[]) } else if (strcmp(argv[1], "role") == 0) { cmd = CMD_ROLE; optstr = "c:dh"; + } else if (strcmp(argv[1], "list") == 0) { + cmd = CMD_LIST; + optstr = "c:dh"; } else if (strcmp(argv[1], "status") == 0) { cmd = CMD_STATUS; optstr = "c:dh"; @@ -459,8 +503,19 @@ main(int argc, char *argv[]) for (ii = 0; ii < argc - 1; ii++) nv_add_string(nv, argv[ii + 1], "resource%d", ii); break; + case CMD_LIST: + /* Obtain verbose status of the given resources. */ + nv = nv_alloc(); + nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); + if (argc == 0) + nv_add_string(nv, "all", "resource%d", 0); + else { + for (ii = 0; ii < argc; ii++) + nv_add_string(nv, argv[ii], "resource%d", ii); + } + break; case CMD_STATUS: - /* Obtain status of the given resources. */ + /* Obtain brief status of the given resources. */ nv = nv_alloc(); nv_add_uint8(nv, HASTCTL_CMD_STATUS, "cmd"); if (argc == 0) @@ -514,6 +569,9 @@ main(int argc, char *argv[]) case CMD_ROLE: error = control_set_role(nv, argv[0]); break; + case CMD_LIST: + error = control_list(nv); + break; case CMD_STATUS: error = control_status(nv); break; From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:03:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1EBD9C9B; Thu, 14 Mar 2013 23:03:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EEF97105; Thu, 14 Mar 2013 23:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EN3m2O056250; Thu, 14 Mar 2013 23:03:48 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EN3miE056249; Thu, 14 Mar 2013 23:03:48 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142303.r2EN3miE056249@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 23:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248294 - head/sbin/hastd 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:03:49 -0000 Author: pjd Date: Thu Mar 14 23:03:48 2013 New Revision: 248294 URL: http://svnweb.freebsd.org/changeset/base/248294 Log: Delete requests can be larger than MAXPHYS. Modified: head/sbin/hastd/secondary.c Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Thu Mar 14 22:57:27 2013 (r248293) +++ head/sbin/hastd/secondary.c Thu Mar 14 23:03:48 2013 (r248294) @@ -582,7 +582,7 @@ requnpack(struct hast_resource *res, str hio->hio_error = EINVAL; goto end; } - if (hio->hio_length > MAXPHYS) { + if (hio->hio_cmd != HIO_DELETE && hio->hio_length > MAXPHYS) { pjdlog_error("Data length is too large (%ju > %ju).", (uintmax_t)hio->hio_length, (uintmax_t)MAXPHYS); hio->hio_error = EINVAL; From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:07:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1CC1E1E; Thu, 14 Mar 2013 23:07:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D4719118; Thu, 14 Mar 2013 23:07:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2EN71o4056853; Thu, 14 Mar 2013 23:07:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2EN71iF056852; Thu, 14 Mar 2013 23:07:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142307.r2EN71iF056852@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 23:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248295 - head/sys/geom/gate 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:07:02 -0000 Author: pjd Date: Thu Mar 14 23:07:01 2013 New Revision: 248295 URL: http://svnweb.freebsd.org/changeset/base/248295 Log: We don't need buffer to handle BIO_DELETE, so don't check buffer size for it. This fixes handling BIO_DELETE larger than MAXPHYS. Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Thu Mar 14 23:03:48 2013 (r248294) +++ head/sys/geom/gate/g_gate.c Thu Mar 14 23:07:01 2013 (r248295) @@ -813,7 +813,7 @@ g_gate_ioctl(struct cdev *dev, u_long cm } } ggio->gctl_cmd = bp->bio_cmd; - if ((bp->bio_cmd == BIO_DELETE || bp->bio_cmd == BIO_WRITE) && + if (bp->bio_cmd == BIO_WRITE && bp->bio_length > ggio->gctl_length) { mtx_unlock(&sc->sc_queue_mtx); ggio->gctl_length = bp->bio_length; From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:11:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 79616215; Thu, 14 Mar 2013 23:11:53 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 552F5141; Thu, 14 Mar 2013 23:11:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ENBrew059317; Thu, 14 Mar 2013 23:11:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ENBrC0059316; Thu, 14 Mar 2013 23:11:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142311.r2ENBrC0059316@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 23:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248296 - head/sbin/hastd 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:11:53 -0000 Author: pjd Date: Thu Mar 14 23:11:52 2013 New Revision: 248296 URL: http://svnweb.freebsd.org/changeset/base/248296 Log: Minor corrections. Modified: head/sbin/hastd/hastd.8 Modified: head/sbin/hastd/hastd.8 ============================================================================== --- head/sbin/hastd/hastd.8 Thu Mar 14 23:07:01 2013 (r248295) +++ head/sbin/hastd/hastd.8 Thu Mar 14 23:11:52 2013 (r248296) @@ -51,7 +51,7 @@ Only one machine (cluster node) can acti This machine is called primary. The .Nm -daemon operates on block level, which makes it transparent for file +daemon operates on block level, which makes it transparent to file systems and applications. .Pp There is one main @@ -68,7 +68,7 @@ The exact format is: hastd: () .Ed .Pp -When (and only when) +If (and only if) .Nm operates in primary role for the given resource, corresponding .Pa /dev/hast/ @@ -77,8 +77,8 @@ File systems and applications can use th requests to. Every write, delete and flush operation .Dv ( BIO_WRITE , BIO_DELETE , BIO_FLUSH ) -is send to local component and synchronously replicated -to the remote (secondary) node if it is available. +is send to local component and replicated to the remote (secondary) node if it +is available. Read operations .Dv ( BIO_READ ) are handled locally unless I/O error occurs or local version of the data From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:14: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]) by hub.freebsd.org (Postfix) with ESMTP id 1B81B46F; Thu, 14 Mar 2013 23:14:48 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F3144166; Thu, 14 Mar 2013 23:14:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ENElxw059891; Thu, 14 Mar 2013 23:14:47 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ENElAc059890; Thu, 14 Mar 2013 23:14:47 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303142314.r2ENElAc059890@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Mar 2013 23:14:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248297 - head/sbin/hastd 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:14:48 -0000 Author: pjd Date: Thu Mar 14 23:14:47 2013 New Revision: 248297 URL: http://svnweb.freebsd.org/changeset/base/248297 Log: Now that ioctl(2) is allowed in capability mode and we can limit ioctls for the given descriptors, use Capsicum sandboxing for hastd in primary and secondary modes. Allow for DIOCGDELETE and DIOCGFLUSH ioctls on provider descriptor and for G_GATE_CMD_MODIFY, G_GATE_CMD_START, G_GATE_CMD_DONE and G_GATE_CMD_DESTROY on GEOM Gate descriptor. Sponsored by: The FreeBSD Foundation Modified: head/sbin/hastd/subr.c Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Thu Mar 14 23:11:52 2013 (r248296) +++ head/sbin/hastd/subr.c Thu Mar 14 23:14:47 2013 (r248297) @@ -31,14 +31,15 @@ #include __FBSDID("$FreeBSD$"); -#ifdef HAVE_CAPSICUM -#include -#endif #include #include #include #include #include +#ifdef HAVE_CAPSICUM +#include +#include +#endif #include #include @@ -224,22 +225,53 @@ drop_privs(const struct hast_resource *r return (-1); } - /* - * Until capsicum doesn't allow ioctl(2) we cannot use it to sandbox - * primary and secondary worker processes, as primary uses GGATE - * ioctls and secondary uses ioctls to handle BIO_DELETE and BIO_FLUSH. - * For now capsicum is only used to sandbox hastctl. - */ #ifdef HAVE_CAPSICUM - if (res == NULL) { - capsicum = (cap_enter() == 0); - if (!capsicum) { - pjdlog_common(LOG_DEBUG, 1, errno, - "Unable to sandbox using capsicum"); + capsicum = (cap_enter() == 0); + if (!capsicum) { + pjdlog_common(LOG_DEBUG, 1, errno, + "Unable to sandbox using capsicum"); + } else if (res != NULL) { + static const unsigned long geomcmds[] = { + DIOCGDELETE, + DIOCGFLUSH + }; + + PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY || + res->hr_role == HAST_ROLE_SECONDARY); + + if (cap_rights_limit(res->hr_localfd, + CAP_FLOCK | CAP_IOCTL | CAP_PREAD | CAP_PWRITE) == -1) { + pjdlog_errno(LOG_ERR, + "Unable to limit capability rights on local descriptor"); + } + if (cap_ioctls_limit(res->hr_localfd, geomcmds, + sizeof(geomcmds) / sizeof(geomcmds[0])) == -1) { + pjdlog_errno(LOG_ERR, + "Unable to limit allowed GEOM ioctls"); + } + + if (res->hr_role == HAST_ROLE_PRIMARY) { + static const unsigned long ggatecmds[] = { + G_GATE_CMD_MODIFY, + G_GATE_CMD_START, + G_GATE_CMD_DONE, + G_GATE_CMD_DESTROY + }; + + if (cap_rights_limit(res->hr_ggatefd, CAP_IOCTL) == -1) { + pjdlog_errno(LOG_ERR, + "Unable to limit capability rights to CAP_IOCTL on ggate descriptor"); + } + if (cap_ioctls_limit(res->hr_ggatefd, ggatecmds, + sizeof(ggatecmds) / sizeof(ggatecmds[0])) == -1) { + pjdlog_errno(LOG_ERR, + "Unable to limit allowed ggate ioctls"); + } } - } else + } +#else + capsicum = false; #endif - capsicum = false; /* * Better be sure that everything succeeded. From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:20:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 55735737; Thu, 14 Mar 2013 23:20:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 480201A6; Thu, 14 Mar 2013 23:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ENKJg2060776; Thu, 14 Mar 2013 23:20:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ENKJln060775; Thu, 14 Mar 2013 23:20:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201303142320.r2ENKJln060775@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 14 Mar 2013 23:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248298 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:20:19 -0000 Author: trasz Date: Thu Mar 14 23:20:18 2013 New Revision: 248298 URL: http://svnweb.freebsd.org/changeset/base/248298 Log: Accessing td_state requires thread lock to be held. Submitted by: Rudo Tomori Reviewed by: kib Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu Mar 14 23:14:47 2013 (r248297) +++ head/sys/kern/kern_racct.c Thu Mar 14 23:20:18 2013 (r248298) @@ -1033,6 +1033,7 @@ racct_proc_throttle(struct proc *p) p->p_throttled = 1; FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); switch (td->td_state) { case TDS_RUNQ: /* @@ -1041,27 +1042,24 @@ racct_proc_throttle(struct proc *p) * TDF_NEEDRESCHED for the thread, so that once it is * running, it is taken off the cpu as soon as possible. */ - thread_lock(td); td->td_flags |= TDF_NEEDRESCHED; - thread_unlock(td); break; case TDS_RUNNING: /* * If the thread is running, we request a context * switch for it by setting the TDF_NEEDRESCHED flag. */ - thread_lock(td); td->td_flags |= TDF_NEEDRESCHED; #ifdef SMP cpuid = td->td_oncpu; if ((cpuid != NOCPU) && (td != curthread)) ipi_cpu(cpuid, IPI_AST); #endif - thread_unlock(td); break; default: break; } + thread_unlock(td); } } From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:25:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CA0BDB53; Thu, 14 Mar 2013 23:25:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B7C6F1DC; Thu, 14 Mar 2013 23:25:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ENPgpt063124; Thu, 14 Mar 2013 23:25:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ENPgeH063123; Thu, 14 Mar 2013 23:25:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201303142325.r2ENPgeH063123@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 14 Mar 2013 23:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248300 - 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:25:42 -0000 Author: trasz Date: Thu Mar 14 23:25:42 2013 New Revision: 248300 URL: http://svnweb.freebsd.org/changeset/base/248300 Log: When throttling a process to enforce RACCT limits, do not use neither PBDRY (which simply doesn't make any sense) nor PCATCH (which could be used by a malicious process to work around the PCPU limit). Submitted by: Rudo Tomori Reviewed by: kib Modified: head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Thu Mar 14 23:25:01 2013 (r248299) +++ head/sys/kern/subr_trap.c Thu Mar 14 23:25:42 2013 (r248300) @@ -100,9 +100,6 @@ void userret(struct thread *td, struct trapframe *frame) { struct proc *p = td->td_proc; -#ifdef RACCT - int sig; -#endif CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); @@ -175,12 +172,8 @@ userret(struct thread *td, struct trapfr #endif #ifdef RACCT PROC_LOCK(p); - while (p->p_throttled == 1) { - sig = msleep(p->p_racct, &p->p_mtx, PCATCH | PBDRY, "racct", - hz); - if ((sig == EINTR) || (sig == ERESTART)) - break; - } + while (p->p_throttled == 1) + msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); PROC_UNLOCK(p); #endif } From owner-svn-src-head@FreeBSD.ORG Thu Mar 14 23:51: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]) by hub.freebsd.org (Postfix) with ESMTP id 5F40E23C; Thu, 14 Mar 2013 23:51:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34A8D2AE; Thu, 14 Mar 2013 23:51:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2ENpmob071491; Thu, 14 Mar 2013 23:51:48 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2ENplKC071486; Thu, 14 Mar 2013 23:51:47 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201303142351.r2ENplKC071486@svn.freebsd.org> From: Brooks Davis Date: Thu, 14 Mar 2013 23:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248302 - in head: contrib/libc-vis lib/libc/gen 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.14 Precedence: list List-Id: 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, 14 Mar 2013 23:51:48 -0000 Author: brooks Date: Thu Mar 14 23:51:47 2013 New Revision: 248302 URL: http://svnweb.freebsd.org/changeset/base/248302 Log: Update to the latest (un)vis(3) sources from NetBSD. This adds multibyte support[0] and the new functions strenvisx and strsenvisx. Add MLINKS for vis(3) functions add by this and the initial import from NetBSD[1]. PR: bin/166364, bin/175418 Submitted by: "J.R. Oldroyd" [0] stefanf[1] Obtained from: NetBSD MFC after: 2 weeks Modified: head/contrib/libc-vis/unvis.3 head/contrib/libc-vis/unvis.c head/contrib/libc-vis/vis.3 head/contrib/libc-vis/vis.c head/contrib/libc-vis/vis.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map Directory Properties: head/contrib/libc-vis/ (props changed) Modified: head/contrib/libc-vis/unvis.3 ============================================================================== --- head/contrib/libc-vis/unvis.3 Thu Mar 14 23:35:52 2013 (r248301) +++ head/contrib/libc-vis/unvis.3 Thu Mar 14 23:51:47 2013 (r248302) @@ -1,4 +1,4 @@ -.\" $NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $ +.\" $NetBSD: unvis.3,v 1.27 2012/12/15 07:34:36 wiz Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1989, 1991, 1993 @@ -126,15 +126,17 @@ The function has several return codes that must be handled properly. They are: .Bl -tag -width UNVIS_VALIDPUSH -.It Li \&0 (zero) +.It Li \&0 No (zero) Another character is necessary; nothing has been recognized yet. .It Dv UNVIS_VALID A valid character has been recognized and is available at the location -pointed to by cp. +pointed to by +.Fa cp . .It Dv UNVIS_VALIDPUSH A valid character has been recognized and is available at the location -pointed to by cp; however, the character currently passed in should -be passed in again. +pointed to by +.Fa cp ; +however, the character currently passed in should be passed in again. .It Dv UNVIS_NOCHAR A valid sequence was detected, but no character was produced. This return code is necessary to indicate a logical break between characters. @@ -150,7 +152,7 @@ one more time with flag set to to extract any remaining character (the character passed in is ignored). .Pp The -.Ar flag +.Fa flag argument is also used to specify the encoding style of the source. If set to .Dv VIS_HTTPSTYLE @@ -161,7 +163,8 @@ will decode URI strings as specified in If set to .Dv VIS_HTTP1866 , .Fn unvis -will decode URI strings as specified in RFC 1866. +will decode entity references and numeric character references +as specified in RFC 1866. If set to .Dv VIS_MIMESTYLE , .Fn unvis @@ -169,7 +172,9 @@ will decode MIME Quoted-Printable string If set to .Dv VIS_NOESCAPE , .Fn unvis -will not decode \e quoted characters. +will not decode +.Ql \e +quoted characters. .Pp The following code fragment illustrates a proper use of .Fn unvis . @@ -204,7 +209,7 @@ The functions and .Fn strnunvisx will return \-1 on error and set -.Va errno +.Va errno to: .Bl -tag -width Er .It Bq Er EINVAL @@ -212,7 +217,7 @@ An invalid escape sequence was detected, .El .Pp In addition the functions -.Fn strnunvis +.Fn strnunvis and .Fn strnunvisx will can also set @@ -244,4 +249,14 @@ and functions appeared in .Nx 6.0 and -.Fx 10.0 . +.Fx 9.2 . +.Sh BUGS +The names +.Dv VIS_HTTP1808 +and +.Dv VIS_HTTP1866 +are wrong. +Percent-encoding was defined in RFC 1738, the original RFC for URL. +RFC 1866 defines HTML 2.0, an application of SGML, from which it +inherits concepts of numeric character references and entity +references. Modified: head/contrib/libc-vis/unvis.c ============================================================================== --- head/contrib/libc-vis/unvis.c Thu Mar 14 23:35:52 2013 (r248301) +++ head/contrib/libc-vis/unvis.c Thu Mar 14 23:51:47 2013 (r248302) @@ -1,4 +1,4 @@ -/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $ */ +/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $"); +__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $"); #endif #endif /* LIBC_SCCS and not lint */ __FBSDID("$FreeBSD$"); @@ -90,7 +90,7 @@ __weak_alias(strnunvisx,_strnunvisx) * RFC 1866 */ static const struct nv { - const char name[7]; + char name[7]; uint8_t value; } nv[] = { { "AElig", 198 }, /* capital AE diphthong (ligature) */ Modified: head/contrib/libc-vis/vis.3 ============================================================================== --- head/contrib/libc-vis/vis.3 Thu Mar 14 23:35:52 2013 (r248301) +++ head/contrib/libc-vis/vis.3 Thu Mar 14 23:51:47 2013 (r248302) @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.29 2012/12/14 22:55:59 christos Exp $ +.\" $NetBSD: vis.3,v 1.39 2013/02/20 20:05:26 christos Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1989, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)vis.3 8.1 (Berkeley) 6/9/93 .\" -.Dd December 14, 2012 +.Dd February 19, 2013 .Dt VIS 3 .Os .Sh NAME @@ -40,12 +40,14 @@ .Nm strnvis , .Nm strvisx , .Nm strnvisx , +.Nm strenvisx , .Nm svis , .Nm snvis , .Nm strsvis , .Nm strsnvis , -.Nm strsvisx -.Nm strsnvisx +.Nm strsvisx , +.Nm strsnvisx , +.Nm strsenvisx .Nd visually encode characters .Sh LIBRARY .Lb libc @@ -63,6 +65,8 @@ .Fn strvisx "char *dst" "const char *src" "size_t len" "int flag" .Ft int .Fn strnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" +.Ft int +.Fn strenvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" "int *cerr_ptr" .Ft char * .Fn svis "char *dst" "int c" "int flag" "int nextc" "const char *extra" .Ft char * @@ -75,6 +79,8 @@ .Fn strsvisx "char *dst" "const char *src" "size_t len" "int flag" "const char *extra" .Ft int .Fn strsnvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" "const char *extra" +.Ft int +.Fn strsenvisx "char *dst" "size_t dlen" "const char *src" "size_t len" "int flag" "const char *extra" "int *cerr_ptr" .Sh DESCRIPTION The .Fn vis @@ -89,11 +95,11 @@ needs no encoding, it is copied in unalt The string is null terminated, and a pointer to the end of the string is returned. The maximum length of any encoding is four -characters (not including the trailing +bytes (not including the trailing .Dv NUL ) ; thus, when encoding a set of characters into a buffer, the size of the buffer should -be four times the number of characters encoded, plus one for the trailing +be four times the number of bytes encoded, plus one for the trailing .Dv NUL . The flag parameter is used for altering the default range of characters considered for encoding and for altering the visual @@ -142,16 +148,17 @@ terminate The size of .Fa dst must be four times the number -of characters encoded from +of bytes encoded from .Fa src (plus one for the .Dv NUL ) . Both -forms return the number of characters in dst (not including -the trailing +forms return the number of characters in +.Fa dst +(not including the trailing .Dv NUL ) . The -.Dq n +.Dq Nm n versions of the functions also take an additional argument .Fa dlen that indicates the length of the @@ -159,7 +166,7 @@ that indicates the length of the buffer. If .Fa dlen -is not large enough to fix the converted string then the +is not large enough to fit the converted string then the .Fn strnvis and .Fn strnvisx @@ -167,6 +174,14 @@ functions return \-1 and set .Va errno to .Dv ENOSPC . +The +.Fn strenvisx +function takes an additional argument, +.Fa cerr_ptr , +that is used to pass in and out a multibyte conversion error flag. +This is useful when processing single characters at a time when +it is possible that the locale may be set to something other +than the locale of the characters in the input data. .Pp The functions .Fn svis , @@ -174,16 +189,18 @@ The functions .Fn strsvis , .Fn strsnvis , .Fn strsvisx , +.Fn strsnvisx , and -.Fn strsnvisx +.Fn strsenvisx correspond to .Fn vis , .Fn nvis , .Fn strvis , .Fn strnvis , .Fn strvisx , +.Fn strnvisx , and -.Fn strnvisx +.Fn strenvisx but have an additional argument .Fa extra , pointing to a @@ -214,14 +231,13 @@ and .Fn strnvisx ) , and the type of representation used. By default, all non-graphic characters, -except space, tab, and newline are encoded. -(See -.Xr isgraph 3 . ) +except space, tab, and newline are encoded (see +.Xr isgraph 3 ) . The following flags alter this: .Bl -tag -width VIS_WHITEX .It Dv VIS_GLOB -Also encode magic characters +Also encode the magic characters .Ql ( * , .Ql \&? , .Ql \&[ @@ -243,11 +259,13 @@ Synonym for \&| .Dv VIS_NL . .It Dv VIS_SAFE -Only encode "unsafe" characters. +Only encode +.Dq unsafe +characters. Unsafe means control characters which may cause common terminals to perform unexpected functions. Currently this form allows space, tab, newline, backspace, bell, and -return - in addition to all graphic characters - unencoded. +return \(em in addition to all graphic characters \(em unencoded. .El .Pp (The above flags have no effect for @@ -287,8 +305,8 @@ Use an to represent meta characters (characters with the 8th bit set), and use caret .Ql ^ -to represent control characters see -.Pf ( Xr iscntrl 3 ) . +to represent control characters (see +.Xr iscntrl 3 ) . The following formats are used: .Bl -tag -width xxxxx .It Dv \e^C @@ -335,19 +353,20 @@ Use C-style backslash sequences to repre characters. The following sequences are used to represent the indicated characters: .Bd -unfilled -offset indent -.Li \ea Tn - BEL No (007) -.Li \eb Tn - BS No (010) -.Li \ef Tn - NP No (014) -.Li \en Tn - NL No (012) -.Li \er Tn - CR No (015) -.Li \es Tn - SP No (040) -.Li \et Tn - HT No (011) -.Li \ev Tn - VT No (013) -.Li \e0 Tn - NUL No (000) +.Li \ea Tn \(em BEL No (007) +.Li \eb Tn \(em BS No (010) +.Li \ef Tn \(em NP No (014) +.Li \en Tn \(em NL No (012) +.Li \er Tn \(em CR No (015) +.Li \es Tn \(em SP No (040) +.Li \et Tn \(em HT No (011) +.Li \ev Tn \(em VT No (013) +.Li \e0 Tn \(em NUL No (000) .Ed .Pp -When using this format, the nextc parameter is looked at to determine -if a +When using this format, the +.Fa nextc +parameter is looked at to determine if a .Dv NUL character can be encoded as .Ql \e0 @@ -374,8 +393,8 @@ represents a lower case hexadecimal digi .It Dv VIS_MIMESTYLE Use MIME Quoted-Printable encoding as described in RFC 2045, only don't break lines and don't handle CRLF. -The form is: -.Ql %XX +The form is +.Ql =XX where .Em X represents an upper case hexadecimal digit. @@ -392,6 +411,41 @@ meta characters as .Ql M-C ) . With this flag set, the encoding is ambiguous and non-invertible. +.Sh MULTIBYTE CHARACTER SUPPORT +These functions support multibyte character input. +The encoding conversion is influenced by the setting of the +.Ev LC_CTYPE +environment variable which defines the set of characters +that can be copied without encoding. +.Pp +When 8-bit data is present in the input, +.Ev LC_CTYPE +must be set to the correct locale or to the C locale. +If the locales of the data and the conversion are mismatched, +multibyte character recognition may fail and encoding will be performed +byte-by-byte instead. +.Pp +As noted above, +.Fa dst +must be four times the number of bytes processed from +.Fa src . +But note that each multibyte character can be up to +.Dv MB_LEN_MAX +bytes +.\" (see +.\" .Xr multibyte 3 ) +so in terms of multibyte characters, +.Fa dst +must be four times +.Dv MB_LEN_MAX +times the number of characters processed from +.Fa src . +.Sh ENVIRONMENT +.Bl -tag -width ".Ev LC_CTYPE" +.It Ev LC_CTYPE +Specify the locale of the input data. +Set to C if the input data locale is unknown. +.El .Sh ERRORS The functions .Fn nvis @@ -407,11 +461,11 @@ and .Fn strsnvisx , will return \-1 when the .Fa dlen -destination buffer length size is not enough to perform the conversion while +destination buffer size is not enough to perform the conversion while setting .Va errno to: -.Bl -tag -width Er +.Bl -tag -width ".Bq Er ENOSPC" .It Bq Er ENOSPC The destination buffer size is not large enough to perform the conversion. .El @@ -419,18 +473,23 @@ The destination buffer size is not large .Xr unvis 1 , .Xr vis 1 , .Xr glob 3 , +.\" .Xr multibyte 3 , .Xr unvis 3 .Rs .%A T. Berners-Lee .%T Uniform Resource Locators (URL) -.%O RFC1738 +.%O "RFC 1738" +.Re +.Rs +.%T "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies" +.%O "RFC 2045" .Re .Sh HISTORY The .Fn vis , .Fn strvis , and -.Fa strvisx +.Fn strvisx functions first appeared in .Bx 4.4 . The @@ -441,7 +500,7 @@ and functions appeared in .Nx 1.5 and -.Fx 10.0 . +.Fx 9.2 . The buffer size limited versions of the functions .Po Fn nvis , .Fn strnvis , @@ -451,6 +510,9 @@ The buffer size limited versions of the and .Fn strsnvisx Pc appeared in -.Nx 6.0 and -.Fx 10.0 . +.Fx 9.2 . +Myltibyte character support was added in +.Nx 7.0 +and +.Fx 9.2 . Modified: head/contrib/libc-vis/vis.c ============================================================================== --- head/contrib/libc-vis/vis.c Thu Mar 14 23:35:52 2013 (r248301) +++ head/contrib/libc-vis/vis.c Thu Mar 14 23:51:47 2013 (r248302) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $ */ +/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,19 +57,23 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.45 2012/12/14 21:38:18 christos Exp $"); +__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ +#ifdef __FBSDID __FBSDID("$FreeBSD$"); +#define _DIAGASSERT(x) assert(x) +#endif #include "namespace.h" #include +#include #include #include #include #include - -#define _DIAGASSERT(x) assert(x) +#include +#include #ifdef __weak_alias __weak_alias(strvisx,_strvisx) @@ -81,65 +85,66 @@ __weak_alias(strvisx,_strvisx) #include #include -static char *do_svis(char *, size_t *, int, int, int, const char *); +/* + * The reason for going through the trouble to deal with character encodings + * in vis(3), is that we use this to safe encode output of commands. This + * safe encoding varies depending on the character set. For example if we + * display ps output in French, we don't want to display French characters + * as M-foo. + */ + +static wchar_t *do_svis(wchar_t *, wint_t, int, wint_t, const wchar_t *); #undef BELL -#define BELL '\a' +#define BELL L'\a' + +#define iswoctal(c) (((u_char)(c)) >= L'0' && ((u_char)(c)) <= L'7') +#define iswwhite(c) (c == L' ' || c == L'\t' || c == L'\n') +#define iswsafe(c) (c == L'\b' || c == BELL || c == L'\r') +#define xtoa(c) L"0123456789abcdef"[c] +#define XTOA(c) L"0123456789ABCDEF"[c] -#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define iswhite(c) (c == ' ' || c == '\t' || c == '\n') -#define issafe(c) (c == '\b' || c == BELL || c == '\r') -#define xtoa(c) "0123456789abcdef"[c] -#define XTOA(c) "0123456789ABCDEF"[c] - -#define MAXEXTRAS 9 - -#define MAKEEXTRALIST(flag, extra, orig_str) \ -do { \ - const char *orig = orig_str; \ - const char *o = orig; \ - char *e; \ - while (*o++) \ - continue; \ - extra = malloc((size_t)((o - orig) + MAXEXTRAS)); \ - if (!extra) break; \ - for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ - continue; \ - e--; \ - if (flag & VIS_GLOB) { \ - *e++ = '*'; \ - *e++ = '?'; \ - *e++ = '['; \ - *e++ = '#'; \ - } \ - if (flag & VIS_SP) *e++ = ' '; \ - if (flag & VIS_TAB) *e++ = '\t'; \ - if (flag & VIS_NL) *e++ = '\n'; \ - if ((flag & VIS_NOSLASH) == 0) *e++ = '\\'; \ - *e = '\0'; \ -} while (/*CONSTCOND*/0) +#define MAXEXTRAS 10 + +#if !HAVE_NBTOOL_CONFIG_H +#ifndef __NetBSD__ +/* + * On NetBSD MB_LEN_MAX is currently 32 which does not fit on any integer + * integral type and it is probably wrong, since currently the maximum + * number of bytes and character needs is 6. Until this is fixed, the + * loops below are using sizeof(uint64_t) - 1 instead of MB_LEN_MAX, and + * the assertion is commented out. + */ +#ifdef __FreeBSD__ +/* + * On FreeBSD including for CTASSERT only works in kernel + * mode. + */ +#ifndef CTASSERT +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#endif +#endif /* __FreeBSD__ */ +CTASSERT(MB_LEN_MAX <= sizeof(uint64_t)); +#endif /* !__NetBSD__ */ +#endif /* * This is do_hvis, for HTTP style (RFC 1808) */ -static char * -do_hvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +do_hvis(wchar_t *dst, wint_t c, int flags, wint_t nextc, const wchar_t *extra) { - - if ((isascii(c) && isalnum(c)) + if (iswalnum(c) /* safe */ - || c == '$' || c == '-' || c == '_' || c == '.' || c == '+' + || c == L'$' || c == L'-' || c == L'_' || c == L'.' || c == L'+' /* extra */ - || c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' - || c == ',') { - dst = do_svis(dst, dlen, c, flag, nextc, extra); - } else { - if (dlen) { - if (*dlen < 3) - return NULL; - *dlen -= 3; - } - *dst++ = '%'; + || c == L'!' || c == L'*' || c == L'\'' || c == L'(' || c == L')' + || c == L',') + dst = do_svis(dst, c, flags, nextc, extra); + else { + *dst++ = L'%'; *dst++ = xtoa(((unsigned int)c >> 4) & 0xf); *dst++ = xtoa((unsigned int)c & 0xf); } @@ -151,312 +156,448 @@ do_hvis(char *dst, size_t *dlen, int c, * This is do_mvis, for Quoted-Printable MIME (RFC 2045) * NB: No handling of long lines or CRLF. */ -static char * -do_mvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +do_mvis(wchar_t *dst, wint_t c, int flags, wint_t nextc, const wchar_t *extra) { - if ((c != '\n') && + if ((c != L'\n') && /* Space at the end of the line */ - ((isspace(c) && (nextc == '\r' || nextc == '\n')) || + ((iswspace(c) && (nextc == L'\r' || nextc == L'\n')) || /* Out of range */ - (!isspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) || - /* Specific char to be escaped */ - strchr("#$@[\\]^`{|}~", c) != NULL)) { - if (dlen) { - if (*dlen < 3) - return NULL; - *dlen -= 3; - } - *dst++ = '='; + (!iswspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) || + /* Specific char to be escaped */ + wcschr(L"#$@[\\]^`{|}~", c) != NULL)) { + *dst++ = L'='; *dst++ = XTOA(((unsigned int)c >> 4) & 0xf); *dst++ = XTOA((unsigned int)c & 0xf); - } else { - dst = do_svis(dst, dlen, c, flag, nextc, extra); - } + } else + dst = do_svis(dst, c, flags, nextc, extra); return dst; } /* - * This is do_vis, the central code of vis. - * dst: Pointer to the destination buffer - * c: Character to encode - * flag: Flag word - * nextc: The character following 'c' - * extra: Pointer to the list of extra characters to be - * backslash-protected. + * Output single byte of multibyte character. */ -static char * -do_svis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +do_mbyte(wchar_t *dst, wint_t c, int flags, wint_t nextc, int iswextra) { - int isextra; - size_t odlen = dlen ? *dlen : 0; - - isextra = strchr(extra, c) != NULL; -#define HAVE(x) \ - do { \ - if (dlen) { \ - if (*dlen < (x)) \ - goto out; \ - *dlen -= (x); \ - } \ - } while (/*CONSTCOND*/0) - if (!isextra && isascii(c) && (isgraph(c) || iswhite(c) || - ((flag & VIS_SAFE) && issafe(c)))) { - HAVE(1); - *dst++ = c; - return dst; - } - if (flag & VIS_CSTYLE) { - HAVE(2); + if (flags & VIS_CSTYLE) { switch (c) { - case '\n': - *dst++ = '\\'; *dst++ = 'n'; + case L'\n': + *dst++ = L'\\'; *dst++ = L'n'; return dst; - case '\r': - *dst++ = '\\'; *dst++ = 'r'; + case L'\r': + *dst++ = L'\\'; *dst++ = L'r'; return dst; - case '\b': - *dst++ = '\\'; *dst++ = 'b'; + case L'\b': + *dst++ = L'\\'; *dst++ = L'b'; return dst; case BELL: - *dst++ = '\\'; *dst++ = 'a'; + *dst++ = L'\\'; *dst++ = L'a'; return dst; - case '\v': - *dst++ = '\\'; *dst++ = 'v'; + case L'\v': + *dst++ = L'\\'; *dst++ = L'v'; return dst; - case '\t': - *dst++ = '\\'; *dst++ = 't'; + case L'\t': + *dst++ = L'\\'; *dst++ = L't'; return dst; - case '\f': - *dst++ = '\\'; *dst++ = 'f'; + case L'\f': + *dst++ = L'\\'; *dst++ = L'f'; return dst; - case ' ': - *dst++ = '\\'; *dst++ = 's'; + case L' ': + *dst++ = L'\\'; *dst++ = L's'; return dst; - case '\0': - *dst++ = '\\'; *dst++ = '0'; - if (isoctal(nextc)) { - HAVE(2); - *dst++ = '0'; - *dst++ = '0'; + case L'\0': + *dst++ = L'\\'; *dst++ = L'0'; + if (iswoctal(nextc)) { + *dst++ = L'0'; + *dst++ = L'0'; } return dst; default: - if (isgraph(c)) { - *dst++ = '\\'; *dst++ = c; + if (iswgraph(c)) { + *dst++ = L'\\'; + *dst++ = c; return dst; } - if (dlen) - *dlen = odlen; } } - if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { - HAVE(4); - *dst++ = '\\'; - *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0'; - *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0'; - *dst++ = (c & 07) + '0'; + if (iswextra || ((c & 0177) == L' ') || (flags & VIS_OCTAL)) { + *dst++ = L'\\'; + *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + L'0'; + *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + L'0'; + *dst++ = (c & 07) + L'0'; } else { - if ((flag & VIS_NOSLASH) == 0) { - HAVE(1); - *dst++ = '\\'; - } + if ((flags & VIS_NOSLASH) == 0) + *dst++ = L'\\'; if (c & 0200) { - HAVE(1); - c &= 0177; *dst++ = 'M'; + c &= 0177; + *dst++ = L'M'; } - if (iscntrl(c)) { - HAVE(2); - *dst++ = '^'; + if (iswcntrl(c)) { + *dst++ = L'^'; if (c == 0177) - *dst++ = '?'; + *dst++ = L'?'; else - *dst++ = c + '@'; + *dst++ = c + L'@'; } else { - HAVE(2); - *dst++ = '-'; *dst++ = c; + *dst++ = L'-'; + *dst++ = c; } } + + return dst; +} + +/* + * This is do_vis, the central code of vis. + * dst: Pointer to the destination buffer + * c: Character to encode + * flags: Flags word + * nextc: The character following 'c' + * extra: Pointer to the list of extra characters to be + * backslash-protected. + */ +static wchar_t * +do_svis(wchar_t *dst, wint_t c, int flags, wint_t nextc, const wchar_t *extra) +{ + int iswextra, i, shft; + uint64_t bmsk, wmsk; + + iswextra = wcschr(extra, c) != NULL; + if (!iswextra && (iswgraph(c) || iswwhite(c) || + ((flags & VIS_SAFE) && iswsafe(c)))) { + *dst++ = c; + return dst; + } + + /* See comment in istrsenvisx() output loop, below. */ + wmsk = 0; + for (i = sizeof(wmsk) - 1; i >= 0; i--) { + shft = i * NBBY; + bmsk = (uint64_t)0xffLL << shft; + wmsk |= bmsk; + if ((c & wmsk) || i == 0) + dst = do_mbyte(dst, (wint_t)( + (uint64_t)(c & bmsk) >> shft), + flags, nextc, iswextra); + } + return dst; -out: - *dlen = odlen; - return NULL; } -typedef char *(*visfun_t)(char *, size_t *, int, int, int, const char *); +typedef wchar_t *(*visfun_t)(wchar_t *, wint_t, int, wint_t, const wchar_t *); /* * Return the appropriate encoding function depending on the flags given. */ static visfun_t -getvisfun(int flag) +getvisfun(int flags) { - if (flag & VIS_HTTPSTYLE) + if (flags & VIS_HTTPSTYLE) return do_hvis; - if (flag & VIS_MIMESTYLE) + if (flags & VIS_MIMESTYLE) return do_mvis; return do_svis; } /* - * isnvis - visually encode characters, also encoding the characters - * pointed to by `extra' + * Expand list of extra characters to not visually encode. */ -static char * -isnvis(char *dst, size_t *dlen, int c, int flag, int nextc, const char *extra) +static wchar_t * +makeextralist(int flags, const char *src) { - char *nextra = NULL; - visfun_t f; + wchar_t *dst, *d; + size_t len; - _DIAGASSERT(dst != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - if (dlen && *dlen == 0) { - errno = ENOSPC; - return NULL; - } - *dst = '\0'; /* can't create nextra, return "" */ - return dst; - } - f = getvisfun(flag); - dst = (*f)(dst, dlen, c, flag, nextc, nextra); - free(nextra); - if (dst == NULL || (dlen && *dlen == 0)) { - errno = ENOSPC; + len = strlen(src); + if ((dst = calloc(len + MAXEXTRAS, sizeof(*dst))) == NULL) return NULL; - } - *dst = '\0'; - return dst; -} -char * -svis(char *dst, int c, int flag, int nextc, const char *extra) -{ - return isnvis(dst, NULL, c, flag, nextc, extra); -} + if (mbstowcs(dst, src, len) == (size_t)-1) { + size_t i; + for (i = 0; i < len; i++) + dst[i] = (wint_t)(u_char)src[i]; + d = dst + len; + } else + d = dst + wcslen(dst); + + if (flags & VIS_GLOB) { + *d++ = L'*'; + *d++ = L'?'; + *d++ = L'['; + *d++ = L'#'; + } + + if (flags & VIS_SP) *d++ = L' '; + if (flags & VIS_TAB) *d++ = L'\t'; + if (flags & VIS_NL) *d++ = L'\n'; + if ((flags & VIS_NOSLASH) == 0) *d++ = L'\\'; + *d = L'\0'; -char * -snvis(char *dst, size_t dlen, int c, int flag, int nextc, const char *extra) -{ - return isnvis(dst, &dlen, c, flag, nextc, extra); + return dst; } - /* - * strsvis, strsvisx - visually encode characters from src into dst - * - * Extra is a pointer to a \0-terminated list of characters to - * be encoded, too. These functions are useful e. g. to - * encode strings in such a way so that they are not interpreted - * by a shell. - * - * Dst must be 4 times the size of src to account for possible - * expansion. The length of dst, not including the trailing NULL, - * is returned. - * - * Strsvisx encodes exactly len bytes from src into dst. - * This is useful for encoding a block of data. + * istrsenvisx() + * The main internal function. + * All user-visible functions call this one. */ static int -istrsnvis(char *dst, size_t *dlen, const char *csrc, int flag, const char *extra) +istrsenvisx(char *mbdst, size_t *dlen, const char *mbsrc, size_t mblength, + int flags, const char *mbextra, int *cerr_ptr) { - int c; - char *start; - char *nextra = NULL; - const unsigned char *src = (const unsigned char *)csrc; + wchar_t *dst, *src, *pdst, *psrc, *start, *extra; + size_t len, olen; + uint64_t bmsk, wmsk; + wint_t c; visfun_t f; + int clen = 0, cerr = 0, error = -1, i, shft; + ssize_t mbslength, maxolen; - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return 0; + _DIAGASSERT(mbdst != NULL); + _DIAGASSERT(mbsrc != NULL); + _DIAGASSERT(mbextra != NULL); + + /* + * Input (mbsrc) is a char string considered to be multibyte + * characters. The input loop will read this string pulling + * one character, possibly multiple bytes, from mbsrc and + * converting each to wchar_t in src. + * + * The vis conversion will be done using the wide char + * wchar_t string. + * + * This will then be converted back to a multibyte string to + * return to the caller. + */ + + /* Allocate space for the wide char strings */ + psrc = pdst = extra = NULL; + if (!mblength) + mblength = strlen(mbsrc); + if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) + return -1; + if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) + goto out; + dst = pdst; + src = psrc; + + /* Use caller's multibyte conversion error flag. */ + if (cerr_ptr) + cerr = *cerr_ptr; + + /* + * Input loop. + * Handle up to mblength characters (not bytes). We do not + * stop at NULs because we may be processing a block of data + * that includes NULs. + */ + mbslength = (ssize_t)mblength; + /* + * When inputing a single character, must also read in the + * next character for nextc, the look-ahead character. + */ + if (mbslength == 1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 00:05: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]) by hub.freebsd.org (Postfix) with ESMTP id 86CF46C6; Fri, 15 Mar 2013 00:05:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7380A343; Fri, 15 Mar 2013 00:05:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F05oIL075271; Fri, 15 Mar 2013 00:05:50 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F05oXK075269; Fri, 15 Mar 2013 00:05:50 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201303150005.r2F05oXK075269@svn.freebsd.org> From: Brooks Davis Date: Fri, 15 Mar 2013 00:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248303 - in head: contrib/unvis contrib/vis usr.bin/unvis usr.bin/vis 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.14 Precedence: list List-Id: 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, 15 Mar 2013 00:05:51 -0000 Author: brooks Date: Fri Mar 15 00:05:50 2013 New Revision: 248303 URL: http://svnweb.freebsd.org/changeset/base/248303 Log: Replace our (un)vis(1) commands with implementations from NetBSD to match our import of the (un)vis(3) APIs. This adds support for multibyte encoding and the -h and -m flags which support HTTP and MIME encoding respectively. PR: bin/175418 Obtained from: NetBSD Added: head/contrib/unvis/ - copied from r247132, vendor/NetBSD/unvis/dist/ head/contrib/vis/ - copied from r247132, vendor/NetBSD/vis/dist/ Deleted: head/usr.bin/unvis/unvis.1 head/usr.bin/unvis/unvis.c head/usr.bin/vis/extern.h head/usr.bin/vis/foldit.c head/usr.bin/vis/vis.1 head/usr.bin/vis/vis.c Modified: head/usr.bin/unvis/Makefile head/usr.bin/vis/Makefile Modified: head/usr.bin/unvis/Makefile ============================================================================== --- head/usr.bin/unvis/Makefile Thu Mar 14 23:51:47 2013 (r248302) +++ head/usr.bin/unvis/Makefile Fri Mar 15 00:05:50 2013 (r248303) @@ -3,4 +3,6 @@ PROG= unvis +.PATH: ${.CURDIR}/../../contrib/unvis + .include Modified: head/usr.bin/vis/Makefile ============================================================================== --- head/usr.bin/vis/Makefile Thu Mar 14 23:51:47 2013 (r248302) +++ head/usr.bin/vis/Makefile Fri Mar 15 00:05:50 2013 (r248303) @@ -1,6 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ PROG= vis SRCS= vis.c foldit.c +.PATH: ${.CURDIR}/../../contrib/vis +CFLAGS+= -I${.CURDIR}/../../contrib/vis + .include From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 00:10:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CC75C9FA; Fri, 15 Mar 2013 00:10:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BD90137C; Fri, 15 Mar 2013 00:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F0AckI076591; Fri, 15 Mar 2013 00:10:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F0AcuB076569; Fri, 15 Mar 2013 00:10:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303150010.r2F0AcuB076569@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 15 Mar 2013 00:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248304 - head/tools/regression/pjdfstest/tests 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.14 Precedence: list List-Id: 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, 15 Mar 2013 00:10:38 -0000 Author: pjd Date: Fri Mar 15 00:10:38 2013 New Revision: 248304 URL: http://svnweb.freebsd.org/changeset/base/248304 Log: Make file name generation to work with both new and old versions of OpenSSL. Sponsored by: The FreeBSD Foundation Modified: head/tools/regression/pjdfstest/tests/misc.sh Modified: head/tools/regression/pjdfstest/tests/misc.sh ============================================================================== --- head/tools/regression/pjdfstest/tests/misc.sh Fri Mar 15 00:05:50 2013 (r248303) +++ head/tools/regression/pjdfstest/tests/misc.sh Fri Mar 15 00:10:38 2013 (r248304) @@ -89,7 +89,7 @@ todo() namegen() { - echo "pjdfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5`" + echo "pjdfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5 | awk '{print $NF}'`" } namegen_len() @@ -98,7 +98,7 @@ namegen_len() name="" while :; do - namepart="`dd if=/dev/urandom bs=64 count=1 2>/dev/null | openssl md5`" + namepart="`dd if=/dev/urandom bs=64 count=1 2>/dev/null | openssl md5 | awk '{print $NF}'`" name="${name}${namepart}" curlen=`printf "%s" "${name}" | wc -c` [ ${curlen} -lt ${len} ] || break From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 00:27:26 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]) by hub.freebsd.org (Postfix) with ESMTP id 0223118A; Fri, 15 Mar 2013 00:27:26 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E6DF0613; Fri, 15 Mar 2013 00:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F0RPa6081852; Fri, 15 Mar 2013 00:27:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F0ROPH081840; Fri, 15 Mar 2013 00:27:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201303150027.r2F0ROPH081840@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 15 Mar 2013 00:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248307 - head/contrib/tzdata 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.14 Precedence: list List-Id: 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, 15 Mar 2013 00:27:26 -0000 Author: edwin Date: Fri Mar 15 00:27:24 2013 New Revision: 248307 URL: http://svnweb.freebsd.org/changeset/base/248307 Log: MFV of 248305, tzdata2013b Lots of historical data added. Morocco: add DST rules for the coming years Cuba: Doing DST in 2013. Chili: Will do DST in 2013 as it seems. Modified: head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/europe head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica head/contrib/tzdata/zone.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/africa Fri Mar 15 00:27:24 2013 (r248307) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2013-02-21): # # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -25,6 +25,10 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which # I found in the UCLA library. # +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . +# # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # @@ -116,8 +120,12 @@ Zone Africa/Porto-Novo 0:10:28 - LMT 191 1:00 - WAT # Botswana +# From Paul Eggert (2013-02-21): +# Milne says they were regulated by the Cape Town Signal in 1899; +# assume they switched to 2:00 when Cape Town did. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Gaborone 1:43:40 - LMT 1885 + 1:30 - SAST 1903 Mar 2:00 - CAT 1943 Sep 19 2:00 2:00 1:00 CAST 1944 Mar 19 2:00 2:00 - CAT @@ -189,6 +197,11 @@ Zone Africa/Djibouti 2:52:36 - LMT 1911 # Egypt +# Milne says Cairo used 2:05:08.9, the local mean time of the Abbasizeh +# observatory; round to nearest. Milne also says that the official time for +# Egypt was mean noon at the Great Pyramid, 2:04:30.5, but apparently this +# did not apply to Cairo, Alexandria, or Port Said. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Egypt 1940 only - Jul 15 0:00 1:00 S Rule Egypt 1940 only - Oct 1 0:00 0 - @@ -329,7 +342,7 @@ Rule Egypt 2010 only - Sep 10 0:00 1:00 Rule Egypt 2010 only - Sep lastThu 23:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Cairo 2:05:00 - LMT 1900 Oct +Zone Africa/Cairo 2:05:09 - LMT 1900 Oct 2:00 Egypt EE%sT # Equatorial Guinea @@ -833,6 +846,41 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes # August 20, 2012 from 2:00 am. +# From Paul Eggert (2013-03-06): +# Morocco's daylight-saving transitions due to Ramadan seem to be +# announced a bit in advance. On 2012-07-11 the Moroccan government +# announced that year's Ramadan daylight-saving transitions would be +# 2012-07-20 and 2012-08-20; see +# . +# +# To estimate what the Moroccan government will do in future years, +# transition dates for 2013 through 2021 were determined by running +# the following program under GNU Emacs 24.3: +# +# (let ((islamic-year 1434)) +# (while (< islamic-year 1444) +# (let ((a +# (calendar-gregorian-from-absolute +# (calendar-islamic-to-absolute (list 9 1 islamic-year)))) +# (b +# (calendar-gregorian-from-absolute +# (calendar-islamic-to-absolute (list 10 1 islamic-year))))) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t %2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) +# +# with the results hand-edited for 2020-2022, when the normal spring-forward +# date falls during the estimated Ramadan. +# +# From 2023 through 2038 Ramadan is not predicted to overlap with +# daylight saving time. Starting in 2039 there will be overlap again, +# but 32-bit time_t values roll around in 2038 so for now do not worry +# about dates after 2038. + # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Morocco 1939 only - Sep 12 0:00 1:00 S @@ -858,10 +906,28 @@ Rule Morocco 2010 only - May 2 0:00 1: Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 max - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 2019 - Apr lastSun 2:00 1:00 S Rule Morocco 2012 max - Sep lastSun 3:00 0 - Rule Morocco 2012 only - Jul 20 3:00 0 - Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2013 only - Jul 9 3:00 0 - +Rule Morocco 2013 only - Aug 8 2:00 1:00 S +Rule Morocco 2014 only - Jun 29 3:00 0 - +Rule Morocco 2014 only - Jul 29 2:00 1:00 S +Rule Morocco 2015 only - Jun 18 3:00 0 - +Rule Morocco 2015 only - Jul 18 2:00 1:00 S +Rule Morocco 2016 only - Jun 7 3:00 0 - +Rule Morocco 2016 only - Jul 7 2:00 1:00 S +Rule Morocco 2017 only - May 27 3:00 0 - +Rule Morocco 2017 only - Jun 26 2:00 1:00 S +Rule Morocco 2018 only - May 16 3:00 0 - +Rule Morocco 2018 only - Jun 15 2:00 1:00 S +Rule Morocco 2019 only - May 6 3:00 0 - +Rule Morocco 2019 only - Jun 5 2:00 1:00 S +Rule Morocco 2020 only - May 24 2:00 1:00 S +Rule Morocco 2021 only - May 13 2:00 1:00 S +Rule Morocco 2022 only - May 3 2:00 1:00 S +Rule Morocco 2023 max - Apr lastSun 2:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 Modified: head/contrib/tzdata/antarctica ============================================================================== --- head/contrib/tzdata/antarctica Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/antarctica Fri Mar 15 00:27:24 2013 (r248307) @@ -50,10 +50,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 only - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 only - Sep Sun>=2 4:00u 1:00 S -Rule ChileAQ 2013 max - Mar Sun>=9 3:00u 0 - -Rule ChileAQ 2013 max - Oct Sun>=9 4:00u 1:00 S +Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S # These rules are stolen from the `australasia' file. Rule AusAQ 1917 only - Jan 1 0:01 1:00 - Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/asia Fri Mar 15 00:27:24 2013 (r248307) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2013-02-21): # # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -25,6 +25,10 @@ # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which # I found in the UCLA library. # +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . +# # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # @@ -279,9 +283,12 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar 8:00 - BNT # Burma / Myanmar + +# Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon - 6:24:36 - RMT 1920 # Rangoon Mean Time? + 6:24:40 - RMT 1920 # Rangoon Mean Time? 6:30 - BURT 1942 May # Burma Time 9:00 - JST 1945 May 3 6:30 - MMT # Myanmar Time @@ -384,7 +391,8 @@ Zone Asia/Harbin 8:26:44 - LMT 1928 # or 8:00 PRC C%sT # Zhongyuan Time ("Central plain Time") # most of China -Zone Asia/Shanghai 8:05:52 - LMT 1928 +# Milne gives 8:05:56.7; round to nearest. +Zone Asia/Shanghai 8:05:57 - LMT 1928 8:00 Shang C%sT 1949 8:00 PRC C%sT # Long-shu Time (probably due to Long and Shu being two names of that area) @@ -481,6 +489,10 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # o 8:00 PRC C%sT +# Hong Kong (Xianggang) + +# Milne gives 7:36:41.7; round this. + # From Lee Yiu Chung (2009-10-24): # I found there are some mistakes for the...DST rule for Hong # Kong. [According] to the DST record from Hong Kong Observatory (actually, @@ -547,7 +559,6 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # o # The Japanese surrender of Hong Kong was signed 1945-09-15. # For lack of anything better, use start of those days as the transition times. -# Hong Kong (Xianggang) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule HK 1941 only - Apr 1 3:30 1:00 S Rule HK 1941 only - Sep 30 3:30 0 - @@ -569,7 +580,7 @@ Rule HK 1973 only - Dec 30 3:30 1:00 S Rule HK 1979 only - May Sun>=8 3:30 1:00 S Rule HK 1979 only - Oct Sun>=16 3:30 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Hong_Kong 7:36:36 - LMT 1904 Oct 30 +Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 8:00 HK HK%sT 1941 Dec 25 9:00 - JST 1945 Sep 15 8:00 HK HK%sT @@ -646,6 +657,9 @@ Zone Asia/Macau 7:34:20 - LMT 1912 ############################################################################### # Cyprus +# +# Milne says the Eastern Telegraph Company used 2:14:00. Stick with LMT. +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Cyprus 1975 only - Apr 13 0:00 1:00 S Rule Cyprus 1975 only - Oct 12 0:00 0 - @@ -1804,8 +1818,11 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman + +# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:20 - LMT 1920 +Zone Asia/Muscat 3:54:24 - LMT 1920 4:00 - GST # Pakistan @@ -2400,6 +2417,13 @@ Zone Asia/Singapore 6:55:25 - LMT 1901 J # no information # Sri Lanka + +# From Paul Eggert (2013-02-21): +# Milne says "Madras mean time use from May 1, 1898. Prior to this Colombo +# mean time, 5h. 4m. 21.9s. F., was used." But 5:04:21.9 differs considerably +# from Colombo's meridian 5:19:24, so for now ignore Milne and stick with +# Shanks and Pottenger. + # From Paul Eggert (1996-09-03): # "Sri Lanka advances clock by an hour to avoid blackout" # (www.virtual-pc.com/lankaweb/news/items/240596-2.html, 1996-05-24, @@ -2699,6 +2723,12 @@ Zone Asia/Tashkent 4:37:12 - LMT 1924 Ma # Vietnam +# From Paul Eggert (2013-02-21): +# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being +# used in Lower Laos, Cambodia, and Annam. But this is quite a ways +# from Saigon's location. For now, ignore this and stick with Shanks +# and Pottenger. + # From Arthur David Olson (2008-03-18): # The English-language name of Vietnam's most populous city is "Ho Chi Min City"; # we use Ho_Chi_Minh below to avoid a name of more than 14 characters. @@ -2712,6 +2742,10 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen + +# Milne says 2:59:54 was the meridian of the saluting battery at Aden, +# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 3:00:48 - LMT 1950 +Zone Asia/Aden 2:59:54 - LMT 1950 3:00 - AST Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/australasia Fri Mar 15 00:27:24 2013 (r248307) @@ -246,6 +246,9 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 6:30 - CCT # Cocos Islands Time # Fiji + +# Milne gives 11:55:44 for Suva. + # From Alexander Krivenyshev (2009-11-10): # According to Fiji Broadcasting Corporation, Fiji plans to re-introduce DST # from November 29th 2009 to April 25th 2010. @@ -339,7 +342,7 @@ Rule Fiji 2010 max - Oct Sun>=18 2:00 1: Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2012 max - Jan Sun>=18 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva +Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva 12:00 Fiji FJ%sT # Fiji Time # French Polynesia @@ -782,7 +785,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2006-03-22): +# From Paul Eggert (2013-02-21): # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). @@ -800,6 +803,10 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which # I found in the UCLA library. # +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . +# # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/europe Fri Mar 15 00:27:24 2013 (r248307) @@ -30,6 +30,12 @@ # William Willett, The Waste of Daylight, 19th edition # (1914-03) # +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . He writes: +# "It is requested that corrections and additions to these tables +# may be sent to Mr. John Milne, Royal Geographical Society, +# Savile Row, London." Nowadays please email them to tz@iana.org. +# # Brazil's Departamento Servico da Hora (DSH), # # History of Summer Time @@ -666,6 +672,8 @@ Zone Europe/Andorra 0:06:04 - LMT 1901 # Austria +# Milne says Vienna time was 1:05:21. + # From Paul Eggert (2006-03-22): Shanks & Pottenger give 1918-06-16 and # 1945-11-18, but the Austrian Federal Office of Metrology and # Surveying (BEV) gives 1918-09-16 and for Vienna gives the "alleged" @@ -683,7 +691,7 @@ Rule Austria 1948 only - Apr 18 2:00s 1: Rule Austria 1980 only - Apr 6 0:00 1:00 S Rule Austria 1980 only - Sep 28 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Vienna 1:05:20 - LMT 1893 Apr +Zone Europe/Vienna 1:05:21 - LMT 1893 Apr 1:00 C-Eur CE%sT 1920 1:00 Austria CE%sT 1940 Apr 1 2:00s 1:00 C-Eur CE%sT 1945 Apr 2 2:00s @@ -1239,6 +1247,21 @@ Zone Europe/Berlin 0:53:28 - LMT 1893 Ap 1:00 Germany CE%sT 1980 1:00 EU CE%sT +# From Tobias Conradi (2011-09-12): +# Busingen , surrounded by the Swiss canton +# Schaffhausen, did not start observing DST in 1980 as the rest of DE +# (West Germany at that time) and DD (East Germany at that time) did. +# DD merged into DE, the area is currently covered by code DE in ISO 3166-1, +# which in turn is covered by the zone Europe/Berlin. +# +# Source for the time in Busingen 1980: +# http://www.srf.ch/player/video?id=c012c029-03b7-4c2b-9164-aa5902cd58d3 + +# From Arthur David Olson (2012-03-03): +# Busingen and Zurich have shared clocks since 1970. + +Link Europe/Zurich Europe/Busingen + # Georgia # Please see the "asia" file for Asia/Tbilisi. # Herodotus (Histories, IV.45) says Georgia north of the Phasis (now Rioni) @@ -2043,6 +2066,70 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 # Russia +# From Alexander Krivenyshev (2011-09-15): +# Based on last Russian Government Decree # 725 on August 31, 2011 +# (Government document +# +# http://www.government.ru/gov/results/16355/print/ +# +# in Russian) +# there are few corrections have to be made for some Russian time zones... +# All updated Russian Time Zones were placed in table and translated to English +# by WorldTimeZone.com at the link below: +# +# http://www.worldtimezone.com/dst_news/dst_news_russia36.htm +# + +# From Sanjeev Gupta (2011-09-27): +# Scans of [Decree #23 of January 8, 1992] are available at: +# +# http://government.consultant.ru/page.aspx?1223966 +# They are in Cyrillic letters (presumably Russian). + +# From Arthur David Olson (2012-05-09): +# Regarding the instant when clocks in time-zone-shifting parts of Russia +# changed in September 2011: +# +# One source is +# < a href="http://government.ru/gov/results/16355/> +# http://government.ru/gov/results/16355/ +# +# which, according to translate.google.com, begins "Decree of August 31, +# 2011 No 725" and contains no other dates or "effective date" information. +# +# Another source is +# +# http://www.rg.ru/2011/09/06/chas-zona-dok.html +# +# which, according to translate.google.com, begins "Resolution of the +# Government of the Russian Federation on August 31, 2011 N 725" and also +# contains "Date first official publication: September 6, 2011 Posted on: +# in the 'RG' - Federal Issue number 5573 September 6, 2011" but which +# does not contain any "effective date" information. +# +# Another source is +# +# http://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7 +# +# which, in note 8, contains "Resolution #725 of August 31, 2011... +# Effective as of after 7 days following the day of the official publication" +# but which does not contain any reference to September 6, 2011. +# +# The Wikipedia article refers to +# +# http://base.consultant.ru/cons/cgi/online.cgi?req=doc;base=LAW;n=118896 +# +# which seems to copy the text of the government.ru page. +# +# Tobias Conradi combines Wikipedia's +# "as of after 7 days following the day of the official publication" +# with www.rg.ru's "Date of first official publication: September 6, 2011" to get +# September 13, 2011 as the cutover date (unusually, a Tuesday, as Tobias Conradi notes). +# +# None of the sources indicates a time of day for changing clocks. +# +# Go with 2011-09-13 0:00s. + # From Paul Eggert (2006-03-22): # Except for Moscow after 1919-07-01, I invented the time zone abbreviations. # Moscow time zone abbreviations after 1919-07-01, and Moscow rules after 1991, @@ -2270,14 +2357,32 @@ Zone Asia/Yakutsk 8:38:40 - LMT 1919 De # [parts of] Respublika Sakha (Yakutiya). # From Oscar van Vlijmen (2009-11-29): -# The Sakha districts are: Bulunskij, Verkhoyanskij, Tomponskij, Ust'-Majskij, -# Ust'-Yanskij. +# The Sakha districts are: Bulunskij, Verkhoyanskij, ... Ust'-Yanskij. Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s 9:00 Russia VLA%sST 1992 Jan 19 2:00s 10:00 Russia VLA%sT 2011 Mar 27 2:00s 11:00 - VLAT + +# From Arthur David Olson (2012-05-09): +# Tomponskij and Ust'-Majskij switched from Vladivostok time to Yakutsk time +# in 2011. +# +# From Paul Eggert (2012-11-25): +# Shanks and Pottenger (2003) has Khandyga on Yakutsk time. +# Make a wild guess that it switched to Vladivostok time in 2004. +# This transition is no doubt wrong, but we have no better info. +# +Zone Asia/Khandyga 9:02:13 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAK%sT 1991 Mar 31 2:00s + 8:00 Russia YAK%sT 1992 Jan 19 2:00s + 9:00 Russia YAK%sT 2004 + 10:00 Russia VLA%sT 2011 Mar 27 2:00s + 11:00 - VLAT 2011 Sep 13 0:00s # Decree 725? + 10:00 - YAKT + # # Sakhalinskaya oblast'. # The Zone name should be Yuzhno-Sakhalinsk, but that's too long. @@ -2296,14 +2401,26 @@ Zone Asia/Sakhalin 9:30:48 - LMT 1905 A # From Oscar van Vlijmen (2009-11-29): # The Sakha districts are: Abyjskij, Allaikhovskij, Verkhhhnekolymskij, Momskij, -# Nizhnekolymskij, Ojmyakonskij, Srednekolymskij. +# Nizhnekolymskij, ... Srednekolymskij. Zone Asia/Magadan 10:03:12 - LMT 1924 May 2 10:00 - MAGT 1930 Jun 21 # Magadan Time 11:00 Russia MAG%sT 1991 Mar 31 2:00s 10:00 Russia MAG%sT 1992 Jan 19 2:00s 11:00 Russia MAG%sT 2011 Mar 27 2:00s 12:00 - MAGT -# + +# From Arthur David Olson (2012-05-09): +# Ojmyakonskij and the Kuril Islands switched from +# Magadan time to Vladivostok time in 2011. +Zone Asia/Ust-Nera 9:32:54 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAKT 1981 Apr 1 + 11:00 Russia MAG%sT 1991 Mar 31 2:00s + 10:00 Russia MAG%sT 1992 Jan 19 2:00s + 11:00 Russia MAG%sT 2011 Mar 27 2:00s + 12:00 - MAGT 2011 Sep 13 0:00s # Decree 725? + 11:00 - VLAT + # From Oscar van Vlijmen (2001-08-25): [This region consists of] # Kamchatskaya oblast', Koryakskij avtonomnyj okrug. # Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/northamerica Fri Mar 15 00:27:24 2013 (r248307) @@ -1019,6 +1019,9 @@ Zone America/Menominee -5:50:27 - LMT 18 # William Willett, The Waste of Daylight, 19th edition # (1914-03) # +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . +# # See the `europe' file for Greenland. # Canada @@ -2554,6 +2557,8 @@ Zone America/Antigua -4:07:12 - LMT 1912 # Bahamas # +# For 1899 Milne gives -5:09:29.5; round that. +# # From Sue Williams (2006-12-07): # The Bahamas announced about a month ago that they plan to change their DST # rules to sync with the U.S. starting in 2007.... @@ -2563,11 +2568,14 @@ Zone America/Antigua -4:07:12 - LMT 1912 Rule Bahamas 1964 1975 - Oct lastSun 2:00 0 S Rule Bahamas 1964 1975 - Apr lastSun 2:00 1:00 D # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Nassau -5:09:24 - LMT 1912 Mar 2 +Zone America/Nassau -5:09:30 - LMT 1912 Mar 2 -5:00 Bahamas E%sT 1976 -5:00 US E%sT # Barbados + +# For 1899 Milne gives -3:58:29.2; round that. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Barb 1977 only - Jun 12 2:00 1:00 D Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S @@ -2575,8 +2583,8 @@ Rule Barb 1978 1980 - Apr Sun>=15 2:00 1 Rule Barb 1979 only - Sep 30 2:00 0 S Rule Barb 1980 only - Sep 25 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Barbados -3:58:28 - LMT 1924 # Bridgetown - -3:58:28 - BMT 1932 # Bridgetown Mean Time +Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown + -3:58:29 - BMT 1932 # Bridgetown Mean Time -4:00 Barb A%sT # Belize @@ -2594,6 +2602,9 @@ Zone America/Belize -5:52:48 - LMT 1912 # Bermuda +# For 1899 Milne gives -4:19:18.3 as the meridian of the clock tower, +# Bermuda dockyard, Ireland I; round that. + # From Dan Jones, reporting in The Royal Gazette (2006-06-26): # Next year, however, clocks in the US will go forward on the second Sunday @@ -2603,7 +2614,7 @@ Zone America/Belize -5:52:48 - LMT 1912 # http://www.theroyalgazette.com/apps/pbcs.dll/article?AID=/20060529/NEWS/105290135 # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Bermuda -4:19:04 - LMT 1930 Jan 1 2:00 # Hamilton +Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton -4:00 - AST 1974 Apr 28 2:00 -4:00 Bahamas A%sT 1976 -4:00 US A%sT @@ -2615,6 +2626,9 @@ Zone America/Cayman -5:25:32 - LMT 1890 -5:00 - EST # Costa Rica + +# Milne gives -5:36:13.3 as San Jose mean time; round to nearest. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule CR 1979 1980 - Feb lastSun 0:00 1:00 D Rule CR 1979 1980 - Jun Sun>=1 0:00 0 S @@ -2625,14 +2639,19 @@ Rule CR 1991 only - Jul 1 0:00 0 S Rule CR 1992 only - Mar 15 0:00 0 S # There are too many San Joses elsewhere, so we'll use `Costa Rica'. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose - -5:36:20 - SJMT 1921 Jan 15 # San Jose Mean Time +Zone America/Costa_Rica -5:36:13 - LMT 1890 # San Jose + -5:36:13 - SJMT 1921 Jan 15 # San Jose Mean Time -6:00 CR C%sT # Coco # no information; probably like America/Costa_Rica # Cuba +# From Paul Eggert (2013-02-21): +# Milne gives -5:28:50.45 for the observatory at Havana, -5:29:23.57 +# for the port, and -5:30 for meteorological observations. +# For now, stick with Shanks & Pottenger. + # From Arthur David Olson (1999-03-29): # The 1999-03-28 exhibition baseball game held in Havana, Cuba, between # the Cuban National Team and the Baltimore Orioles was carried live on @@ -2981,24 +3000,21 @@ Zone America/Guatemala -6:02:04 - LMT 19 # apparently using the same start and end date as USA/Canada. # So this means they have already changed their time. # -# (Sources in French): -# # http://www.alterpresse.org/spip.php?article12510 -# -# # http://radiovision2000haiti.net/home/?p=13253 -# # -# Our coverage: -# -# http://www.timeanddate.com/news/time/haiti-dst-2012.html -# - # From Arthur David Olson (2012-03-11): # The alterpresse.org source seems to show a US-style leap from 2:00 a.m. to # 3:00 a.m. rather than the traditional Haitian jump at midnight. -# Assume a US-style fall back as well XXX. -# Do not yet assume that the change carries forward past 2012 XXX. +# Assume a US-style fall back as well. + +# From Steffen Thorsen (2013-03-10): +# It appears that Haiti is observing DST this year as well, same rules +# as US/Canada. They did it last year as well, and it looks like they +# are going to observe DST every year now... +# +# http://radiovision2000haiti.net/public/haiti-avis-changement-dheure-dimanche/ +# http://www.canalplushaiti.net/?p=6714 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Haiti 1983 only - May 8 0:00 1:00 D @@ -3010,8 +3026,8 @@ Rule Haiti 1988 1997 - Apr Sun>=1 1:00s Rule Haiti 1988 1997 - Oct lastSun 1:00s 0 S Rule Haiti 2005 2006 - Apr Sun>=1 0:00 1:00 D Rule Haiti 2005 2006 - Oct lastSun 0:00 0 S -Rule Haiti 2012 only - Mar Sun>=8 2:00 1:00 D -Rule Haiti 2012 only - Nov Sun>=1 2:00 0 S +Rule Haiti 2012 max - Mar Sun>=8 2:00 1:00 D +Rule Haiti 2012 max - Nov Sun>=1 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Port-au-Prince -4:49:20 - LMT 1890 -4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/southamerica Fri Mar 15 00:27:24 2013 (r248307) @@ -11,6 +11,10 @@ # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# . +# # Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), @@ -381,21 +385,11 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1: # # is the official page for the Province Government). # -# There's also a note in only one of the major national papers (La Nación) at -# +# There's also a note in only one of the major national papers ... # http://www.lanacion.com.ar/nota.asp?nota_id=1107912 -# # -# The press release says: -# (...) anunció que el próximo domingo a las 00:00 los puntanos deberán -# atrasar una hora sus relojes. -# -# A partir de entonces, San Luis establecerá el huso horario propio de -# la Provincia. De esta manera, durante el periodo del calendario anual -# 2009, el cambio horario quedará comprendido entre las 00:00 del tercer -# domingo de marzo y las 24:00 del segundo sábado de octubre. -# Quick&dirty translation -# (...) announced that next Sunday, at 00:00, Puntanos (the San Luis +# The press release says [quick and dirty translation]: +# ... announced that next Sunday, at 00:00, Puntanos (the San Luis # inhabitants) will have to turn back one hour their clocks # # Since then, San Luis will establish its own Province timezone. Thus, @@ -457,6 +451,9 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1: # rules...San Luis is still using "Western ARgentina Time" and it got # stuck on Summer daylight savings time even though the summer is over. +# From Paul Eggert (2013-02-21): +# Milne says Cordoba time was -4:16:48.2. Round to the nearest second. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Buenos Aires (BA), Capital Federal (CF), @@ -812,9 +809,9 @@ Zone America/La_Paz -4:32:36 - LMT 1890 # From Guilherme Bernardes Rodrigues (2011-10-07): # There is news in the media, however there is still no decree about it. -# I just send a e-mail to Zulmira Brandão at +# I just send a e-mail to Zulmira Brandao at # http://pcdsh01.on.br/ the -# oficial agency about time in Brazil, and she confirmed that the old rule is +# official agency about time in Brazil, and she confirmed that the old rule is # still in force. # From Guilherme Bernardes Rodrigues (2011-10-14) @@ -1243,9 +1240,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # b. Saturday, September 1, 2012, clocks should go forward 60 minutes; that is, # at 23:59:59, instead of passing to 0:00, the time should be adjusted to be # 01:00 on September 2. -# -# Note that...this is yet another "temporary" change that will be reevaluated -# AGAIN in 2013. + +# From Steffen Thorsen (2013-02-15): +# According to several news sources, Chile has extended DST this year, +# they will end DST later and start DST earlier than planned. They +# hope to save energy. The new end date is 2013-04-28 00:00 and new +# start date is 2013-09-08 00:00.... +# http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1288,10 +1289,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 only - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 only - Sep Sun>=2 4:00u 1:00 S -Rule Chile 2013 max - Mar Sun>=9 3:00u 0 - -Rule Chile 2013 max - Oct Sun>=9 4:00u 1:00 S +Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1313,17 +1312,23 @@ Zone Pacific/Easter -7:17:44 - LMT 1890 # San Felix, and Antarctic bases, are like America/Santiago. # Colombia + +# Milne gives 4:56:16.4 for Bogota time in 1899; round to nearest. He writes, +# "A variation of fifteen minutes in the public clocks of Bogota is not rare." + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule CO 1992 only - May 3 0:00 1:00 S Rule CO 1993 only - Apr 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Bogota -4:56:20 - LMT 1884 Mar 13 - -4:56:20 - BMT 1914 Nov 23 # Bogota Mean Time +Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 + -4:56:16 - BMT 1914 Nov 23 # Bogota Mean Time -5:00 CO CO%sT # Colombia Time # Malpelo, Providencia, San Andres # no information; probably like America/Bogota # Curacao + +# Milne gives 4:35:46.9 for Curacao mean time; round to nearest. # # From Paul Eggert (2006-03-22): # Shanks & Pottenger say that The Bottom and Philipsburg have been at @@ -1340,7 +1345,7 @@ Zone America/Bogota -4:56:20 - LMT 1884 # though, as far as we know. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad +Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST @@ -1354,6 +1359,8 @@ Link America/Curacao America/Kralendijk # Ecuador # +# Milne says the Sentral and South American Telegraph Company used -5:24:15. +# # From Paul Eggert (2007-03-04): # Apparently Ecuador had a failed experiment with DST in 1992. # (2007-02-27) and @@ -1560,6 +1567,15 @@ Rule Para 2005 2009 - Mar Sun>=8 0:00 0 # ... Rule Para 2010 max - Oct Sun>=1 0:00 1:00 S Rule Para 2010 max - Apr Sun>=8 0:00 0 - +# +# From Steffen Thorsen (2013-03-07): +# Paraguay will end DST on 2013-03-24 00:00.... +# They do not tell if this will be a permanent change or just this year.... +# http://www.ande.gov.py/interna.php?id=1075 +# +# From Paul Eggert (2013-03-07): +# For now, assume it's just this year. +Rule Para 2013 only - Mar 24 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 Modified: head/contrib/tzdata/zone.tab ============================================================================== --- head/contrib/tzdata/zone.tab Fri Mar 15 00:25:54 2013 (r248306) +++ head/contrib/tzdata/zone.tab Fri Mar 15 00:27:24 2013 (r248307) @@ -159,7 +159,8 @@ CW +1211-06900 America/Curacao CX -1025+10543 Indian/Christmas CY +3510+03322 Asia/Nicosia CZ +5005+01426 Europe/Prague -DE +5230+01322 Europe/Berlin +DE +5230+01322 Europe/Berlin most locations +DE +4742+00841 Europe/Busingen Busingen DJ +1136+04309 Africa/Djibouti DK +5540+01235 Europe/Copenhagen DM +1518-06124 America/Dominica @@ -341,8 +342,10 @@ RU +5345+08707 Asia/Novokuznetsk Moscow+ RU +5601+09250 Asia/Krasnoyarsk Moscow+04 - Yenisei River RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River +RU +623923+1353314 Asia/Khandyga Moscow+06 - Tomponsky, Ust-Maysky RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island +RU +643337+1431336 Asia/Ust-Nera Moscow+07 - Oymyakonsky RU +5934+15048 Asia/Magadan Moscow+08 - Magadan RU +5301+15839 Asia/Kamchatka Moscow+08 - Kamchatka RU +6445+17729 Asia/Anadyr Moscow+08 - Bering Sea From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 02:52: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]) by hub.freebsd.org (Postfix) with ESMTP id 936B445D; Fri, 15 Mar 2013 02:52:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 76C8FABC; Fri, 15 Mar 2013 02:52:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F2qcmU030025; Fri, 15 Mar 2013 02:52:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F2qcpx030023; Fri, 15 Mar 2013 02:52:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303150252.r2F2qcpx030023@svn.freebsd.org> From: Adrian Chadd Date: Fri, 15 Mar 2013 02:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248311 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 15 Mar 2013 02:52:38 -0000 Author: adrian Date: Fri Mar 15 02:52:37 2013 New Revision: 248311 URL: http://svnweb.freebsd.org/changeset/base/248311 Log: Add locking around the new holdingbf code. Since this is being done during buffer free, it's a crap shoot whether the TX path lock is held or not. I tried putting the ath_freebuf() code inside the TX lock and I got all kinds of locking issues - it turns out that the buffer free path sometimes is called with the lock held and sometimes isn't. So I'll go and fix that soon. Hence for now the holdingbf buffers are protected by the TXBUF lock. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Mar 15 01:02:35 2013 (r248310) +++ head/sys/dev/ath/if_ath.c Fri Mar 15 02:52:37 2013 (r248311) @@ -4156,14 +4156,13 @@ ath_returnbuf_head(struct ath_softc *sc, static void ath_txq_freeholdingbuf(struct ath_softc *sc, struct ath_txq *txq) { + ATH_TXBUF_LOCK_ASSERT(sc); if (txq->axq_holdingbf == NULL) return; txq->axq_holdingbf->bf_flags &= ~ATH_BUF_BUSY; - ATH_TXBUF_LOCK(sc); ath_returnbuf_tail(sc, txq->axq_holdingbf); - ATH_TXBUF_UNLOCK(sc); txq->axq_holdingbf = NULL; } @@ -4176,6 +4175,8 @@ ath_txq_addholdingbuf(struct ath_softc * { struct ath_txq *txq; + ATH_TXBUF_LOCK_ASSERT(sc); + /* XXX assert ATH_BUF_BUSY is set */ /* XXX assert the tx queue is under the max number */ @@ -4188,10 +4189,8 @@ ath_txq_addholdingbuf(struct ath_softc * ath_returnbuf_tail(sc, bf); return; } - txq = &sc->sc_txq[bf->bf_state.bfs_tx_queue]; ath_txq_freeholdingbuf(sc, txq); - txq->axq_holdingbf = bf; } @@ -4219,7 +4218,9 @@ ath_freebuf(struct ath_softc *sc, struct * If this buffer is busy, push it onto the holding queue */ if (bf->bf_flags & ATH_BUF_BUSY) { + ATH_TXBUF_LOCK(sc); ath_txq_addholdingbuf(sc, bf); + ATH_TXBUF_UNLOCK(sc); return; } @@ -4342,7 +4343,9 @@ ath_tx_draintxq(struct ath_softc *sc, st /* * Free the holding buffer if it exists */ + ATH_TXBUF_LOCK(sc); ath_txq_freeholdingbuf(sc, txq); + ATH_TXBUF_UNLOCK(sc); /* * Drain software queued frames which are on Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Fri Mar 15 01:02:35 2013 (r248310) +++ head/sys/dev/ath/if_athvar.h Fri Mar 15 02:52:37 2013 (r248311) @@ -329,6 +329,15 @@ struct ath_txq { u_int axq_intrcnt; /* interrupt count */ u_int32_t *axq_link; /* link ptr in last TX desc */ TAILQ_HEAD(axq_q_s, ath_buf) axq_q; /* transmit queue */ + /* + * XXX the holdingbf field is protected by the TXBUF lock + * for now, NOT the TX lock. + * + * Architecturally, it would likely be better to move + * the holdingbf field to a separate array in ath_softc + * just to highlight that it's not protected by the normal + * TX path lock. + */ struct ath_buf *axq_holdingbf; /* holding TX buffer */ char axq_name[12]; /* e.g. "ath0_txq4" */ From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 04:43:28 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]) by hub.freebsd.org (Postfix) with ESMTP id 6B193516; Fri, 15 Mar 2013 04:43:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C232F2C; Fri, 15 Mar 2013 04:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F4hS1a064221; Fri, 15 Mar 2013 04:43:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F4hSGR064220; Fri, 15 Mar 2013 04:43:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303150443.r2F4hSGR064220@svn.freebsd.org> From: Adrian Chadd Date: Fri, 15 Mar 2013 04:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248312 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 15 Mar 2013 04:43:28 -0000 Author: adrian Date: Fri Mar 15 04:43:27 2013 New Revision: 248312 URL: http://svnweb.freebsd.org/changeset/base/248312 Log: Remove a now incorrect comment. This comment dates back to my initial stab at TX aggregation completion, where I didn't even bother trying to do software retries. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Mar 15 02:52:37 2013 (r248311) +++ head/sys/dev/ath/if_ath_tx.c Fri Mar 15 04:43:27 2013 (r248312) @@ -4176,8 +4176,6 @@ ath_tx_comp_cleanup_aggr(struct ath_soft /* * Handle completion of an set of aggregate frames. * - * XXX for now, simply complete each sub-frame. - * * Note: the completion handler is the last descriptor in the aggregate, * not the last descriptor in the first frame. */ From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 06:07:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F2A08D53; Fri, 15 Mar 2013 06:07:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 61BCD1C7; Fri, 15 Mar 2013 06:07:57 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r2F67riL010394; Fri, 15 Mar 2013 08:07:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.0 kib.kiev.ua r2F67riL010394 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r2F67rjP010393; Fri, 15 Mar 2013 08:07:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Mar 2013 08:07:53 +0200 From: Konstantin Belousov To: Edward Tomasz Napierala Subject: Re: svn commit: r248298 - head/sys/kern Message-ID: <20130315060753.GS3794@kib.kiev.ua> References: <201303142320.r2ENKJln060775@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Xqa6BLk9/BAwVQKe" Content-Disposition: inline In-Reply-To: <201303142320.r2ENKJln060775@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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.14 Precedence: list List-Id: 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, 15 Mar 2013 06:07:58 -0000 --Xqa6BLk9/BAwVQKe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 14, 2013 at 11:20:19PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Mar 14 23:20:18 2013 > New Revision: 248298 > URL: http://svnweb.freebsd.org/changeset/base/248298 >=20 > Log: > Accessing td_state requires thread lock to be held. It is not the access to td_state which should be protected, but the consistency between thread state and later action based on the state, which should be atomic. --Xqa6BLk9/BAwVQKe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRQrq5AAoJEJDCuSvBvK1BUJQP/0GdFpI0P9baTNSlwgtrFoco BVReg34Wy4zV1bhOrVuM88LcJ6U1txj5cfwz9ZNhYoFxRXGuzvRnipiLN1Ya74qJ bVlGb8rIa2kF6CtWFEJ4QX6XV8C7lkacS7vikR64pha5WSxlOto8YtsZFsqlbyV9 e4T8jCQO0z/Q+DtUMXyR0WMqZVXmWJx0ZOpTTIPlA1PPLcolP/jn7/MCsfvm0Iq9 YQo1OOX6tF+FEhUUzkbJwFK9T4vHkOkQR9r9ntO4ZIEpVw2M9xYo7L3CCK0v0y0R xzBqEzG9Hhacjn5J4grBUS4gtqTniNKbC6kjBO6NFfMd+34Ti/7TudKW2jHsrLl4 iN3xK0Aab1Ex9UbSzbxQkteWgkU2BfVwNCxHJ+/ruLcZ7urnPsHTNJxF/LnhA06v KLeBjoBmEkaYJykqTjmZ5TTZxkB+Cw4zvt8j8QSCAcc9rMifrNU4DqymnKiRccYT 8BzA2MB6ts90BkJdbLhNLca5fIffXwEzUyH4hRGTczSFbOSXOKKuCq0P8tpEoqXL dNkLKWX8TWBWYEN0Ub58rvKhf4dLepDXdGG2UIuEnZo+ib+P3Y845A1uPn7UV2kZ 33b7Zmv3KM3YTPsj6loo8uFQlupdRGme2vk9Cd8crOzSautJ0kl9JisT4sEhScQp v01Kjlr+7PFXihiWzqhm =7a3w -----END PGP SIGNATURE----- --Xqa6BLk9/BAwVQKe-- From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 09:19:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09ACCA84; Fri, 15 Mar 2013 09:19:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F077EC01; Fri, 15 Mar 2013 09:19:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F9JJX7049627; Fri, 15 Mar 2013 09:19:19 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2F9JJpx049626; Fri, 15 Mar 2013 09:19:19 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303150919.r2F9JJpx049626@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 09:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248314 - head/lib/libipsec 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.14 Precedence: list List-Id: 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, 15 Mar 2013 09:19:20 -0000 Author: glebius Date: Fri Mar 15 09:19:19 2013 New Revision: 248314 URL: http://svnweb.freebsd.org/changeset/base/248314 Log: Make this more compilable. Modified: head/lib/libipsec/test-policy.c Modified: head/lib/libipsec/test-policy.c ============================================================================== --- head/lib/libipsec/test-policy.c Fri Mar 15 05:00:51 2013 (r248313) +++ head/lib/libipsec/test-policy.c Fri Mar 15 09:19:19 2013 (r248314) @@ -75,14 +75,13 @@ struct req_t { { 1, "out ipsec ah/transport esp/use" }, { 1, "in ipsec ah/transport esp/tunnel" }, { 0, "in ipsec ah/transport esp/tunnel/::1-::1" }, -{ 0, "in ipsec - ah / transport - esp / tunnel / ::1-::2" }, -{ 0, "out ipsec - ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require - ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require - ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require - " }, +{ 0, "in ipsec\n" + "ah / transport\n" + "esp / tunnel / ::1-::2" }, +{ 0, "out ipsec\n" + "ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require\n" + "ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require\n" + "ah/transport/::1-::2 esp/tunnel/::3-::4/use ah/transport/::5-::6/require\n" }, { 0, "out ipsec esp/transport/fec0::10-fec0::11/use" }, }; From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 10:15:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EC0A2C6A; Fri, 15 Mar 2013 10:15:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DAFCAF79; Fri, 15 Mar 2013 10:15:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FAF7PK067659; Fri, 15 Mar 2013 10:15:07 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FAF7O0067658; Fri, 15 Mar 2013 10:15:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151015.r2FAF7O0067658@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 10:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248315 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 10:15:08 -0000 Author: glebius Date: Fri Mar 15 10:15:07 2013 New Revision: 248315 URL: http://svnweb.freebsd.org/changeset/base/248315 Log: Make m_get2() never use clusters that are bigger than PAGE_SIZE. Requested by: andre, jhb Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Fri Mar 15 09:19:19 2013 (r248314) +++ head/sys/kern/uipc_mbuf.c Fri Mar 15 10:15:07 2013 (r248315) @@ -92,7 +92,6 @@ m_get2(int size, int how, short type, in { struct mb_args args; struct mbuf *m, *n; - uma_zone_t zone; args.flags = flags; args.type = type; @@ -101,24 +100,15 @@ m_get2(int size, int how, short type, in return (uma_zalloc_arg(zone_mbuf, &args, how)); if (size <= MCLBYTES) return (uma_zalloc_arg(zone_pack, &args, how)); - if (size > MJUM16BYTES) + + if (size > MJUMPAGESIZE) return (NULL); m = uma_zalloc_arg(zone_mbuf, &args, how); if (m == NULL) return (NULL); -#if MJUMPAGESIZE != MCLBYTES - if (size <= MJUMPAGESIZE) - zone = zone_jumbop; - else -#endif - if (size <= MJUM9BYTES) - zone = zone_jumbo9; - else - zone = zone_jumbo16; - - n = uma_zalloc_arg(zone, m, how); + n = uma_zalloc_arg(zone_jumbop, m, how); if (n == NULL) { uma_zfree(zone_mbuf, m); return (NULL); From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 10:17: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]) by hub.freebsd.org (Postfix) with ESMTP id C5809E70; Fri, 15 Mar 2013 10:17:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B70A0FB6; Fri, 15 Mar 2013 10:17:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FAHOAK067990; Fri, 15 Mar 2013 10:17:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FAHO2C067989; Fri, 15 Mar 2013 10:17:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151017.r2FAHO2C067989@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 10:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248316 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 10:17:24 -0000 Author: glebius Date: Fri Mar 15 10:17:24 2013 New Revision: 248316 URL: http://svnweb.freebsd.org/changeset/base/248316 Log: - Use m_get2() instead of hand allocating. - No need for u_int cast here. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Fri Mar 15 10:15:07 2013 (r248315) +++ head/sys/kern/uipc_syscalls.c Fri Mar 15 10:17:24 2013 (r248316) @@ -1701,18 +1701,16 @@ sockargs(mp, buf, buflen, type) struct mbuf *m; int error; - if ((u_int)buflen > MLEN) { + if (buflen > MLEN) { #ifdef COMPAT_OLDSOCK - if (type == MT_SONAME && (u_int)buflen <= 112) + if (type == MT_SONAME && buflen <= 112) buflen = MLEN; /* unix domain compat. hack */ else #endif - if ((u_int)buflen > MCLBYTES) + if (buflen > MCLBYTES) return (EINVAL); } - m = m_get(M_WAITOK, type); - if ((u_int)buflen > MLEN) - MCLGET(m, M_WAITOK); + m = m_get2(buflen, M_WAITOK, type, 0); m->m_len = buflen; error = copyin(buf, mtod(m, caddr_t), (u_int)buflen); if (error) From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 10:20:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66B3C19E; Fri, 15 Mar 2013 10:20:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 59BD9FF5; Fri, 15 Mar 2013 10:20:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FAKGKF068418; Fri, 15 Mar 2013 10:20:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FAKGp9068417; Fri, 15 Mar 2013 10:20:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151020.r2FAKGp9068417@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 10:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248317 - head/sys/netipsec 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.14 Precedence: list List-Id: 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, 15 Mar 2013 10:20:16 -0000 Author: glebius Date: Fri Mar 15 10:20:15 2013 New Revision: 248317 URL: http://svnweb.freebsd.org/changeset/base/248317 Log: Use m_get2() + m_align() instead of hand made key_alloc_mbuf(). Code examination shows, that although key_alloc_mbuf() could return chains, the callers never use chains, so m_get2() should suffice. Sponsored by: Nginx, Inc. Modified: head/sys/netipsec/key.c Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Fri Mar 15 10:17:24 2013 (r248316) +++ head/sys/netipsec/key.c Fri Mar 15 10:20:15 2013 (r248317) @@ -547,7 +547,6 @@ static const char *key_getfqdn __P((void static const char *key_getuserfqdn __P((void)); #endif static void key_sa_chgstate __P((struct secasvar *, u_int8_t)); -static struct mbuf *key_alloc_mbuf __P((int)); static __inline void sa_initref(struct secasvar *sav) @@ -1634,15 +1633,11 @@ key_sp2msg(sp) tlen = key_getspreqmsglen(sp); - m = key_alloc_mbuf(tlen); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); - return NULL; - } - + m = m_get2(tlen, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, tlen); m->m_len = tlen; - m->m_next = NULL; xpl = mtod(m, struct sadb_x_policy *); bzero(xpl, tlen); @@ -1732,12 +1727,11 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va mtod(n, caddr_t)); } else if (i < ndeep) { len = mhp->extlen[idx]; - n = key_alloc_mbuf(len); - if (!n || n->m_next) { /*XXX*/ - if (n) - m_freem(n); + n = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (n == NULL) goto fail; - } + m_align(n, len); + n->m_len = len; m_copydata(m, mhp->extoff[idx], mhp->extlen[idx], mtod(n, caddr_t)); } else { @@ -2602,13 +2596,13 @@ key_spdexpire(sp) /* create lifetime extension (current and hard) */ len = PFKEY_ALIGN8(sizeof(*lt)) * 2; - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) { error = ENOBUFS; goto fail; } + m_align(m, len); + m->m_len = len; bzero(mtod(m, caddr_t), len); lt = mtod(m, struct sadb_lifetime *); lt->sadb_lifetime_len = PFKEY_UNIT64(sizeof(struct sadb_lifetime)); @@ -3602,15 +3596,12 @@ key_setsadbsa(sav) int len; len = PFKEY_ALIGN8(sizeof(struct sadb_sa)); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); - return NULL; - } - + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_sa *); - bzero(p, len); p->sadb_sa_len = PFKEY_UNIT64(len); p->sadb_sa_exttype = SADB_EXT_SA; @@ -3636,13 +3627,11 @@ key_setsadbaddr(u_int16_t exttype, const len = PFKEY_ALIGN8(sizeof(struct sadb_address)) + PFKEY_ALIGN8(saddr->sa_len); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); - return NULL; - } - + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_address *); bzero(p, len); @@ -3682,13 +3671,11 @@ key_setsadbxsa2(u_int8_t mode, u_int32_t size_t len; len = PFKEY_ALIGN8(sizeof(struct sadb_x_sa2)); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); - return NULL; - } - + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_x_sa2 *); bzero(p, len); @@ -3716,13 +3703,11 @@ key_setsadbxtype(u_int16_t type) len = PFKEY_ALIGN8(sizeof(struct sadb_x_nat_t_type)); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) return (NULL); - } - + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_x_nat_t_type *); bzero(p, len); @@ -3745,13 +3730,11 @@ key_setsadbxport(u_int16_t port, u_int16 len = PFKEY_ALIGN8(sizeof(struct sadb_x_nat_t_port)); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) return (NULL); - } - + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_x_nat_t_port *); bzero(p, len); @@ -3822,13 +3805,11 @@ key_setsadbxpolicy(u_int16_t type, u_int size_t len; len = PFKEY_ALIGN8(sizeof(struct sadb_x_policy)); - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); - return NULL; - } - + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_x_policy *); bzero(p, len); @@ -6951,13 +6932,13 @@ key_expire(struct secasvar *sav) /* create lifetime extension (current and soft) */ len = PFKEY_ALIGN8(sizeof(*lt)) * 2; - m = key_alloc_mbuf(len); - if (!m || m->m_next) { /*XXX*/ - if (m) - m_freem(m); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) { error = ENOBUFS; goto fail; } + m_align(m, len); + m->m_len = len; bzero(mtod(m, caddr_t), len); lt = mtod(m, struct sadb_lifetime *); lt->sadb_lifetime_len = PFKEY_UNIT64(sizeof(struct sadb_lifetime)); @@ -7959,45 +7940,6 @@ key_sa_stir_iv(sav) key_randomfill(sav->iv, sav->ivlen); } -/* XXX too much? */ -static struct mbuf * -key_alloc_mbuf(l) - int l; -{ - struct mbuf *m = NULL, *n; - int len, t; - - len = l; - while (len > 0) { - MGET(n, M_NOWAIT, MT_DATA); - if (n && len > MLEN) - MCLGET(n, M_NOWAIT); - if (!n) { - m_freem(m); - return NULL; - } - - n->m_next = NULL; - n->m_len = 0; - n->m_len = M_TRAILINGSPACE(n); - /* use the bottom of mbuf, hoping we can prepend afterwards */ - if (n->m_len > len) { - t = (n->m_len - len) & ~(sizeof(long) - 1); - n->m_data += t; - n->m_len = len; - } - - len -= n->m_len; - - if (m) - m_cat(m, n); - else - m = n; - } - - return m; -} - /* * Take one of the kernel's security keys and convert it into a PF_KEY * structure within an mbuf, suitable for sending up to a waiting @@ -8022,9 +7964,11 @@ key_setkey(struct seckey *src, u_int16_t return NULL; len = PFKEY_ALIGN8(sizeof(struct sadb_key) + _KEYLEN(src)); - m = key_alloc_mbuf(len); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); if (m == NULL) return NULL; + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_key *); bzero(p, len); p->sadb_key_len = PFKEY_UNIT64(len); @@ -8059,9 +8003,11 @@ key_setlifetime(struct seclifetime *src, if (src == NULL) return NULL; - m = key_alloc_mbuf(len); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); if (m == NULL) return m; + m_align(m, len); + m->m_len = len; p = mtod(m, struct sadb_lifetime *); bzero(p, len); From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 10:21:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1A41C32B; Fri, 15 Mar 2013 10:21:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E96729C; Fri, 15 Mar 2013 10:21:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FALI45070152; Fri, 15 Mar 2013 10:21:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FALIPX070145; Fri, 15 Mar 2013 10:21:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151021.r2FALIPX070145@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 10:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248318 - in head/sys: kern nfs xdr 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.14 Precedence: list List-Id: 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, 15 Mar 2013 10:21:19 -0000 Author: glebius Date: Fri Mar 15 10:21:18 2013 New Revision: 248318 URL: http://svnweb.freebsd.org/changeset/base/248318 Log: Use m_get() and m_getcl() instead of compat macros. Modified: head/sys/kern/uipc_sockbuf.c head/sys/nfs/nfs_common.c head/sys/xdr/xdr_mbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Fri Mar 15 10:20:15 2013 (r248317) +++ head/sys/kern/uipc_sockbuf.c Fri Mar 15 10:21:18 2013 (r248318) @@ -644,8 +644,8 @@ sbappendaddr_locked(struct sockbuf *sb, if (asa->sa_len > MLEN) return (0); #endif - MGET(m, M_NOWAIT, MT_SONAME); - if (m == 0) + m = m_get(M_NOWAIT, MT_SONAME); + if (m == NULL) return (0); m->m_len = asa->sa_len; bcopy(asa, mtod(m, caddr_t), asa->sa_len); Modified: head/sys/nfs/nfs_common.c ============================================================================== --- head/sys/nfs/nfs_common.c Fri Mar 15 10:20:15 2013 (r248317) +++ head/sys/nfs/nfs_common.c Fri Mar 15 10:21:18 2013 (r248318) @@ -192,7 +192,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d } else if (siz > MHLEN) { panic("nfs S too big"); } else { - MGET(mp2, how, MT_DATA); + mp2 = m_get(how, MT_DATA); if (mp2 == NULL) return (NULL); mp2->m_len = siz; @@ -266,7 +266,7 @@ nfsm_build_xx(int s, struct mbuf **mb, c void *ret; if (s > M_TRAILINGSPACE(*mb)) { - MGET(mb2, M_WAITOK, MT_DATA); + mb2 = m_get(M_WAITOK, MT_DATA); if (s > MLEN) panic("build > MLEN"); (*mb)->m_next = mb2; Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Fri Mar 15 10:20:15 2013 (r248317) +++ head/sys/xdr/xdr_mbuf.c Fri Mar 15 10:21:18 2013 (r248318) @@ -123,7 +123,7 @@ xdrmbuf_getall(XDR *xdrs) if (m) m_adj(m, xdrs->x_handy); else - MGET(m, M_WAITOK, MT_DATA); + m = m_get(M_WAITOK, MT_DATA); return (m); } @@ -228,9 +228,10 @@ xdrmbuf_putbytes(XDR *xdrs, const char * if (xdrs->x_handy == m->m_len && M_TRAILINGSPACE(m) == 0) { if (!m->m_next) { - MGET(n, M_WAITOK, m->m_type); if (m->m_flags & M_EXT) - MCLGET(n, M_WAITOK); + n = m_getcl(M_WAITOK, m->m_type, 0); + else + n = m_get(M_WAITOK, m->m_type); m->m_next = n; } m = m->m_next; From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 11:16: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]) by hub.freebsd.org (Postfix) with ESMTP id 859F3A76; Fri, 15 Mar 2013 11:16:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9167C1; Fri, 15 Mar 2013 11:16:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FBGD3Y086479; Fri, 15 Mar 2013 11:16:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FBGCRC086477; Fri, 15 Mar 2013 11:16:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303151116.r2FBGCRC086477@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Mar 2013 11:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248319 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 11:16:13 -0000 Author: kib Date: Fri Mar 15 11:16:12 2013 New Revision: 248319 URL: http://svnweb.freebsd.org/changeset/base/248319 Log: Implement the helper function vn_io_fault_pgmove(), intended to use by the filesystem VOP_READ() and VOP_WRITE() implementations in the same way as vn_io_fault_uiomove() over the unmapped buffers. Helper provides the convenient wrapper over the pmap_copy_pages() for struct uio consumers, taking care of the TDP_UIOHELD situations. Sponsored by: The FreeBSD Foundation Tested by: pho MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Mar 15 10:21:18 2013 (r248318) +++ head/sys/kern/vfs_vnops.c Fri Mar 15 11:16:12 2013 (r248319) @@ -1122,6 +1122,45 @@ vn_io_fault_uiomove(char *data, int xfer return (error); } +int +vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, int xfersize, + struct uio *uio) +{ + struct thread *td; + vm_offset_t iov_base; + int cnt, pgadv; + + td = curthread; + if ((td->td_pflags & TDP_UIOHELD) == 0 || + uio->uio_segflg != UIO_USERSPACE) + return (uiomove_fromphys(ma, offset, xfersize, uio)); + + KASSERT(uio->uio_iovcnt == 1, ("uio_iovcnt %d", uio->uio_iovcnt)); + cnt = xfersize > uio->uio_resid ? uio->uio_resid : xfersize; + iov_base = (vm_offset_t)uio->uio_iov->iov_base; + switch (uio->uio_rw) { + case UIO_WRITE: + pmap_copy_pages(td->td_ma, iov_base & PAGE_MASK, ma, + offset, cnt); + break; + case UIO_READ: + pmap_copy_pages(ma, offset, td->td_ma, iov_base & PAGE_MASK, + cnt); + break; + } + pgadv = ((iov_base + cnt) >> PAGE_SHIFT) - (iov_base >> PAGE_SHIFT); + td->td_ma += pgadv; + KASSERT(td->td_ma_cnt >= pgadv, ("consumed pages %d %d", td->td_ma_cnt, + pgadv)); + td->td_ma_cnt -= pgadv; + uio->uio_iov->iov_base = (char *)(iov_base + cnt); + uio->uio_iov->iov_len -= cnt; + uio->uio_resid -= cnt; + uio->uio_offset += cnt; + return (0); +} + + /* * File table truncate routine. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Mar 15 10:21:18 2013 (r248318) +++ head/sys/sys/vnode.h Fri Mar 15 11:16:12 2013 (r248319) @@ -693,6 +693,8 @@ int vn_vget_ino(struct vnode *vp, ino_t struct vnode **rvp); int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio); +int vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, int xfersize, + struct uio *uio); #define vn_rangelock_unlock(vp, cookie) \ rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp)) From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:33:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 14CB9A1A; Fri, 15 Mar 2013 12:33:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01759AFC; Fri, 15 Mar 2013 12:33:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCXNxu010136; Fri, 15 Mar 2013 12:33:23 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCXNC3010135; Fri, 15 Mar 2013 12:33:23 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151233.r2FCXNC3010135@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 12:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248320 - head/sys/netinet6 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:33:24 -0000 Author: glebius Date: Fri Mar 15 12:33:23 2013 New Revision: 248320 URL: http://svnweb.freebsd.org/changeset/base/248320 Log: Use m_getcl() instead of hand made allocation. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/ip6_input.c Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Mar 15 11:16:12 2013 (r248319) +++ head/sys/netinet6/ip6_input.c Fri Mar 15 12:33:23 2013 (r248320) @@ -497,21 +497,16 @@ ip6_input(struct mbuf *m) if (m && m->m_next != NULL && m->m_pkthdr.len < MCLBYTES) { struct mbuf *n; - MGETHDR(n, M_NOWAIT, MT_HEADER); - if (n) - M_MOVE_PKTHDR(n, m); - if (n && n->m_pkthdr.len > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - m_freem(n); - n = NULL; - } - } + if (m->m_pkthdr.len > MHLEN) + n = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + else + n = m_gethdr(M_NOWAIT, MT_DATA); if (n == NULL) { m_freem(m); return; /* ENOBUFS */ } + M_MOVE_PKTHDR(n, m); m_copydata(m, 0, n->m_pkthdr.len, mtod(n, caddr_t)); n->m_len = n->m_pkthdr.len; m_freem(m); From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:50:31 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]) by hub.freebsd.org (Postfix) with ESMTP id 1BEE6DD8; Fri, 15 Mar 2013 12:50:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 093D0C27; Fri, 15 Mar 2013 12:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCoU9v014206; Fri, 15 Mar 2013 12:50:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCoUJs014202; Fri, 15 Mar 2013 12:50:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151250.r2FCoUJs014202@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 12:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248321 - head/sys/netinet6 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:50:31 -0000 Author: glebius Date: Fri Mar 15 12:50:29 2013 New Revision: 248321 URL: http://svnweb.freebsd.org/changeset/base/248321 Log: - Use m_getcl() instead of hand allocating. - Use m_get()/m_gethdr() instead of macros. - Remove superfluous cleaning of mbuf fields after allocation. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c head/sys/netinet6/mld6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Mar 15 12:33:23 2013 (r248320) +++ head/sys/netinet6/icmp6.c Fri Mar 15 12:50:29 2013 (r248321) @@ -581,7 +581,7 @@ icmp6_input(struct mbuf **mp, int *offp, const int maxlen = sizeof(*nip6) + sizeof(*nicmp6); int n0len; - MGETHDR(n, M_NOWAIT, n0->m_type); + n = m_gethdr(M_NOWAIT, n0->m_type); n0len = n0->m_pkthdr.len; /* save for use below */ if (n) M_MOVE_PKTHDR(n, n0); /* FIB copied. */ @@ -699,7 +699,7 @@ icmp6_input(struct mbuf **mp, int *offp, /* Give up remote */ break; } - MGETHDR(n, M_NOWAIT, m->m_type); + n = m_gethdr(M_NOWAIT, m->m_type); if (n && maxlen > MHLEN) { MCLGET(n, M_NOWAIT); if ((n->m_flags & M_EXT) == 0) { @@ -1495,7 +1495,7 @@ ni6_input(struct mbuf *m, int off) } /* allocate an mbuf to reply. */ - MGETHDR(n, M_NOWAIT, m->m_type); + n = m_gethdr(M_NOWAIT, m->m_type); if (n == NULL) { m_freem(m); return (NULL); @@ -1608,16 +1608,13 @@ ni6_nametodns(const char *name, int name else len = MCLBYTES; - /* because MAXHOSTNAMELEN is usually 256, we use cluster mbuf */ - MGET(m, M_NOWAIT, MT_DATA); - if (m && len > MLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) - goto fail; - } - if (!m) + /* Because MAXHOSTNAMELEN is usually 256, we use cluster mbuf. */ + if (len > MLEN) + m = m_getcl(M_NOWAIT, MT_DATA, 0); + else + m = m_get(M_NOWAIT, MT_DATA); + if (m == NULL) goto fail; - m->m_next = NULL; if (old) { m->m_len = len; @@ -2063,7 +2060,7 @@ icmp6_rip6_input(struct mbuf **mp, int o */ if ((m->m_flags & M_EXT) && m->m_next == NULL && m->m_len <= MHLEN) { - MGET(n, M_NOWAIT, m->m_type); + n = m_get(M_NOWAIT, m->m_type); if (n != NULL) { if (m_dup_pkthdr(n, m, M_NOWAIT)) { bcopy(m->m_data, n->m_data, @@ -2113,7 +2110,7 @@ icmp6_rip6_input(struct mbuf **mp, int o m->m_len <= MHLEN) { struct mbuf *n; - MGET(n, M_NOWAIT, m->m_type); + n = m_get(M_NOWAIT, m->m_type); if (n != NULL) { if (m_dup_pkthdr(n, m, M_NOWAIT)) { bcopy(m->m_data, n->m_data, m->m_len); @@ -2592,14 +2589,10 @@ icmp6_redirect_output(struct mbuf *m0, s #if IPV6_MMTU >= MCLBYTES # error assumption failed about IPV6_MMTU and MCLBYTES #endif - MGETHDR(m, M_NOWAIT, MT_HEADER); - if (m && IPV6_MMTU >= MHLEN) - MCLGET(m, M_NOWAIT); - if (!m) + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) goto fail; M_SETFIB(m, rt->rt_fibnum); - m->m_pkthdr.rcvif = NULL; - m->m_len = 0; maxlen = M_TRAILINGSPACE(m); maxlen = min(IPV6_MMTU, maxlen); /* just for safety */ Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Fri Mar 15 12:33:23 2013 (r248320) +++ head/sys/netinet6/ip6_mroute.c Fri Mar 15 12:50:29 2013 (r248321) @@ -1698,11 +1698,10 @@ register_send(struct ip6_hdr *ip6, struc #endif ++pim6stat.pim6s_snd_registers; - /* Make a copy of the packet to send to the user level process */ - MGETHDR(mm, M_NOWAIT, MT_HEADER); + /* Make a copy of the packet to send to the user level process. */ + mm = m_gethdr(M_NOWAIT, MT_DATA); if (mm == NULL) return (ENOBUFS); - mm->m_pkthdr.rcvif = NULL; mm->m_data += max_linkhdr; mm->m_len = sizeof(struct ip6_hdr); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Mar 15 12:33:23 2013 (r248320) +++ head/sys/netinet6/ip6_output.c Fri Mar 15 12:50:29 2013 (r248321) @@ -774,9 +774,7 @@ again: /* * XXX: ip6_mforward expects that rcvif is NULL * when it is called from the originating path. - * However, it is not always the case, since - * some versions of MGETHDR() does not - * initialize the field. + * However, it may not always be the case. */ m->m_pkthdr.rcvif = NULL; if (ip6_mforward(ip6, ifp, m) != 0) { @@ -1122,13 +1120,12 @@ passout: */ m0 = m; for (off = hlen; off < tlen; off += len) { - MGETHDR(m, M_NOWAIT, MT_HEADER); + m = m_gethdr(M_NOWAIT, MT_DATA); if (!m) { error = ENOBUFS; V_ip6stat.ip6s_odropped++; goto sendorfree; } - m->m_pkthdr.rcvif = NULL; m->m_flags = m0->m_flags & M_COPYFLAGS; /* incl. FIB */ *mnext = m; mnext = &m->m_nextpkt; @@ -3045,8 +3042,8 @@ ip6_splithdr(struct mbuf *m, struct ip6_ ip6 = mtod(m, struct ip6_hdr *); if (m->m_len > sizeof(*ip6)) { - MGETHDR(mh, M_NOWAIT, MT_HEADER); - if (mh == 0) { + mh = m_gethdr(M_NOWAIT, MT_DATA); + if (mh == NULL) { m_freem(m); return ENOBUFS; } Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Fri Mar 15 12:33:23 2013 (r248320) +++ head/sys/netinet6/mld6.c Fri Mar 15 12:50:29 2013 (r248321) @@ -1799,13 +1799,13 @@ mld_v1_transmit_report(struct in6_multi ia = in6ifa_ifpforlinklocal(ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST); /* ia may be NULL if link-local address is tentative. */ - MGETHDR(mh, M_NOWAIT, MT_HEADER); + mh = m_gethdr(M_NOWAIT, MT_DATA); if (mh == NULL) { if (ia != NULL) ifa_free(&ia->ia_ifa); return (ENOMEM); } - MGET(md, M_NOWAIT, MT_DATA); + md = m_get(M_NOWAIT, MT_DATA); if (md == NULL) { m_free(mh); if (ia != NULL) @@ -3173,7 +3173,7 @@ mld_v2_encap_report(struct ifnet *ifp, s if (ia == NULL) CTR1(KTR_MLD, "%s: warning: ia is NULL", __func__); - MGETHDR(mh, M_NOWAIT, MT_HEADER); + mh = m_gethdr(M_NOWAIT, MT_DATA); if (mh == NULL) { if (ia != NULL) ifa_free(&ia->ia_ifa); From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:53:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5AF99FBB; Fri, 15 Mar 2013 12:53:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB1ECC1; Fri, 15 Mar 2013 12:53:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCr0ru015997; Fri, 15 Mar 2013 12:53:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCr0KV015996; Fri, 15 Mar 2013 12:53:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151253.r2FCr0KV015996@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 12:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248322 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:53:00 -0000 Author: glebius Date: Fri Mar 15 12:52:59 2013 New Revision: 248322 URL: http://svnweb.freebsd.org/changeset/base/248322 Log: - Use m_getcl() instead of hand allocating. - Convert panic() to KASSERT. - Remove superfluous cleaning of mbuf fields after allocation. - Add comment on possible use of m_get2() here. Sponsored by: Nginx, Inc. Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Mar 15 12:50:29 2013 (r248321) +++ head/sys/net/rtsock.c Fri Mar 15 12:52:59 2013 (r248322) @@ -1118,20 +1118,17 @@ rt_msg1(int type, struct rt_addrinfo *rt default: len = sizeof(struct rt_msghdr); } - if (len > MCLBYTES) - panic("rt_msg1"); - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m && len > MHLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { - m_free(m); - m = NULL; - } - } + + /* XXXGL: can we use MJUMPAGESIZE cluster here? */ + KASSERT(len <= MCLBYTES, ("%s: message too big", __func__)); + if (len > MHLEN) + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + else + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return (m); + m->m_pkthdr.len = m->m_len = len; - m->m_pkthdr.rcvif = NULL; rtm = mtod(m, struct rt_msghdr *); bzero((caddr_t)rtm, len); for (i = 0; i < RTAX_MAX; i++) { From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:53: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]) by hub.freebsd.org (Postfix) with ESMTP id 443671DB; Fri, 15 Mar 2013 12:53:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2CE09CD9; Fri, 15 Mar 2013 12:53:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCrs9f016151; Fri, 15 Mar 2013 12:53:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCrsSs016150; Fri, 15 Mar 2013 12:53:54 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151253.r2FCrsSs016150@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 12:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248323 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:53:54 -0000 Author: glebius Date: Fri Mar 15 12:53:53 2013 New Revision: 248323 URL: http://svnweb.freebsd.org/changeset/base/248323 Log: - Use m_getcl() instead of hand allocating. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Fri Mar 15 12:52:59 2013 (r248322) +++ head/sys/netinet/tcp_output.c Fri Mar 15 12:53:53 2013 (r248323) @@ -842,23 +842,19 @@ send: TCPSTAT_INC(tcps_sndpack); TCPSTAT_ADD(tcps_sndbyte, len); } - MGETHDR(m, M_NOWAIT, MT_DATA); +#ifdef INET6 + if (MHLEN < hdrlen + max_linkhdr) + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + else +#endif + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) { SOCKBUF_UNLOCK(&so->so_snd); error = ENOBUFS; goto out; } -#ifdef INET6 - if (MHLEN < hdrlen + max_linkhdr) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { - SOCKBUF_UNLOCK(&so->so_snd); - m_freem(m); - error = ENOBUFS; - goto out; - } - } -#endif + m->m_data += max_linkhdr; m->m_len = hdrlen; From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:55:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 28F18382; Fri, 15 Mar 2013 12:55:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 19DAECFC; Fri, 15 Mar 2013 12:55:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCtWn2016470; Fri, 15 Mar 2013 12:55:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCtVea016460; Fri, 15 Mar 2013 12:55:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151255.r2FCtVea016460@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 12:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248324 - in head/sys: compat/ndis net netinet netpfil/pf 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:55:33 -0000 Author: glebius Date: Fri Mar 15 12:55:30 2013 New Revision: 248324 URL: http://svnweb.freebsd.org/changeset/base/248324 Log: Use m_get/m_gethdr instead of compat macros. Sponsored by: Nginx, Inc. Modified: head/sys/compat/ndis/kern_ndis.c head/sys/net/bridgestp.c head/sys/net/if_gre.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/tcp_subr.c head/sys/netpfil/pf/pf.c Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/compat/ndis/kern_ndis.c Fri Mar 15 12:55:30 2013 (r248324) @@ -656,13 +656,9 @@ ndis_ptom(m0, p) for (buf = priv->npp_head; buf != NULL; buf = buf->mdl_next) { if (buf == priv->npp_head) -#ifdef MT_HEADER - MGETHDR(m, M_NOWAIT, MT_HEADER); -#else - MGETHDR(m, M_NOWAIT, MT_DATA); -#endif + m = m_gethdr(M_NOWAIT, MT_DATA); else - MGET(m, M_NOWAIT, MT_DATA); + m = m_get(M_NOWAIT, MT_DATA); if (m == NULL) { m_freem(*m0); *m0 = NULL; Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/net/bridgestp.c Fri Mar 15 12:55:30 2013 (r248324) @@ -234,7 +234,7 @@ bstp_transmit_tcn(struct bstp_state *bs, if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; @@ -348,7 +348,7 @@ bstp_send_bpdu(struct bstp_state *bs, st if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/net/if_gre.c Fri Mar 15 12:55:30 2013 (r248324) @@ -384,8 +384,7 @@ gre_output(struct ifnet *ifp, struct mbu mob_h.hcrc = gre_in_cksum((u_int16_t *)&mob_h, msiz); if ((m->m_data - msiz) < m->m_pktdat) { - /* need new mbuf */ - MGETHDR(m0, M_NOWAIT, MT_DATA); + m0 = m_gethdr(M_NOWAIT, MT_DATA); if (m0 == NULL) { _IF_DROP(&ifp->if_snd); m_freem(m); Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/ip_carp.c Fri Mar 15 12:55:30 2013 (r248324) @@ -764,7 +764,7 @@ carp_send_ad_locked(struct carp_softc *s if (sc->sc_naddrs) { struct ip *ip; - MGETHDR(m, M_NOWAIT, MT_HEADER); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { CARPSTATS_INC(carps_onomem); goto resched; @@ -832,7 +832,7 @@ carp_send_ad_locked(struct carp_softc *s if (sc->sc_naddrs6) { struct ip6_hdr *ip6; - MGETHDR(m, M_NOWAIT, MT_HEADER); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { CARPSTATS_INC(carps_onomem); goto resched; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/ip_input.c Fri Mar 15 12:55:30 2013 (r248324) @@ -1406,7 +1406,7 @@ ip_forward(struct mbuf *m, int srcrt) * assume exclusive access to the IP header in `m', so any * data in a cluster may change before we reach icmp_error(). */ - MGETHDR(mcopy, M_NOWAIT, m->m_type); + mcopy = m_gethdr(M_NOWAIT, m->m_type); if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_NOWAIT)) { /* * It's probably ok if the pkthdr dup fails (because Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/ip_mroute.c Fri Mar 15 12:55:30 2013 (r248324) @@ -2083,13 +2083,12 @@ bw_upcalls_send(void) * Allocate a new mbuf, initialize it with the header and * the payload for the pending calls. */ - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { log(LOG_WARNING, "bw_upcalls_send: cannot allocate mbuf\n"); return; } - m->m_len = m->m_pkthdr.len = 0; m_copyback(m, 0, sizeof(struct igmpmsg), (caddr_t)&igmpmsg); m_copyback(m, sizeof(struct igmpmsg), len, (caddr_t)&V_bw_upcalls[0]); @@ -2430,7 +2429,7 @@ pim_register_send_upcall(struct ip *ip, /* * Add a new mbuf with an upcall header */ - MGETHDR(mb_first, M_NOWAIT, MT_DATA); + mb_first = m_gethdr(M_NOWAIT, MT_DATA); if (mb_first == NULL) { m_freem(mb_copy); return ENOBUFS; @@ -2488,7 +2487,7 @@ pim_register_send_rp(struct ip *ip, stru /* * Add a new mbuf with the encapsulating header */ - MGETHDR(mb_first, M_NOWAIT, MT_DATA); + mb_first = m_gethdr(M_NOWAIT, MT_DATA); if (mb_first == NULL) { m_freem(mb_copy); return ENOBUFS; Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/ip_options.c Fri Mar 15 12:55:30 2013 (r248324) @@ -495,7 +495,7 @@ ip_insertoptions(struct mbuf *m, struct if (p->ipopt_dst.s_addr) ip->ip_dst = p->ipopt_dst; if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) { - MGETHDR(n, M_NOWAIT, MT_DATA); + n = m_gethdr(M_NOWAIT, MT_DATA); if (n == NULL) { *phlen = 0; return (m); Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/ip_output.c Fri Mar 15 12:55:30 2013 (r248324) @@ -784,7 +784,7 @@ smart_frag_failure: struct mbuf *m; int mhlen = sizeof (struct ip); - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; IPSTAT_INC(ips_odropped); @@ -951,7 +951,7 @@ ip_ctloutput(struct socket *so, struct s error = EMSGSIZE; break; } - MGET(m, sopt->sopt_td ? M_WAITOK : M_NOWAIT, MT_DATA); + m = m_get(sopt->sopt_td ? M_WAITOK : M_NOWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; break; Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netinet/tcp_subr.c Fri Mar 15 12:55:30 2013 (r248324) @@ -1860,7 +1860,7 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp) if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL)) return (0); - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (!m) return (0); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Mar 15 12:53:53 2013 (r248323) +++ head/sys/netpfil/pf/pf.c Fri Mar 15 12:55:30 2013 (r248324) @@ -2168,7 +2168,7 @@ pf_send_tcp(struct mbuf *replyto, const pfse = malloc(sizeof(*pfse), M_PFTEMP, M_NOWAIT); if (pfse == NULL) return; - m = m_gethdr(M_NOWAIT, MT_HEADER); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { free(pfse, M_PFTEMP); return; From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 12:57:31 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]) by hub.freebsd.org (Postfix) with ESMTP id 310DA5DD; Fri, 15 Mar 2013 12:57:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 241DDD1C; Fri, 15 Mar 2013 12:57:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FCvVCo016821; Fri, 15 Mar 2013 12:57:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FCvVrp016820; Fri, 15 Mar 2013 12:57:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303151257.r2FCvVrp016820@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Mar 2013 12:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248325 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 12:57:31 -0000 Author: kib Date: Fri Mar 15 12:57:30 2013 New Revision: 248325 URL: http://svnweb.freebsd.org/changeset/base/248325 Log: Add my copyright for the 2012 year work, in particular vn_io_fault() and f_offset locking. Add required Foundation notice for r248319. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Mar 15 12:55:30 2013 (r248324) +++ head/sys/kern/vfs_vnops.c Fri Mar 15 12:57:30 2013 (r248325) @@ -7,6 +7,11 @@ * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * + * Copyright (c) 2012 Konstantin Belousov + * Copyright (c) 2013 The FreeBSD Foundation + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 13:01:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7CC347AB for ; Fri, 15 Mar 2013 13:01:03 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id E992AD50 for ; Fri, 15 Mar 2013 13:01:01 +0000 (UTC) Received: (qmail 64292 invoked from network); 15 Mar 2013 14:13:02 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Mar 2013 14:13:02 -0000 Message-ID: <51431B89.5010501@freebsd.org> Date: Fri, 15 Mar 2013 14:00:57 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248323 - head/sys/netinet References: <201303151253.r2FCrsSs016150@svn.freebsd.org> In-Reply-To: <201303151253.r2FCrsSs016150@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 15 Mar 2013 13:01:03 -0000 On 15.03.2013 13:53, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Mar 15 12:53:53 2013 > New Revision: 248323 > URL: http://svnweb.freebsd.org/changeset/base/248323 > > Log: > - Use m_getcl() instead of hand allocating. > > Sponsored by: Nginx, Inc. > > Modified: > head/sys/netinet/tcp_output.c > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Fri Mar 15 12:52:59 2013 (r248322) > +++ head/sys/netinet/tcp_output.c Fri Mar 15 12:53:53 2013 (r248323) > @@ -842,23 +842,19 @@ send: > TCPSTAT_INC(tcps_sndpack); > TCPSTAT_ADD(tcps_sndbyte, len); > } > - MGETHDR(m, M_NOWAIT, MT_DATA); > +#ifdef INET6 > + if (MHLEN < hdrlen + max_linkhdr) > + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); > + else > +#endif > + m = m_gethdr(M_NOWAIT, MT_DATA); > + m = m_getm2(hdrlen + max_linkhdr, M_NOWAIT, MT_DATA, M_PKTHDR); would be even more compact. Since max_linkhdr could be large as well, the possibility of a cluster applies to IPv4 too. -- Andre > if (m == NULL) { > SOCKBUF_UNLOCK(&so->so_snd); > error = ENOBUFS; > goto out; > } > -#ifdef INET6 > - if (MHLEN < hdrlen + max_linkhdr) { > - MCLGET(m, M_NOWAIT); > - if ((m->m_flags & M_EXT) == 0) { > - SOCKBUF_UNLOCK(&so->so_snd); > - m_freem(m); > - error = ENOBUFS; > - goto out; > - } > - } > -#endif > + > m->m_data += max_linkhdr; > m->m_len = hdrlen; > > > From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 13:10:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F37EEAF4; Fri, 15 Mar 2013 13:10:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E5406DD9; Fri, 15 Mar 2013 13:10:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FDA6TS020538; Fri, 15 Mar 2013 13:10:06 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FDA6TZ020537; Fri, 15 Mar 2013 13:10:06 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151310.r2FDA6TZ020537@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 13:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248326 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 13:10:07 -0000 Author: glebius Date: Fri Mar 15 13:10:06 2013 New Revision: 248326 URL: http://svnweb.freebsd.org/changeset/base/248326 Log: We can, and should use M_WAITOK here. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Fri Mar 15 12:57:30 2013 (r248325) +++ head/sys/netinet/igmp.c Fri Mar 15 13:10:06 2013 (r248326) @@ -523,7 +523,7 @@ igmp_ra_alloc(void) struct mbuf *m; struct ipoption *p; - MGET(m, M_NOWAIT, MT_DATA); + m = m_get(M_WAITOK, MT_DATA); p = mtod(m, struct ipoption *); p->ipopt_dst.s_addr = INADDR_ANY; p->ipopt_list[0] = IPOPT_RA; /* Router Alert Option */ From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 13:47:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0A34F7D9; Fri, 15 Mar 2013 13:47:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 88579150; Fri, 15 Mar 2013 13:46:59 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r2FDkvDt053357; Fri, 15 Mar 2013 17:46:57 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r2FDkvqY053356; Fri, 15 Mar 2013 17:46:57 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 15 Mar 2013 17:46:57 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r248323 - head/sys/netinet Message-ID: <20130315134657.GL48089@FreeBSD.org> References: <201303151253.r2FCrsSs016150@svn.freebsd.org> <51431B89.5010501@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <51431B89.5010501@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 15 Mar 2013 13:47:00 -0000 On Fri, Mar 15, 2013 at 02:00:57PM +0100, Andre Oppermann wrote: A> On 15.03.2013 13:53, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Fri Mar 15 12:53:53 2013 A> > New Revision: 248323 A> > URL: http://svnweb.freebsd.org/changeset/base/248323 A> > A> > Log: A> > - Use m_getcl() instead of hand allocating. A> > A> > Sponsored by: Nginx, Inc. A> > A> > Modified: A> > head/sys/netinet/tcp_output.c A> > A> > Modified: head/sys/netinet/tcp_output.c A> > ============================================================================== A> > --- head/sys/netinet/tcp_output.c Fri Mar 15 12:52:59 2013 (r248322) A> > +++ head/sys/netinet/tcp_output.c Fri Mar 15 12:53:53 2013 (r248323) A> > @@ -842,23 +842,19 @@ send: A> > TCPSTAT_INC(tcps_sndpack); A> > TCPSTAT_ADD(tcps_sndbyte, len); A> > } A> > - MGETHDR(m, M_NOWAIT, MT_DATA); A> > +#ifdef INET6 A> > + if (MHLEN < hdrlen + max_linkhdr) A> > + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); A> > + else A> > +#endif A> > + m = m_gethdr(M_NOWAIT, MT_DATA); A> > + A> A> m = m_getm2(hdrlen + max_linkhdr, M_NOWAIT, MT_DATA, M_PKTHDR); A> A> would be even more compact. Since max_linkhdr could be large as well, A> the possibility of a cluster applies to IPv4 too. m_getm2() may return chain. According to argument list, you probably meant m_get2(). Yes, that would be more compat. But, again, I am not sure that using pagesized cluster won't break anything. If you are sure, feel free to change that. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 13:48:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 243E4968; Fri, 15 Mar 2013 13:48:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 079EE16B; Fri, 15 Mar 2013 13:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FDms2e032231; Fri, 15 Mar 2013 13:48:54 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FDmsM8032227; Fri, 15 Mar 2013 13:48:54 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303151348.r2FDmsM8032227@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 15 Mar 2013 13:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248328 - head/sys/netinet6 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.14 Precedence: list List-Id: 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, 15 Mar 2013 13:48:55 -0000 Author: glebius Date: Fri Mar 15 13:48:53 2013 New Revision: 248328 URL: http://svnweb.freebsd.org/changeset/base/248328 Log: - Use m_getcl() instead of hand allocating. - Do not calculate constant length values at run time, CTASSERT() their sanity. - Remove superfluous cleaning of mbuf fields after allocation. - Replace compat macros with function calls. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Mar 15 13:40:00 2013 (r248327) +++ head/sys/netinet6/icmp6.c Fri Mar 15 13:48:53 2013 (r248328) @@ -578,25 +578,18 @@ icmp6_input(struct mbuf **mp, int *offp, if ((n->m_flags & M_EXT) != 0 || n->m_len < off + sizeof(struct icmp6_hdr)) { struct mbuf *n0 = n; - const int maxlen = sizeof(*nip6) + sizeof(*nicmp6); int n0len; + CTASSERT(sizeof(*nip6) + sizeof(*nicmp6) <= MHLEN); n = m_gethdr(M_NOWAIT, n0->m_type); - n0len = n0->m_pkthdr.len; /* save for use below */ - if (n) - M_MOVE_PKTHDR(n, n0); /* FIB copied. */ - if (n && maxlen >= MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - m_free(n); - n = NULL; - } - } if (n == NULL) { /* Give up remote */ m_freem(n0); break; } + + m_move_pkthdr(n, n0); /* FIB copied. */ + n0len = n0->m_pkthdr.len; /* save for use below */ /* * Copy IPv6 and ICMPv6 only. */ @@ -683,7 +676,7 @@ icmp6_input(struct mbuf **mp, int *offp, } else { struct prison *pr; u_char *p; - int maxlen, maxhlen, hlen; + int maxhlen, hlen; /* * XXX: this combination of flags is pointless, @@ -694,20 +687,14 @@ icmp6_input(struct mbuf **mp, int *offp, if (code != 0) goto badcode; - maxlen = sizeof(*nip6) + sizeof(*nicmp6) + 4; - if (maxlen >= MCLBYTES) { + + CTASSERT(sizeof(*nip6) + sizeof(*nicmp6) + 4 <= MHLEN); + n = m_gethdr(M_NOWAIT, m->m_type); + if (n == NULL) { /* Give up remote */ break; } - n = m_gethdr(M_NOWAIT, m->m_type); - if (n && maxlen > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - m_free(n); - n = NULL; - } - } - if (n && !m_dup_pkthdr(n, m, M_NOWAIT)) { + if (!m_dup_pkthdr(n, m, M_NOWAIT)) { /* * Previous code did a blind M_COPY_PKTHDR * and said "just for rcvif". If true, then @@ -718,13 +705,8 @@ icmp6_input(struct mbuf **mp, int *offp, m_free(n); n = NULL; } - if (n == NULL) { - /* Give up remote */ - break; - } - n->m_pkthdr.rcvif = NULL; - n->m_len = 0; - maxhlen = M_TRAILINGSPACE(n) - maxlen; + maxhlen = M_TRAILINGSPACE(n) - + (sizeof(*nip6) + sizeof(*nicmp6) + 4); pr = curthread->td_ucred->cr_prison; mtx_lock(&pr->pr_mtx); hlen = strlen(pr->pr_hostname); @@ -1494,26 +1476,23 @@ ni6_input(struct mbuf *m, int off) break; } - /* allocate an mbuf to reply. */ - n = m_gethdr(M_NOWAIT, m->m_type); + /* Allocate an mbuf to reply. */ + if (replylen > MCLBYTES) { + /* + * XXX: should we try to allocate more? But MCLBYTES + * is probably much larger than IPV6_MMTU... + */ + goto bad; + } + if (replylen > MHLEN) + n = m_getcl(M_NOWAIT, m->m_type, M_PKTHDR); + else + n = m_gethdr(M_NOWAIT, m->m_type); if (n == NULL) { m_freem(m); return (NULL); } - M_MOVE_PKTHDR(n, m); /* just for recvif and FIB */ - if (replylen > MHLEN) { - if (replylen > MCLBYTES) { - /* - * XXX: should we try to allocate more? But MCLBYTES - * is probably much larger than IPV6_MMTU... - */ - goto bad; - } - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - goto bad; - } - } + m_move_pkthdr(n, m); /* just for recvif and FIB */ n->m_pkthdr.len = n->m_len = replylen; /* copy mbuf header and IPv6 + Node Information base headers */ Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Mar 15 13:40:00 2013 (r248327) +++ head/sys/netinet6/ip6_input.c Fri Mar 15 13:48:53 2013 (r248328) @@ -506,7 +506,7 @@ ip6_input(struct mbuf *m) return; /* ENOBUFS */ } - M_MOVE_PKTHDR(n, m); + m_move_pkthdr(n, m); m_copydata(m, 0, n->m_pkthdr.len, mtod(n, caddr_t)); n->m_len = n->m_pkthdr.len; m_freem(m); @@ -1662,22 +1662,12 @@ ip6_pullexthdr(struct mbuf *m, size_t of else elen = (ip6e.ip6e_len + 1) << 3; - MGET(n, M_NOWAIT, MT_DATA); - if (n && elen >= MLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - m_free(n); - n = NULL; - } - } - if (!n) - return NULL; - - n->m_len = 0; - if (elen >= M_TRAILINGSPACE(n)) { - m_free(n); + if (elen > MLEN) + n = m_getcl(M_NOWAIT, MT_DATA, 0); + else + n = m_get(M_NOWAIT, MT_DATA); + if (n == NULL) return NULL; - } m_copydata(m, off, elen, mtod(n, caddr_t)); n->m_len = elen; Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Mar 15 13:40:00 2013 (r248327) +++ head/sys/netinet6/ip6_output.c Fri Mar 15 13:48:53 2013 (r248328) @@ -1219,17 +1219,12 @@ ip6_copyexthdr(struct mbuf **mp, caddr_t if (hlen > MCLBYTES) return (ENOBUFS); /* XXX */ - MGET(m, M_NOWAIT, MT_DATA); - if (!m) + if (hlen > MLEN) + m = m_getcl(M_NOWAIT, MT_DATA, 0); + else + m = m_get(M_NOWAIT, MT_DATA); + if (m == NULL) return (ENOBUFS); - - if (hlen > MLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { - m_free(m); - return (ENOBUFS); - } - } m->m_len = hlen; if (hdr) bcopy(hdr, mtod(m, caddr_t), hlen); @@ -1257,8 +1252,8 @@ ip6_insert_jumboopt(struct ip6_exthdrs * * Otherwise, use it to store the options. */ if (exthdrs->ip6e_hbh == 0) { - MGET(mopt, M_NOWAIT, MT_DATA); - if (mopt == 0) + mopt = m_get(M_NOWAIT, MT_DATA); + if (mopt == NULL) return (ENOBUFS); mopt->m_len = JUMBOOPTLEN; optbuf = mtod(mopt, u_char *); @@ -1289,15 +1284,8 @@ ip6_insert_jumboopt(struct ip6_exthdrs * * As a consequence, we must always prepare a cluster * at this point. */ - MGET(n, M_NOWAIT, MT_DATA); - if (n) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { - m_freem(n); - n = NULL; - } - } - if (!n) + n = m_getcl(M_NOWAIT, MT_DATA, 0); + if (n == NULL) return (ENOBUFS); n->m_len = oldoptlen + JUMBOOPTLEN; bcopy(mtod(mopt, caddr_t), mtod(n, caddr_t), @@ -1366,8 +1354,8 @@ ip6_insertfraghdr(struct mbuf *m0, struc /* allocate a new mbuf for the fragment header */ struct mbuf *mfrg; - MGET(mfrg, M_NOWAIT, MT_DATA); - if (mfrg == 0) + mfrg = m_get(M_NOWAIT, MT_DATA); + if (mfrg == NULL) return (ENOBUFS); mfrg->m_len = sizeof(struct ip6_frag); *frghdrp = mtod(mfrg, struct ip6_frag *); @@ -3047,7 +3035,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_ m_freem(m); return ENOBUFS; } - M_MOVE_PKTHDR(mh, m); + m_move_pkthdr(mh, m); MH_ALIGN(mh, sizeof(*ip6)); m->m_len -= sizeof(*ip6); m->m_data += sizeof(*ip6); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Fri Mar 15 13:40:00 2013 (r248327) +++ head/sys/netinet6/nd6_nbr.c Fri Mar 15 13:48:53 2013 (r248328) @@ -419,17 +419,12 @@ nd6_ns_output(struct ifnet *ifp, const s return; } - MGETHDR(m, M_NOWAIT, MT_DATA); - if (m && max_linkhdr + maxlen >= MHLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { - m_free(m); - m = NULL; - } - } + if (max_linkhdr + maxlen > MHLEN) + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + else + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; - m->m_pkthdr.rcvif = NULL; bzero(&ro, sizeof(ro)); @@ -997,17 +992,12 @@ nd6_na_output_fib(struct ifnet *ifp, con return; } - MGETHDR(m, M_NOWAIT, MT_DATA); - if (m && max_linkhdr + maxlen >= MHLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { - m_free(m); - m = NULL; - } - } + if (max_linkhdr + maxlen > MHLEN) + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + else + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return; - m->m_pkthdr.rcvif = NULL; M_SETFIB(m, fibnum); if (IN6_IS_ADDR_MULTICAST(&daddr6)) { From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 13:56: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]) by hub.freebsd.org (Postfix) with ESMTP id E44A0F6E for ; Fri, 15 Mar 2013 13:56:41 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5BCA8237 for ; Fri, 15 Mar 2013 13:56:41 +0000 (UTC) Received: (qmail 64802 invoked from network); 15 Mar 2013 15:08:41 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Mar 2013 15:08:41 -0000 Message-ID: <51432894.9000504@freebsd.org> Date: Fri, 15 Mar 2013 14:56:36 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r248323 - head/sys/netinet References: <201303151253.r2FCrsSs016150@svn.freebsd.org> <51431B89.5010501@freebsd.org> <20130315134657.GL48089@FreeBSD.org> In-Reply-To: <20130315134657.GL48089@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed 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.14 Precedence: list List-Id: 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, 15 Mar 2013 13:56:42 -0000 On 15.03.2013 14:46, Gleb Smirnoff wrote: > On Fri, Mar 15, 2013 at 02:00:57PM +0100, Andre Oppermann wrote: > A> On 15.03.2013 13:53, Gleb Smirnoff wrote: > A> > Author: glebius > A> > Date: Fri Mar 15 12:53:53 2013 > A> > New Revision: 248323 > A> > URL: http://svnweb.freebsd.org/changeset/base/248323 > A> > > A> > Log: > A> > - Use m_getcl() instead of hand allocating. > A> > > A> > Sponsored by: Nginx, Inc. > A> > > A> > Modified: > A> > head/sys/netinet/tcp_output.c > A> > > A> > Modified: head/sys/netinet/tcp_output.c > A> > ============================================================================== > A> > --- head/sys/netinet/tcp_output.c Fri Mar 15 12:52:59 2013 (r248322) > A> > +++ head/sys/netinet/tcp_output.c Fri Mar 15 12:53:53 2013 (r248323) > A> > @@ -842,23 +842,19 @@ send: > A> > TCPSTAT_INC(tcps_sndpack); > A> > TCPSTAT_ADD(tcps_sndbyte, len); > A> > } > A> > - MGETHDR(m, M_NOWAIT, MT_DATA); > A> > +#ifdef INET6 > A> > + if (MHLEN < hdrlen + max_linkhdr) > A> > + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); > A> > + else > A> > +#endif > A> > + m = m_gethdr(M_NOWAIT, MT_DATA); > A> > + > A> > A> m = m_getm2(hdrlen + max_linkhdr, M_NOWAIT, MT_DATA, M_PKTHDR); > A> > A> would be even more compact. Since max_linkhdr could be large as well, > A> the possibility of a cluster applies to IPv4 too. > > m_getm2() may return chain. According to argument list, you probably > meant m_get2(). Yes, that would be more compat. > > But, again, I am not sure that using pagesized cluster won't break > anything. > > If you are sure, feel free to change that. Oops, I meant m_get2(), not m_getm2(). -- Andre From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 14:01:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EAAB2B6; Fri, 15 Mar 2013 14:01:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 014E3282; Fri, 15 Mar 2013 14:01:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FE1bGf037299; Fri, 15 Mar 2013 14:01:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FE1bRo037298; Fri, 15 Mar 2013 14:01:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201303151401.r2FE1bRo037298@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 15 Mar 2013 14:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248329 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 14:01:38 -0000 Author: kib Date: Fri Mar 15 14:01:37 2013 New Revision: 248329 URL: http://svnweb.freebsd.org/changeset/base/248329 Log: Separate the copyright lines and the informational block by a blank line. Requested by: joel MFC after: 2 weeks Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Mar 15 13:48:53 2013 (r248328) +++ head/sys/kern/vfs_vnops.c Fri Mar 15 14:01:37 2013 (r248329) @@ -9,6 +9,7 @@ * * Copyright (c) 2012 Konstantin Belousov * Copyright (c) 2013 The FreeBSD Foundation + * * Portions of this software were developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. * From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 19:58:45 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]) by hub.freebsd.org (Postfix) with ESMTP id 0F25A5E3; Fri, 15 Mar 2013 19:58:45 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EBCFDDD0; Fri, 15 Mar 2013 19:58:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FJwiG3046493; Fri, 15 Mar 2013 19:58:44 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FJwiVZ046492; Fri, 15 Mar 2013 19:58:44 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201303151958.r2FJwiVZ046492@svn.freebsd.org> From: Ryan Stone Date: Fri, 15 Mar 2013 19:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248340 - head/sys/dev/puc 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.14 Precedence: list List-Id: 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, 15 Mar 2013 19:58:45 -0000 Author: rstone Date: Fri Mar 15 19:58:44 2013 New Revision: 248340 URL: http://svnweb.freebsd.org/changeset/base/248340 Log: Add support for Exar XR17V358 8-port serial device to puc(4) Reviewed by: marius Sponsored by: Sandvine Inc. MFC after: 1 week Modified: head/sys/dev/puc/pucdata.c Modified: head/sys/dev/puc/pucdata.c ============================================================================== --- head/sys/dev/puc/pucdata.c Fri Mar 15 19:50:21 2013 (r248339) +++ head/sys/dev/puc/pucdata.c Fri Mar 15 19:58:44 2013 (r248340) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); static puc_config_f puc_config_amc; static puc_config_f puc_config_diva; static puc_config_f puc_config_exar; +static puc_config_f puc_config_exar_pcie; static puc_config_f puc_config_icbook; static puc_config_f puc_config_moxa; static puc_config_f puc_config_oxford_pcie; @@ -630,6 +631,14 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_8S, 0x10, 0, -1, }, + /* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */ + { 0x13a8, 0x0358, 0xffff, 0, + "Exar XR17V358", + 125000000, + PUC_PORT_8S, 0x10, 0, -1, + .config_function = puc_config_exar_pcie + }, + { 0x13fe, 0x1600, 0x1602, 0x0002, "Advantech PCI-1602", DEFAULT_RCLK * 8, @@ -1186,6 +1195,17 @@ puc_config_exar(struct puc_softc *sc, en } static int +puc_config_exar_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res) +{ + if (cmd == PUC_CFG_GET_OFS) { + *res = port * 0x400; + return (0); + } + return (ENXIO); +} + +static int puc_config_icbook(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, intptr_t *res) { From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 20:00:08 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]) by hub.freebsd.org (Postfix) with ESMTP id 9EDE977B; Fri, 15 Mar 2013 20:00:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8D300DEA; Fri, 15 Mar 2013 20:00:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FK08lY046857; Fri, 15 Mar 2013 20:00:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FK08fc046856; Fri, 15 Mar 2013 20:00:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303152000.r2FK08fc046856@svn.freebsd.org> From: Adrian Chadd Date: Fri, 15 Mar 2013 20:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248341 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 15 Mar 2013 20:00:08 -0000 Author: adrian Date: Fri Mar 15 20:00:08 2013 New Revision: 248341 URL: http://svnweb.freebsd.org/changeset/base/248341 Log: Fix two bugs: * when pulling frames off of the TID queue, the ATH_TID_REMOVE() macro decrements the axq_depth field. So don't do it twice. * in ath_tx_comp_cleanup_aggr(), bf wasn't being reset to bf_first before walking the buffer list to complete buffers; so those buffers will leak. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Mar 15 19:58:44 2013 (r248340) +++ head/sys/dev/ath/if_ath_tx.c Fri Mar 15 20:00:08 2013 (r248341) @@ -3757,7 +3757,8 @@ ath_tx_tid_cleanup(struct ath_softc *sc, if (bf->bf_state.bfs_isretried) { bf_next = TAILQ_NEXT(bf, bf_list); ATH_TID_REMOVE(atid, bf, bf_list); - atid->axq_depth--; + // Don't need this anymore; ATH_TID_REMOVE() decrements it for us + //atid->axq_depth--; if (bf->bf_state.bfs_dobaw) { ath_tx_update_baw(sc, an, atid, bf); if (! bf->bf_state.bfs_addedbaw) @@ -4140,11 +4141,10 @@ ath_tx_comp_cleanup_aggr(struct ath_soft int tid = bf_first->bf_state.bfs_tid; struct ath_tid *atid = &an->an_tid[tid]; - bf = bf_first; - ATH_TX_LOCK(sc); /* update incomp */ + bf = bf_first; while (bf) { atid->incomp--; bf = bf->bf_next; @@ -4160,12 +4160,17 @@ ath_tx_comp_cleanup_aggr(struct ath_soft /* Send BAR if required */ /* XXX why would we send a BAR when transitioning to non-aggregation? */ + /* + * XXX TODO: we should likely just tear down the BAR state here, + * rather than sending a BAR. + */ if (ath_tx_tid_bar_tx_ready(sc, atid)) ath_tx_tid_bar_tx(sc, atid); ATH_TX_UNLOCK(sc); /* Handle frame completion */ + bf = bf_first; while (bf) { bf_next = bf->bf_next; ath_tx_default_comp(sc, bf, 1); From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 20:12:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E61ABC80; Fri, 15 Mar 2013 20:12:55 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C98A9F12; Fri, 15 Mar 2013 20:12:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FKCtrc052301; Fri, 15 Mar 2013 20:12:55 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FKCss2052294; Fri, 15 Mar 2013 20:12:54 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303152012.r2FKCss2052294@svn.freebsd.org> From: Joel Dahl Date: Fri, 15 Mar 2013 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248342 - in head/bin: cp ls mkdir mv ps rm rmdir 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.14 Precedence: list List-Id: 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, 15 Mar 2013 20:12:56 -0000 Author: joel (doc committer) Date: Fri Mar 15 20:12:54 2013 New Revision: 248342 URL: http://svnweb.freebsd.org/changeset/base/248342 Log: Add a few examples. Obtained from: OpenBSD Modified: head/bin/cp/cp.1 head/bin/ls/ls.1 head/bin/mkdir/mkdir.1 head/bin/mv/mv.1 head/bin/ps/ps.1 head/bin/rm/rm.1 head/bin/rmdir/rmdir.1 Modified: head/bin/cp/cp.1 ============================================================================== --- head/bin/cp/cp.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/cp/cp.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 4, 2012 +.Dd March 15, 2013 .Dt CP 1 .Os .Sh NAME @@ -251,6 +251,27 @@ signal, the current input and output fil will be written to the standard output. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Make a copy of file +.Pa foo +named +.Pa bar : +.Pp +.Dl $ cp foo bar +.Pp +Copy a group of files to the +.Pa /tmp +directory: +.Pp +.Dl $ cp *.txt /tmp +.Pp +Copy the directory +.Pa junk +and all of its contents (including any subdirectories) to the +.Pa /tmp +directory: +.Pp +.Dl $ cp -R junk /tmp .Sh COMPATIBILITY Historic versions of the .Nm Modified: head/bin/ls/ls.1 ============================================================================== --- head/bin/ls/ls.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/ls/ls.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd November 8, 2012 +.Dd March 15, 2013 .Dt LS 1 .Os .Sh NAME @@ -718,6 +718,24 @@ for more information. .El .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +List the contents of the current working directory in long format: +.Pp +.Dl $ ls -l +.Pp +In addition to listing the contents of the current working directory in +long format, show inode numbers, file flags (see +.Xr chflags 1 ) , +and suffix each filename with a symbol representing its file type: +.Pp +.Dl $ ls -lioF +.Pp +List the files in +.Pa /var/log , +sorting the output such that the mostly recently modified entries are +printed first: +.Pp +.Dl $ ls -lt /var/log .Sh COMPATIBILITY The group field is now automatically included in the long listing for files in order to be compatible with the Modified: head/bin/mkdir/mkdir.1 ============================================================================== --- head/bin/mkdir/mkdir.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/mkdir/mkdir.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)mkdir.1 8.2 (Berkeley) 1/25/94 .\" $FreeBSD$ .\" -.Dd January 25, 1994 +.Dd March 15, 2013 .Dt MKDIR 1 .Os .Sh NAME @@ -87,6 +87,23 @@ Be verbose when creating directories, li The user must have write permission in the parent directory. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Create a directory named +.Pa foobar : +.Pp +.Dl $ mkdir foobar +.Pp +Create a directory named +.Pa foobar +and set its file mode to 700: +.Pp +.Dl $ mkdir -m 700 foobar +.Pp +Create a directory named +.Pa cow/horse/monkey , +creating any non-existent intermediate directories as necessary: +.Pp +.Dl $ mkdir -p cow/horse/monkey .Sh COMPATIBILITY The .Fl v Modified: head/bin/mv/mv.1 ============================================================================== --- head/bin/mv/mv.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/mv/mv.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)mv.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd August 28, 2012 +.Dd March 15, 2013 .Dt MV 1 .Os .Sh NAME @@ -155,6 +155,16 @@ rm -rf source_file .Ed .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Rename file +.Pa foo +to +.Pa bar , +overwriting +.Pa bar +if it already exists: +.Pp +.Dl $ mv -f foo bar .Sh COMPATIBILITY The .Fl h , Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/ps/ps.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd February 7, 2013 +.Dd March 15, 2013 .Dt PS 1 .Os .Sh NAME @@ -689,6 +689,10 @@ attempts to automatically determine the .It Pa /boot/kernel/kernel default system namelist .El +.Sh EXAMPLES +Display information on all system processes: +.Pp +.Dl $ ps -auxw .Sh SEE ALSO .Xr kill 1 , .Xr pgrep 1 , Modified: head/bin/rm/rm.1 ============================================================================== --- head/bin/rm/rm.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/rm/rm.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)rm.1 8.5 (Berkeley) 12/5/94 .\" $FreeBSD$ .\" -.Dd October 31, 2010 +.Dd March 15, 2013 .Dt RM 1 .Os .Sh NAME @@ -193,6 +193,19 @@ When is specified with .Fl f the file will be overwritten and removed even if it has hard links. +.Sh EXAMPLES +Recursively remove all files contained within the +.Pa foobar +directory hierarchy: +.Pp +.Dl $ rm -rf foobar +.Pp +Either of these commands will remove the file +.Pa -f : +.Bd -literal -offset indent +$ rm -- -f +$ rm ./-f +.Ed .Sh COMPATIBILITY The .Nm Modified: head/bin/rmdir/rmdir.1 ============================================================================== --- head/bin/rmdir/rmdir.1 Fri Mar 15 20:00:08 2013 (r248341) +++ head/bin/rmdir/rmdir.1 Fri Mar 15 20:12:54 2013 (r248342) @@ -32,7 +32,7 @@ .\" @(#)rmdir.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd March 21, 2004 +.Dd March 15, 2013 .Dt RMDIR 1 .Os .Sh NAME @@ -86,6 +86,18 @@ successfully. .It Li >0 An error occurred. .El +.Sh EXAMPLES +Remove the directory +.Pa foobar , +if it is empty: +.Pp +.Dl $ rmdir foobar +.Pp +Remove all directories up to and including +.Pa cow , +stopping at the first non-empty directory (if any): +.Pp +.Dl $ rmdir -p cow/horse/monkey .Sh SEE ALSO .Xr rm 1 .Sh STANDARDS From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 20:22: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]) by hub.freebsd.org (Postfix) with ESMTP id D99FA42D; Fri, 15 Mar 2013 20:22:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C209BFD2; Fri, 15 Mar 2013 20:22:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FKMKl3055353; Fri, 15 Mar 2013 20:22:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FKMKrR055352; Fri, 15 Mar 2013 20:22:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303152022.r2FKMKrR055352@svn.freebsd.org> From: Adrian Chadd Date: Fri, 15 Mar 2013 20:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248347 - head/sys/dev/ath 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.14 Precedence: list List-Id: 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, 15 Mar 2013 20:22:20 -0000 Author: adrian Date: Fri Mar 15 20:22:20 2013 New Revision: 248347 URL: http://svnweb.freebsd.org/changeset/base/248347 Log: Why'd I keep this here? remove it entirely now. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Mar 15 20:21:18 2013 (r248346) +++ head/sys/dev/ath/if_ath_tx.c Fri Mar 15 20:22:20 2013 (r248347) @@ -3757,8 +3757,6 @@ ath_tx_tid_cleanup(struct ath_softc *sc, if (bf->bf_state.bfs_isretried) { bf_next = TAILQ_NEXT(bf, bf_list); ATH_TID_REMOVE(atid, bf, bf_list); - // Don't need this anymore; ATH_TID_REMOVE() decrements it for us - //atid->axq_depth--; if (bf->bf_state.bfs_dobaw) { ath_tx_update_baw(sc, an, atid, bf); if (! bf->bf_state.bfs_addedbaw) From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 20:29:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3EC54804; Fri, 15 Mar 2013 20:29:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 30D3DFC; Fri, 15 Mar 2013 20:29:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FKTW7Z056395; Fri, 15 Mar 2013 20:29:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FKTVrq056392; Fri, 15 Mar 2013 20:29:31 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201303152029.r2FKTVrq056392@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 15 Mar 2013 20:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248349 - in head: bin/sh tools/regression/bin/sh/builtins 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.14 Precedence: list List-Id: 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, 15 Mar 2013 20:29:32 -0000 Author: jilles Date: Fri Mar 15 20:29:31 2013 New Revision: 248349 URL: http://svnweb.freebsd.org/changeset/base/248349 Log: sh: Recognize "--" and explicitly reject options in wait builtin. If syntactically invalid job identifiers are to be taken as jobs that exited with status 127, this should not apply to options, so that we can add options later if need be. Added: head/tools/regression/bin/sh/builtins/wait6.0 (contents, props changed) head/tools/regression/bin/sh/builtins/wait7.0 (contents, props changed) Modified: head/bin/sh/jobs.c Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Fri Mar 15 20:26:51 2013 (r248348) +++ head/bin/sh/jobs.c Fri Mar 15 20:29:31 2013 (r248349) @@ -458,14 +458,15 @@ freejob(struct job *jp) int -waitcmd(int argc, char **argv) +waitcmd(int argc __unused, char **argv __unused) { struct job *job; int status, retval; struct job *jp; - if (argc > 1) { - job = getjob(argv[1]); + nextopt(""); + if (*argptr != NULL) { + job = getjob(*argptr); } else { job = NULL; } Added: head/tools/regression/bin/sh/builtins/wait6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/wait6.0 Fri Mar 15 20:29:31 2013 (r248349) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +wait -- Added: head/tools/regression/bin/sh/builtins/wait7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/wait7.0 Fri Mar 15 20:29:31 2013 (r248349) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +: & +wait -- $! From owner-svn-src-head@FreeBSD.ORG Fri Mar 15 23:00:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3F07F17B; Fri, 15 Mar 2013 23:00:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4EF314; Fri, 15 Mar 2013 23:00:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FN0Dqf003062; Fri, 15 Mar 2013 23:00:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2FN0DQC003061; Fri, 15 Mar 2013 23:00:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303152300.r2FN0DQC003061@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 15 Mar 2013 23:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248359 - 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.14 Precedence: list List-Id: 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, 15 Mar 2013 23:00:14 -0000 Author: pjd Date: Fri Mar 15 23:00:13 2013 New Revision: 248359 URL: http://svnweb.freebsd.org/changeset/base/248359 Log: Sort syscalls properly. Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Fri Mar 15 22:31:51 2013 (r248358) +++ head/sys/kern/capabilities.conf Fri Mar 15 23:00:13 2013 (r248359) @@ -446,9 +446,9 @@ olio_listio ## Operations relative to directory capabilities. ## faccessat -fstatat fchmodat fchownat +fstatat futimesat linkat mkdirat From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 02:48: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]) by hub.freebsd.org (Postfix) with ESMTP id 9FBF9626; Sat, 16 Mar 2013 02:48:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91371B38; Sat, 16 Mar 2013 02:48:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G2mrsW072636; Sat, 16 Mar 2013 02:48:53 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G2mo0Y072619; Sat, 16 Mar 2013 02:48:50 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160248.r2G2mo0Y072619@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 02:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248361 - in head/sys/arm: arm 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.14 Precedence: list List-Id: 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, 16 Mar 2013 02:48:53 -0000 Author: andrew Date: Sat Mar 16 02:48:49 2013 New Revision: 248361 URL: http://svnweb.freebsd.org/changeset/base/248361 Log: Add an END macro to ARM. This is mostly used to tell gas where the bounds of the functions are when creating the EABI unwind tables. Modified: head/sys/arm/arm/bcopy_page.S head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/blockio.S head/sys/arm/arm/bus_space_asm_generic.S head/sys/arm/arm/copystr.S head/sys/arm/arm/cpufunc_asm.S head/sys/arm/arm/cpufunc_asm_arm10.S head/sys/arm/arm/cpufunc_asm_arm11.S head/sys/arm/arm/cpufunc_asm_arm11x6.S head/sys/arm/arm/cpufunc_asm_arm7tdmi.S head/sys/arm/arm/cpufunc_asm_arm8.S head/sys/arm/arm/cpufunc_asm_arm9.S head/sys/arm/arm/cpufunc_asm_armv4.S head/sys/arm/arm/cpufunc_asm_armv5.S head/sys/arm/arm/cpufunc_asm_armv5_ec.S head/sys/arm/arm/cpufunc_asm_armv6.S head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/arm/cpufunc_asm_ixp12x0.S head/sys/arm/arm/cpufunc_asm_pj4b.S head/sys/arm/arm/cpufunc_asm_sa1.S head/sys/arm/arm/cpufunc_asm_sa11x0.S head/sys/arm/arm/cpufunc_asm_sheeva.S head/sys/arm/arm/cpufunc_asm_xscale.S head/sys/arm/arm/cpufunc_asm_xscale_c3.S head/sys/arm/arm/exception.S head/sys/arm/arm/fiq_subr.S head/sys/arm/arm/fusu.S head/sys/arm/arm/in_cksum_arm.S head/sys/arm/arm/irq_dispatch.S head/sys/arm/arm/locore.S head/sys/arm/arm/setcpsr.S head/sys/arm/arm/support.S head/sys/arm/arm/swtch.S head/sys/arm/include/asm.h Modified: head/sys/arm/arm/bcopy_page.S ============================================================================== --- head/sys/arm/arm/bcopy_page.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/bcopy_page.S Sat Mar 16 02:48:49 2013 (r248361) @@ -117,6 +117,7 @@ ENTRY(bcopy_page) bne 1b RESTORE_REGS /* ...and return. */ +END(bcopy_page) /* * bzero_page(dest) @@ -178,6 +179,7 @@ ENTRY(bzero_page) bne 1b ldmfd sp!, {r4-r8, pc} +END(bzero_page) #else /* _ARM_ARCH_5E */ @@ -246,6 +248,7 @@ ENTRY(bcopy_page) bgt 1b ldmfd sp!, {r4, r5} RET +END(bcopy_page) /* * armv5e version of bzero_page @@ -273,4 +276,5 @@ ENTRY(bzero_page) subs r1, r1, #128 bne 1b RET +END(bzero_page) #endif /* _ARM_ARCH_5E */ Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/bcopyinout.S Sat Mar 16 02:48:49 2013 (r248361) @@ -312,6 +312,7 @@ ENTRY(copyin) RESTORE_REGS RET +END(copyin) /* * r0 = kernel space address @@ -538,6 +539,7 @@ ENTRY(copyout) RESTORE_REGS RET +END(copyout) #endif /* @@ -564,6 +566,7 @@ ENTRY(badaddr_read_1) mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] RET +END(badaddr_read_1) /* * int badaddr_read_2(const uint16_t *src, uint16_t *dest) @@ -589,6 +592,7 @@ ENTRY(badaddr_read_2) mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] RET +END(badaddr_read_2) /* * int badaddr_read_4(const uint32_t *src, uint32_t *dest) @@ -614,4 +618,5 @@ ENTRY(badaddr_read_4) mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] RET +END(badaddr_read_4) Modified: head/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- head/sys/arm/arm/bcopyinout_xscale.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/bcopyinout_xscale.S Sat Mar 16 02:48:49 2013 (r248361) @@ -492,7 +492,7 @@ ENTRY(copyin) ldrbt ip, [r0] strb ip, [r1] RET - +END(copyin) /* * r0 = kernel space address @@ -935,3 +935,5 @@ ENTRY(copyout) ldrb ip, [r0] strbt ip, [r1] RET +END(copyout) + Modified: head/sys/arm/arm/blockio.S ============================================================================== --- head/sys/arm/arm/blockio.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/blockio.S Sat Mar 16 02:48:49 2013 (r248361) @@ -101,6 +101,7 @@ ENTRY(read_multi_1) ldrgtb r3, [r0] strgtb r3, [r1], #1 ldmdb fp, {fp, sp, pc} +END(read_multi_1) /* * Write bytes to an I/O address from a block of memory @@ -152,6 +153,7 @@ ENTRY(write_multi_1) ldrgtb r3, [r1], #1 strgtb r3, [r0] ldmdb fp, {fp, sp, pc} +END(write_multi_1) /* * Reads short ints (16 bits) from an I/O address into a block of memory @@ -199,7 +201,7 @@ ENTRY(insw) bgt .Lfastinswloop RET - +END(insw) /* * Writes short ints (16 bits) from a block of memory to an I/O address @@ -260,6 +262,7 @@ ENTRY(outsw) bgt .Lfastoutswloop RET +END(outsw) /* * reads short ints (16 bits) from an I/O address into a block of memory @@ -318,7 +321,7 @@ ENTRY(insw16) bgt .Linsw16loop ldmfd sp!, {r4,r5,pc} /* Restore regs and go home */ - +END(insw16) /* * Writes short ints (16 bits) from a block of memory to an I/O address @@ -385,6 +388,7 @@ ENTRY(outsw16) bgt .Loutsw16loop ldmfd sp!, {r4,r5,pc} /* and go home */ +END(outsw16) /* * reads short ints (16 bits) from an I/O address into a block of memory @@ -481,6 +485,7 @@ ENTRY(inswm8) .Linswm8_l1: ldmfd sp!, {r4-r9,pc} /* And go home */ +END(inswm8) /* * write short ints (16 bits) to an I/O address from a block of memory @@ -585,3 +590,5 @@ ENTRY(outswm8) .Loutswm8_l1: ldmfd sp!, {r4-r8,pc} /* And go home */ +END(outswm8) + Modified: head/sys/arm/arm/bus_space_asm_generic.S ============================================================================== --- head/sys/arm/arm/bus_space_asm_generic.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/bus_space_asm_generic.S Sat Mar 16 02:48:49 2013 (r248361) @@ -50,14 +50,17 @@ __FBSDID("$FreeBSD$"); ENTRY(generic_bs_r_1) ldrb r0, [r1, r2] RET +END(generic_bs_r_1) ENTRY(generic_armv4_bs_r_2) ldrh r0, [r1, r2] RET +END(generic_armv4_bs_r_2) ENTRY(generic_bs_r_4) ldr r0, [r1, r2] RET +END(generic_bs_r_4) /* * write single @@ -66,14 +69,17 @@ ENTRY(generic_bs_r_4) ENTRY(generic_bs_w_1) strb r3, [r1, r2] RET +END(generic_bs_w_1) ENTRY(generic_armv4_bs_w_2) strh r3, [r1, r2] RET +END(generic_armv4_bs_w_2) ENTRY(generic_bs_w_4) str r3, [r1, r2] RET +END(generic_bs_w_4) /* * read multiple @@ -92,6 +98,7 @@ ENTRY(generic_bs_rm_1) bne 1b RET +END(generic_bs_rm_1) ENTRY(generic_armv4_bs_rm_2) add r0, r1, r2 @@ -106,6 +113,7 @@ ENTRY(generic_armv4_bs_rm_2) bne 1b RET +END(generic_armv4_bs_rm_2) ENTRY(generic_bs_rm_4) add r0, r1, r2 @@ -120,6 +128,7 @@ ENTRY(generic_bs_rm_4) bne 1b RET +END(generic_bs_rm_4) /* * write multiple @@ -138,6 +147,7 @@ ENTRY(generic_bs_wm_1) bne 1b RET +END(generic_bs_wm_1) ENTRY(generic_armv4_bs_wm_2) add r0, r1, r2 @@ -152,6 +162,7 @@ ENTRY(generic_armv4_bs_wm_2) bne 1b RET +END(generic_armv4_bs_wm_2) ENTRY(generic_bs_wm_4) add r0, r1, r2 @@ -166,6 +177,7 @@ ENTRY(generic_bs_wm_4) bne 1b RET +END(generic_bs_wm_4) /* * read region @@ -184,6 +196,7 @@ ENTRY(generic_bs_rr_1) bne 1b RET +END(generic_bs_rr_1) ENTRY(generic_armv4_bs_rr_2) add r0, r1, r2 @@ -198,6 +211,7 @@ ENTRY(generic_armv4_bs_rr_2) bne 1b RET +END(generic_armv4_bs_rr_2) ENTRY(generic_bs_rr_4) add r0, r1, r2 @@ -212,6 +226,7 @@ ENTRY(generic_bs_rr_4) bne 1b RET +END(generic_bs_rr_4) /* * write region. @@ -230,6 +245,7 @@ ENTRY(generic_bs_wr_1) bne 1b RET +END(generic_bs_wr_1) ENTRY(generic_armv4_bs_wr_2) add r0, r1, r2 @@ -244,6 +260,7 @@ ENTRY(generic_armv4_bs_wr_2) bne 1b RET +END(generic_armv4_bs_wr_2) ENTRY(generic_bs_wr_4) add r0, r1, r2 @@ -258,6 +275,7 @@ ENTRY(generic_bs_wr_4) bne 1b RET +END(generic_bs_wr_4) /* * set region @@ -275,6 +293,7 @@ ENTRY(generic_bs_sr_1) bne 1b RET +END(generic_bs_sr_1) ENTRY(generic_armv4_bs_sr_2) add r0, r1, r2 @@ -288,6 +307,7 @@ ENTRY(generic_armv4_bs_sr_2) bne 1b RET +END(generic_armv4_bs_sr_2) ENTRY(generic_bs_sr_4) add r0, r1, r2 @@ -301,6 +321,7 @@ ENTRY(generic_bs_sr_4) bne 1b RET +END(generic_bs_sr_4) /* * copy region @@ -335,3 +356,5 @@ ENTRY(generic_armv4_bs_c_2) bne 3b RET +END(generic_armv4_bs_c_2) + Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/copystr.S Sat Mar 16 02:48:49 2013 (r248361) @@ -93,6 +93,7 @@ ENTRY(copystr) ldmfd sp!, {r4-r5} /* stack is 8 byte aligned */ RET +END(copystr) #define SAVE_REGS stmfd sp!, {r4-r6} #define RESTORE_REGS ldmfd sp!, {r4-r6} @@ -143,6 +144,7 @@ ENTRY(copyinstr) RESTORE_REGS RET +END(copyinstr) /* * r0 - kernel space address @@ -190,6 +192,7 @@ ENTRY(copyoutstr) RESTORE_REGS RET +END(copyoutstr) /* A fault occurred during the copy */ .Lcopystrfault: Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm.S Sat Mar 16 02:48:49 2013 (r248361) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); ENTRY(cpufunc_nullop) RET +END(cpufunc_nullop) /* * Generic functions to read the internal coprocessor registers @@ -64,27 +65,32 @@ ENTRY(cpufunc_nullop) ENTRY(cpufunc_id) mrc p15, 0, r0, c0, c0, 0 RET +END(cpufunc_id) ENTRY(cpufunc_cpuid) mrc p15, 0, r0, c0, c0, 0 RET +END(cpufunc_cpuid) ENTRY(cpu_get_control) mrc p15, 0, r0, c1, c0, 0 RET +END(cpu_get_control) ENTRY(cpu_read_cache_config) mrc p15, 0, r0, c0, c0, 1 RET +END(cpu_read_cache_config) ENTRY(cpufunc_faultstatus) mrc p15, 0, r0, c5, c0, 0 RET +END(cpufunc_faultstatus) ENTRY(cpufunc_faultaddress) mrc p15, 0, r0, c6, c0, 0 RET - +END(cpufunc_faultaddress) /* * Generic functions to write the internal coprocessor registers @@ -101,11 +107,13 @@ ENTRY(cpufunc_faultaddress) ENTRY(cpufunc_control) mcr p15, 0, r0, c1, c0, 0 RET +END(cpufunc_control) #endif ENTRY(cpufunc_domains) mcr p15, 0, r0, c3, c0, 0 RET +END(cpufunc_domains) /* * Generic functions to read/modify/write the internal coprocessor registers @@ -131,6 +139,8 @@ ENTRY(cpufunc_control) .Lglou: .asciz "plop %p\n" .align 0 +END(cpufunc_control) + /* * other potentially useful software functions are: * clean D cache entry and flush I cache entry @@ -157,6 +167,7 @@ ENTRY(get_pc_str_offset) ldr r0, [sp] sub r0, r0, r1 ldmdb fp, {fp, sp, pc} +END(get_pc_str_offset) /* Allocate and lock a cacheline for the specified address. */ @@ -180,3 +191,5 @@ ENTRY(arm_lock_cache_line) mcr p15, 0, r1, c9, c2, 0 /* Disable data cache lock mode */ CPWAIT() RET +END(arm_lock_cache_line) + Modified: head/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm10.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm10.S Sat Mar 16 02:48:49 2013 (r248361) @@ -50,6 +50,7 @@ ENTRY(arm10_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ bx lr +END(arm10_setttb) /* * TLB functions @@ -58,11 +59,12 @@ ENTRY(arm10_tlb_flushID_SE) mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ bx lr +END(arm10_tlb_flushID_SE) ENTRY(arm10_tlb_flushI_SE) mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ bx lr - +END(arm10_tlb_flushI_SE) /* * Cache operations. For the entire cache we use the set/index @@ -90,6 +92,7 @@ ENTRY_NP(arm10_icache_sync_range) bhi .Larm10_sync_next mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_icache_sync_range) ENTRY_NP(arm10_icache_sync_all) .Larm10_icache_sync_all: @@ -114,6 +117,7 @@ ENTRY_NP(arm10_icache_sync_all) bhs .Lnext_set /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_icache_sync_all) .Larm10_line_size: .word _C_LABEL(arm_pdcache_line_size) @@ -134,6 +138,7 @@ ENTRY(arm10_dcache_wb_range) bhi .Larm10_wb_next mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_dcache_wb_range) ENTRY(arm10_dcache_wbinv_range) ldr ip, .Larm10_line_size @@ -151,6 +156,7 @@ ENTRY(arm10_dcache_wbinv_range) bhi .Larm10_wbinv_next mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_dcache_wbinv_range) /* * Note, we must not invalidate everything. If the range is too big we @@ -172,6 +178,7 @@ ENTRY(arm10_dcache_inv_range) bhi .Larm10_inv_next mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_dcache_inv_range) ENTRY(arm10_idcache_wbinv_range) ldr ip, .Larm10_line_size @@ -190,6 +197,7 @@ ENTRY(arm10_idcache_wbinv_range) bhi .Larm10_id_wbinv_next mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_idcache_wbinv_range) ENTRY_NP(arm10_idcache_wbinv_all) .Larm10_idcache_wbinv_all: @@ -215,6 +223,8 @@ ENTRY(arm10_dcache_wbinv_all) bhs .Lnext_set_inv /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ bx lr +END(arm10_idcache_wbinv_all) +END(arm10_dcache_wbinv_all) .Larm10_cache_data: .word _C_LABEL(arm10_dcache_sets_max) @@ -242,6 +252,7 @@ ENTRY(arm10_context_switch) nop nop bx lr +END(arm10_context_switch) .bss Modified: head/sys/arm/arm/cpufunc_asm_arm11.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm11.S Sat Mar 16 02:48:49 2013 (r248361) @@ -55,6 +55,7 @@ ENTRY(arm11_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ RET +END(arm11_setttb) /* * TLB functions @@ -64,12 +65,13 @@ ENTRY(arm11_tlb_flushID_SE) mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ RET +END(arm11_tlb_flushID_SE) ENTRY(arm11_tlb_flushI_SE) mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ RET - +END(arm11_tlb_flushI_SE) /* * Context switch. @@ -94,6 +96,7 @@ ENTRY(arm11_context_switch) nop nop RET +END(arm11_context_switch) /* * TLB functions @@ -102,21 +105,25 @@ ENTRY(arm11_tlb_flushID) mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr +END(arm11_tlb_flushID) ENTRY(arm11_tlb_flushI) mcr p15, 0, r0, c8, c5, 0 /* flush I tlb */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr +END(arm11_tlb_flushI) ENTRY(arm11_tlb_flushD) mcr p15, 0, r0, c8, c6, 0 /* flush D tlb */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr +END(arm11_tlb_flushD) ENTRY(arm11_tlb_flushD_SE) mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr +END(arm11_tlb_flushD_SE) /* * Other functions @@ -124,8 +131,11 @@ ENTRY(arm11_tlb_flushD_SE) ENTRY(arm11_drain_writebuf) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ mov pc, lr +END(arm11_drain_writebuf) ENTRY_NP(arm11_sleep) mov r0, #0 mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */ RET +END(arm11_sleep) + Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm11x6.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm11x6.S Sat Mar 16 02:48:49 2013 (r248361) @@ -124,24 +124,29 @@ ENTRY(arm11x6_setttb) mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLBs */ mcr p15, 0, r1, c7, c10, 4 /* drain write buffer */ RET +END(arm11x6_setttb) ENTRY_NP(arm11x6_idcache_wbinv_all) Flush_D_cache(r0) Invalidate_I_cache(r0, r1) RET +END(arm11x6_idcache_wbinv_all) ENTRY_NP(arm11x6_dcache_wbinv_all) Flush_D_cache(r0) RET +END(arm11x6_dcache_wbinv_all) ENTRY_NP(arm11x6_icache_sync_all) Flush_D_cache(r0) Invalidate_I_cache(r0, r1) RET +END(arm11x6_icache_sync_all) ENTRY_NP(arm11x6_flush_prefetchbuf) mcr p15, 0, r0, c7, c5, 4 /* Flush Prefetch Buffer */ RET +END(arm11x6_flush_prefetchbuf) ENTRY_NP(arm11x6_icache_sync_range) add r1, r1, r0 @@ -168,6 +173,7 @@ ENTRY_NP(arm11x6_icache_sync_range) mcrr p15, 0, r1, r0, c12 /* clean and invalidate D cache range */ /* XXXNH */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(arm11x6_icache_sync_range) ENTRY_NP(arm11x6_idcache_wbinv_range) add r1, r1, r0 @@ -194,6 +200,7 @@ ENTRY_NP(arm11x6_idcache_wbinv_range) mcrr p15, 0, r1, r0, c14 /* clean and invalidate D cache range */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(arm11x6_idcache_wbinv_range) /* * Preload the cache before issuing the WFI by conditionally disabling the @@ -216,3 +223,5 @@ ENTRY_NP(arm11x6_sleep) nop bne 1b RET +END(arm11x6_sleep) + Modified: head/sys/arm/arm/cpufunc_asm_arm7tdmi.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm7tdmi.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm7tdmi.S Sat Mar 16 02:48:49 2013 (r248361) @@ -60,6 +60,7 @@ ENTRY(arm7tdmi_setttb) bl _C_LABEL(arm7tdmi_cache_flushID) mov pc, r2 +END(arm7tdmi_setttb) /* * TLB functions @@ -68,10 +69,12 @@ ENTRY(arm7tdmi_tlb_flushID) mov r0, #0 mcr p15, 0, r0, c8, c7, 0 RET +END(arm7tdmi_tlb_flushID) ENTRY(arm7tdmi_tlb_flushID_SE) mcr p15, 0, r0, c8, c7, 1 RET +END(arm7tdmi_tlb_flushID_SE) /* * Cache functions @@ -86,6 +89,7 @@ ENTRY(arm7tdmi_cache_flushID) mov r0, r0 RET +END(arm7tdmi_cache_flushID) /* * Context switch. @@ -98,3 +102,5 @@ ENTRY(arm7tdmi_cache_flushID) */ ENTRY(arm7tdmi_context_switch) b _C_LABEL(arm7tdmi_setttb) +END(arm7tdmi_context_switch) + Modified: head/sys/arm/arm/cpufunc_asm_arm8.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm8.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm8.S Sat Mar 16 02:48:49 2013 (r248361) @@ -58,6 +58,7 @@ ENTRY(arm8_clock_config) mcr p15, 0, r2, c15, c0, 0 /* Write clock register */ mov r0, r3 /* Return old value */ RET +END(arm8_clock_config) /* * Functions to set the MMU Translation Table Base register @@ -90,6 +91,7 @@ ENTRY(arm8_setttb) msr cpsr_all, r3 RET +END(arm8_setttb) /* * TLB functions @@ -97,10 +99,12 @@ ENTRY(arm8_setttb) ENTRY(arm8_tlb_flushID) mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ RET +END(arm8_tlb_flushID) ENTRY(arm8_tlb_flushID_SE) mcr p15, 0, r0, c8, c7, 1 /* flush I+D tlb single entry */ RET +END(arm8_tlb_flushID_SE) /* * Cache functions @@ -108,10 +112,12 @@ ENTRY(arm8_tlb_flushID_SE) ENTRY(arm8_cache_flushID) mcr p15, 0, r0, c7, c7, 0 /* flush I+D cache */ RET +END(arm8_cache_flushID) ENTRY(arm8_cache_flushID_E) mcr p15, 0, r0, c7, c7, 1 /* flush I+D single entry */ RET +END(arm8_cache_flushID_E) ENTRY(arm8_cache_cleanID) mov r0, #0x00000000 @@ -153,10 +159,12 @@ ENTRY(arm8_cache_cleanID) bne 1b RET +END(arm8_cache_cleanID) ENTRY(arm8_cache_cleanID_E) mcr p15, 0, r0, c7, c11, 1 /* clean I+D single entry */ RET +END(arm8_cache_cleanID_E) ENTRY(arm8_cache_purgeID) /* @@ -232,6 +240,7 @@ ENTRY(arm8_cache_purgeID) msr cpsr_all, r3 RET +END(arm8_cache_purgeID) ENTRY(arm8_cache_purgeID_E) /* @@ -253,6 +262,7 @@ ENTRY(arm8_cache_purgeID_E) mcr p15, 0, r0, c7, c7, 1 /* flush I+D single entry */ msr cpsr_all, r3 RET +END(arm8_cache_purgeID_E) /* * Context switch. @@ -282,3 +292,5 @@ ENTRY(arm8_context_switch) mov r0, r0 mov r0, r0 RET +END(arm8_context_switch) + Modified: head/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm9.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_arm9.S Sat Mar 16 02:48:49 2013 (r248361) @@ -49,6 +49,7 @@ ENTRY(arm9_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ mov pc, lr +END(arm9_setttb) /* * TLB functions @@ -57,6 +58,7 @@ ENTRY(arm9_tlb_flushID_SE) mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ mcr p15, 0, r0, c8, c5, 1 /* flush I tlb single entry */ mov pc, lr +END(arm9_tlb_flushID_SE) /* * Cache operations. For the entire cache we use the set/index @@ -83,6 +85,7 @@ ENTRY_NP(arm9_icache_sync_range) subs r1, r1, ip bhi .Larm9_sync_next mov pc, lr +END(arm9_icache_sync_range) ENTRY_NP(arm9_icache_sync_all) .Larm9_icache_sync_all: @@ -106,6 +109,7 @@ ENTRY_NP(arm9_icache_sync_all) subs s_max, s_max, s_inc bhs .Lnext_set /* Next set */ mov pc, lr +END(arm9_icache_sync_all) .Larm9_line_size: .word _C_LABEL(arm_pdcache_line_size) @@ -125,6 +129,7 @@ ENTRY(arm9_dcache_wb_range) subs r1, r1, ip bhi .Larm9_wb_next mov pc, lr +END(arm9_dcache_wb_range) ENTRY(arm9_dcache_wbinv_range) ldr ip, .Larm9_line_size @@ -141,6 +146,7 @@ ENTRY(arm9_dcache_wbinv_range) subs r1, r1, ip bhi .Larm9_wbinv_next mov pc, lr +END(arm9_dcache_wbinv_range) /* * Note, we must not invalidate everything. If the range is too big we @@ -161,6 +167,7 @@ ENTRY(arm9_dcache_inv_range) subs r1, r1, ip bhi .Larm9_inv_next mov pc, lr +END(arm9_dcache_inv_range) ENTRY(arm9_idcache_wbinv_range) ldr ip, .Larm9_line_size @@ -178,6 +185,7 @@ ENTRY(arm9_idcache_wbinv_range) subs r1, r1, ip bhi .Larm9_id_wbinv_next mov pc, lr +END(arm9_idcache_wbinv_range) ENTRY_NP(arm9_idcache_wbinv_all) .Larm9_idcache_wbinv_all: @@ -202,6 +210,8 @@ ENTRY(arm9_dcache_wbinv_all) subs s_max, s_max, s_inc bhs .Lnext_set_inv /* Next set */ mov pc, lr +END(arm9_idcache_wbinv_all) +END(arm9_dcache_wbinv_all) .Larm9_cache_data: .word _C_LABEL(arm9_dcache_sets_max) @@ -229,6 +239,7 @@ ENTRY(arm9_context_switch) nop nop mov pc, lr +END(arm9_context_switch) .bss Modified: head/sys/arm/arm/cpufunc_asm_armv4.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv4.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_armv4.S Sat Mar 16 02:48:49 2013 (r248361) @@ -46,18 +46,22 @@ __FBSDID("$FreeBSD$"); ENTRY(armv4_tlb_flushID) mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ RET +END(armv4_tlb_flushID) ENTRY(armv4_tlb_flushI) mcr p15, 0, r0, c8, c5, 0 /* flush I tlb */ RET +END(armv4_tlb_flushI) ENTRY(armv4_tlb_flushD) mcr p15, 0, r0, c8, c6, 0 /* flush D tlb */ RET +END(armv4_tlb_flushD) ENTRY(armv4_tlb_flushD_SE) mcr p15, 0, r0, c8, c6, 1 /* flush D tlb single entry */ RET +END(armv4_tlb_flushD_SE) /* * Other functions @@ -65,3 +69,5 @@ ENTRY(armv4_tlb_flushD_SE) ENTRY(armv4_drain_writebuf) mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ RET +END(armv4_drain_writebuf) + Modified: head/sys/arm/arm/cpufunc_asm_armv5.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv5.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_armv5.S Sat Mar 16 02:48:49 2013 (r248361) @@ -51,6 +51,7 @@ ENTRY(armv5_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ RET +END(armv5_setttb) /* * Cache operations. For the entire cache we use the set/index @@ -79,6 +80,7 @@ ENTRY_NP(armv5_icache_sync_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_icache_sync_range) ENTRY_NP(armv5_icache_sync_all) .Larmv5_icache_sync_all: @@ -105,6 +107,7 @@ ENTRY_NP(armv5_icache_sync_all) bpl 1b /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_icache_sync_all) .Larmv5_line_size: .word _C_LABEL(arm_pdcache_line_size) @@ -126,6 +129,7 @@ ENTRY(armv5_dcache_wb_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_dcache_wb_range) ENTRY(armv5_dcache_wbinv_range) ldr ip, .Larmv5_line_size @@ -144,6 +148,7 @@ ENTRY(armv5_dcache_wbinv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_dcache_wbinv_range) /* * Note, we must not invalidate everything. If the range is too big we @@ -166,6 +171,7 @@ ENTRY(armv5_dcache_inv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_dcache_inv_range) ENTRY(armv5_idcache_wbinv_range) ldr ip, .Larmv5_line_size @@ -185,6 +191,7 @@ ENTRY(armv5_idcache_wbinv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_idcache_wbinv_range) ENTRY_NP(armv5_idcache_wbinv_all) .Larmv5_idcache_wbinv_all: @@ -212,6 +219,8 @@ ENTRY(armv5_dcache_wbinv_all) bpl 1b /* Next set */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_idcache_wbinv_all) +END(armv5_dcache_wbinv_all) .Larmv5_cache_data: .word _C_LABEL(armv5_dcache_sets_max) Modified: head/sys/arm/arm/cpufunc_asm_armv5_ec.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv5_ec.S Sat Mar 16 01:16:57 2013 (r248360) +++ head/sys/arm/arm/cpufunc_asm_armv5_ec.S Sat Mar 16 02:48:49 2013 (r248361) @@ -66,6 +66,7 @@ ENTRY(armv5_ec_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ RET +END(armv5_ec_setttb) /* * Cache operations. For the entire cache we use the enhanced cache @@ -90,6 +91,7 @@ ENTRY_NP(armv5_ec_icache_sync_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_icache_sync_range) ENTRY_NP(armv5_ec_icache_sync_all) .Larmv5_ec_icache_sync_all: @@ -107,6 +109,7 @@ ENTRY_NP(armv5_ec_icache_sync_all) bne 1b /* More to do? */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_icache_sync_all) .Larmv5_ec_line_size: .word _C_LABEL(arm_pdcache_line_size) @@ -128,6 +131,7 @@ ENTRY(armv5_ec_dcache_wb_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_dcache_wb_range) ENTRY(armv5_ec_dcache_wbinv_range) ldr ip, .Larmv5_ec_line_size @@ -146,6 +150,7 @@ ENTRY(armv5_ec_dcache_wbinv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_dcache_wbinv_range) /* * Note, we must not invalidate everything. If the range is too big we @@ -168,6 +173,7 @@ ENTRY(armv5_ec_dcache_inv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_dcache_inv_range) ENTRY(armv5_ec_idcache_wbinv_range) ldr ip, .Larmv5_ec_line_size @@ -187,6 +193,7 @@ ENTRY(armv5_ec_idcache_wbinv_range) bpl 1b mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET +END(armv5_ec_idcache_wbinv_range) ENTRY_NP(armv5_ec_idcache_wbinv_all) .Larmv5_ec_idcache_wbinv_all: @@ -197,6 +204,7 @@ ENTRY_NP(armv5_ec_idcache_wbinv_all) */ mcr p15, 0, r0, c7, c5, 0 /* Invalidate ICache */ /* Fall through to purge Dcache. */ +END(armv5_ec_idcache_wbinv_all) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 03:15: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]) by hub.freebsd.org (Postfix) with ESMTP id 2F895C0C; Sat, 16 Mar 2013 03:15:25 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0F959D55; Sat, 16 Mar 2013 03:15:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G3FOH5082799; Sat, 16 Mar 2013 03:15:24 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G3FOwq082798; Sat, 16 Mar 2013 03:15:24 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160315.r2G3FOwq082798@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 03:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248362 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 03:15:25 -0000 Author: andrew Date: Sat Mar 16 03:15:24 2013 New Revision: 248362 URL: http://svnweb.freebsd.org/changeset/base/248362 Log: Adjust the indentation of the trampoline compilation to make the commands easier to follow. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Mar 16 02:48:49 2013 (r248361) +++ head/sys/conf/Makefile.arm Sat Mar 16 03:15:24 2013 (r248362) @@ -82,44 +82,43 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h sed s/${KERNVIRTADDR}/${KERNPHYSADDR}/ ldscript.$M > ldscript.$M.tramp sed s/" + SIZEOF_HEADERS"// ldscript.$M.tramp > \ - ldscript.$M.tramp.noheader + ldscript.$M.tramp.noheader echo "#include " >tmphack.S echo "ENTRY(_start)" >>tmphack.S echo "bl _startC" >>tmphack.S ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \ - -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp + -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp) && \ - echo "#define KERNSIZE $$st_size" >>opt_kernname.h + echo "#define KERNSIZE $$st_size" >>opt_kernname.h ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ - tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp + tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ - ldscript.$M.tramp.noheader \ - tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ + ldscript.$M.tramp.noheader \ + tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader - ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ - ${KERNEL_KO}.tramp.bin + ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ + ${KERNEL_KO}.tramp.bin ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp - echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" \ - >opt_kernname.h + echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h eval $$(stat -s ${KERNEL_KO}.tmp) && \ - echo "#define KERNSIZE $$st_size" >>opt_kernname.h + echo "#define KERNSIZE $$st_size" >>opt_kernname.h gzip -f9 ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ - echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h + echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h ${CC} -O2 -ffreestanding -DKZIP -I. -I$S -c $S/kern/inflate.c -o \ inflate-tramp.o ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker ldscript.$M.tramp \ - -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ - $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp + -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ + $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ - ldscript.$M.tramp.noheader \ - -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ - $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader + ldscript.$M.tramp.noheader \ + -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ + $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ - inflate-tramp.o tmphack.S + inflate-tramp.o tmphack.S MKMODULESENV+= MACHINE=${MACHINE} From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 03:21:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A27BDB2; Sat, 16 Mar 2013 03:21:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C62CD7C; Sat, 16 Mar 2013 03:21:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G3LQO2085168; Sat, 16 Mar 2013 03:21:26 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G3LQOG085167; Sat, 16 Mar 2013 03:21:26 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160321.r2G3LQOG085167@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 03:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248363 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 03:21:26 -0000 Author: andrew Date: Sat Mar 16 03:21:25 2013 New Revision: 248363 URL: http://svnweb.freebsd.org/changeset/base/248363 Log: Fix the indentation for a few commands that were missed or incorrectly indented in r248362. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Mar 16 03:15:24 2013 (r248362) +++ head/sys/conf/Makefile.arm Sat Mar 16 03:21:25 2013 (r248363) @@ -96,8 +96,8 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ ${CC} -O -nostdlib -I. -I$S -Xlinker -T -Xlinker \ ldscript.$M.tramp.noheader \ tmphack.S $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S \ - ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader - ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader + ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.tramp.bin ${OBJCOPY} ${STRIP_FLAGS} ${KERNEL_KO}.tmp echo "#define KERNNAME \"${KERNEL_KO}.tmp.gz\"" >opt_kernname.h @@ -116,7 +116,7 @@ ${KERNEL_KO}.tramp: ${KERNEL_KO} $S/$M/$ -DKZIP tmphack.S $S/$M/$M/elf_trampoline.c inflate-tramp.o \ $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ - ${KERNEL_KO}.gz.tramp.bin + ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ inflate-tramp.o tmphack.S From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 03:50:28 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]) by hub.freebsd.org (Postfix) with ESMTP id 9B26A133; Sat, 16 Mar 2013 03:50:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B013E0F; Sat, 16 Mar 2013 03:50:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G3oS5n092261; Sat, 16 Mar 2013 03:50:28 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G3oSEM092260; Sat, 16 Mar 2013 03:50:28 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160350.r2G3oSEM092260@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 03:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248364 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 03:50:28 -0000 Author: andrew Date: Sat Mar 16 03:50:27 2013 New Revision: 248364 URL: http://svnweb.freebsd.org/changeset/base/248364 Log: Implement the required but unused __aeabi_unwind_cpp_* functions in the trampoline kernel. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sat Mar 16 03:21:25 2013 (r248363) +++ head/sys/arm/arm/elf_trampoline.c Sat Mar 16 03:50:27 2013 (r248364) @@ -701,3 +701,18 @@ __start(void) do_call(dst, kernel, dst + (unsigned int)(&func_end) - (unsigned int)(&load_kernel) + 800, sp); } + +#ifdef __ARM_EABI__ +/* We need to provide these functions but never call them */ +void __aeabi_unwind_cpp_pr0(void); +void __aeabi_unwind_cpp_pr1(void); +void __aeabi_unwind_cpp_pr2(void); + +__strong_reference(__aeabi_unwind_cpp_pr0, __aeabi_unwind_cpp_pr1); +__strong_reference(__aeabi_unwind_cpp_pr0, __aeabi_unwind_cpp_pr2); +void +__aeabi_unwind_cpp_pr0(void) +{ +} +#endif + From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 03:57:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CF142E2; Sat, 16 Mar 2013 03:57:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8493CE38; Sat, 16 Mar 2013 03:57:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G3vkVD094644; Sat, 16 Mar 2013 03:57:46 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G3vkpT094643; Sat, 16 Mar 2013 03:57:46 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160357.r2G3vkpT094643@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 03:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248365 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 03:57:46 -0000 Author: andrew Date: Sat Mar 16 03:57:46 2013 New Revision: 248365 URL: http://svnweb.freebsd.org/changeset/base/248365 Log: The compiler argument -mno-apcs-frame has no meaning when using EABI as we will use aapcs frames, not apcs frames. Modified: head/sys/conf/Makefile.arm Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Mar 16 03:50:27 2013 (r248364) +++ head/sys/conf/Makefile.arm Sat Mar 16 03:57:46 2013 (r248365) @@ -44,7 +44,9 @@ CFLAGS += -mno-thumb-interwork .endif .if empty(DDB_ENABLED) +.if !defined(WITH_ARM_EABI) CFLAGS += -mno-apcs-frame +.endif .elif defined(WITH_ARM_EABI) CFLAGS += -funwind-tables .if ${COMPILER_TYPE} == "clang" From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 04:06:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CB95C5AD; Sat, 16 Mar 2013 04:06:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A4895E7A; Sat, 16 Mar 2013 04:06:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G46oh2097858; Sat, 16 Mar 2013 04:06:50 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G46oR0097853; Sat, 16 Mar 2013 04:06:50 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160406.r2G46oR0097853@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 04:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248366 - in head/sys: arm/arm conf libkern/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.14 Precedence: list List-Id: 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, 16 Mar 2013 04:06:50 -0000 Author: andrew Date: Sat Mar 16 04:06:49 2013 New Revision: 248366 URL: http://svnweb.freebsd.org/changeset/base/248366 Log: Move the __aeabi_unwind_cpp_pr{0,1,2} functions to libkern so they can be referenced in a non-debug kernel. Added: head/sys/libkern/arm/aeabi_unwind.c (contents, props changed) Modified: head/sys/arm/arm/db_trace.c head/sys/conf/files.arm Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Sat Mar 16 03:57:46 2013 (r248365) +++ head/sys/arm/arm/db_trace.c Sat Mar 16 04:06:49 2013 (r248366) @@ -126,29 +126,6 @@ struct unwind_state { uint16_t update_mask; }; -/* We need to provide these but never use them */ -void __aeabi_unwind_cpp_pr0(void); -void __aeabi_unwind_cpp_pr1(void); -void __aeabi_unwind_cpp_pr2(void); - -void -__aeabi_unwind_cpp_pr0(void) -{ - panic("__aeabi_unwind_cpp_pr0"); -} - -void -__aeabi_unwind_cpp_pr1(void) -{ - panic("__aeabi_unwind_cpp_pr1"); -} - -void -__aeabi_unwind_cpp_pr2(void) -{ - panic("__aeabi_unwind_cpp_pr2"); -} - /* Expand a 31-bit signed value to a 32-bit signed value */ static __inline int32_t db_expand_prel31(uint32_t prel31) Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Mar 16 03:57:46 2013 (r248365) +++ head/sys/conf/files.arm Sat Mar 16 04:06:49 2013 (r248366) @@ -72,6 +72,7 @@ font.h optional sc \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" kern/subr_busdma_bufalloc.c standard kern/subr_dummy_vdso_tc.c standard +libkern/arm/aeabi_unwind.c standard libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard Added: head/sys/libkern/arm/aeabi_unwind.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/aeabi_unwind.c Sat Mar 16 04:06:49 2013 (r248366) @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013 Andrew Turner + * 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 + +#ifdef __ARM_EABI__ +/* We need to provide these functions never call them */ +void __aeabi_unwind_cpp_pr0(void); +void __aeabi_unwind_cpp_pr1(void); +void __aeabi_unwind_cpp_pr2(void); + +void +__aeabi_unwind_cpp_pr0(void) +{ + panic("__aeabi_unwind_cpp_pr0"); +} + +void +__aeabi_unwind_cpp_pr1(void) +{ + panic("__aeabi_unwind_cpp_pr1"); +} + +void +__aeabi_unwind_cpp_pr2(void) +{ + panic("__aeabi_unwind_cpp_pr2"); +} +#endif + From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 04:08: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]) by hub.freebsd.org (Postfix) with ESMTP id 4336B72E; Sat, 16 Mar 2013 04:08:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 12F5FE88; Sat, 16 Mar 2013 04:08:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G482wH098421; Sat, 16 Mar 2013 04:08:02 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G482NN098415; Sat, 16 Mar 2013 04:08:02 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303160408.r2G482NN098415@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 04:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248367 - head/sys/libkern/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.14 Precedence: list List-Id: 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, 16 Mar 2013 04:08:03 -0000 Author: andrew Date: Sat Mar 16 04:08:01 2013 New Revision: 248367 URL: http://svnweb.freebsd.org/changeset/base/248367 Log: Add END to ARM libkern assembly functions Modified: head/sys/libkern/arm/divsi3.S head/sys/libkern/arm/ffs.S head/sys/libkern/arm/ldivmod.S head/sys/libkern/arm/memcpy.S Modified: head/sys/libkern/arm/divsi3.S ============================================================================== --- head/sys/libkern/arm/divsi3.S Sat Mar 16 04:06:49 2013 (r248366) +++ head/sys/libkern/arm/divsi3.S Sat Mar 16 04:08:01 2013 (r248367) @@ -29,6 +29,7 @@ ENTRY_NP(__umodsi3) add sp, sp, #4 /* unalign stack */ mov r0, r1 ldmfd sp!, {pc} +END(__umodsi3) ENTRY_NP(__modsi3) stmfd sp!, {lr} @@ -48,6 +49,7 @@ ENTRY_NP(__modsi3) mvn r0, #0 #endif RET +END(__modsi3) #ifdef __ARM_EABI__ ENTRY_NP(__aeabi_uidiv) @@ -74,6 +76,11 @@ ENTRY_NP(__udivsi3) mov r0, r1 mov r1, #0 RET +#ifdef __ARM_EABI__ +END(__aeabi_uidiv) +END(__aeabi_uidivmod) +#endif +END(__udivsi3) #ifdef __ARM_EABI__ ENTRY_NP(__aeabi_idiv) @@ -393,3 +400,9 @@ ENTRY_NP(__divsi3) addhs r3, r3, r2 mov r0, r3 RET +#ifdef __ARM_EABI__ +END(__aeabi_idiv) +END(__aeabi_idivmod) +#endif +END(__divsi3) + Modified: head/sys/libkern/arm/ffs.S ============================================================================== --- head/sys/libkern/arm/ffs.S Sat Mar 16 04:06:49 2013 (r248366) +++ head/sys/libkern/arm/ffs.S Sat Mar 16 04:08:01 2013 (r248367) @@ -82,3 +82,5 @@ ENTRY(ffs) rsbne r0, r0, #32 RET #endif +END(ffs) + Modified: head/sys/libkern/arm/ldivmod.S ============================================================================== --- head/sys/libkern/arm/ldivmod.S Sat Mar 16 04:06:49 2013 (r248366) +++ head/sys/libkern/arm/ldivmod.S Sat Mar 16 04:08:01 2013 (r248367) @@ -53,6 +53,7 @@ ENTRY_NP(__aeabi_ldivmod) add sp, sp, #8 /* Move sp to the remainder value */ ldmfd sp!, {r2, r3} /* Load the remainder */ RET +END(__aeabi_ldivmod) ENTRY_NP(__aeabi_uldivmod) sub sp, sp, #8 /* Space for the remainder */ @@ -62,6 +63,7 @@ ENTRY_NP(__aeabi_uldivmod) add sp, sp, #8 /* Move sp to the remainder value */ ldmfd sp!, {r2, r3} /* Load the remainder */ RET +END(__aeabi_uldivmod) #endif Modified: head/sys/libkern/arm/memcpy.S ============================================================================== --- head/sys/libkern/arm/memcpy.S Sat Mar 16 04:06:49 2013 (r248366) +++ head/sys/libkern/arm/memcpy.S Sat Mar 16 04:08:01 2013 (r248367) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Andrew Turner + * Copyright (C) 2013 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); ENTRY_NP(__aeabi_memcpy) b memcpy +END(__aeabi_memcpy) #endif From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 05:40:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 426A9321; Sat, 16 Mar 2013 05:40:30 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 340E421C; Sat, 16 Mar 2013 05:40:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G5eULH025785; Sat, 16 Mar 2013 05:40:30 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G5eTlC025783; Sat, 16 Mar 2013 05:40:29 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201303160540.r2G5eTlC025783@svn.freebsd.org> From: Neel Natu Date: Sat, 16 Mar 2013 05:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248368 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 05:40:30 -0000 Author: neel Date: Sat Mar 16 05:40:29 2013 New Revision: 248368 URL: http://svnweb.freebsd.org/changeset/base/248368 Log: Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index wraparound is handled correctly. The gory details are available here: http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html This fixes a regression introduced in r247871. Pointed out by: Bruce Evans, Chris Torek Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Sat Mar 16 04:08:01 2013 (r248367) +++ head/usr.sbin/bhyve/pci_virtio_net.c Sat Mar 16 05:40:29 2013 (r248368) @@ -170,7 +170,7 @@ pci_vtnet_iosize(struct pci_devinst *pi) static int hq_num_avail(struct vring_hqueue *hq) { - int ndesc; + uint16_t ndesc; /* * We're just computing (a-b) in GF(216). From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 08:51: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]) by hub.freebsd.org (Postfix) with ESMTP id 235449F2; Sat, 16 Mar 2013 08:51:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09C047D8; Sat, 16 Mar 2013 08:51:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G8pl1C084719; Sat, 16 Mar 2013 08:51:47 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G8pl2I084717; Sat, 16 Mar 2013 08:51:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303160851.r2G8pl2I084717@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 16 Mar 2013 08:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248370 - in 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.14 Precedence: list List-Id: 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, 16 Mar 2013 08:51:48 -0000 Author: glebius Date: Sat Mar 16 08:51:47 2013 New Revision: 248370 URL: http://svnweb.freebsd.org/changeset/base/248370 Log: Belatedly remove the vinum(4) manual page. The vinum manager is absent in FreeBSD since 6.0-RELEASE. Reviewed by: joel Deleted: head/share/man/man4/vinum.4 Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Mar 16 08:16:11 2013 (r248369) +++ head/ObsoleteFiles.inc Sat Mar 16 08:51:47 2013 (r248370) @@ -38,6 +38,7 @@ # xargs -n1 | sort | uniq -d; # done +OLD_FILES+=usr/share/man/man4/vinum.4.gz # 20130311: Ports are no more available via cvsup OLD_FILES+=usr/share/examples/cvsup/ports-supfile OLD_FILES+=usr/share/examples/cvsup/refuse Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sat Mar 16 08:16:11 2013 (r248369) +++ head/share/man/man4/Makefile Sat Mar 16 08:51:47 2013 (r248370) @@ -525,7 +525,6 @@ MAN= aac.4 \ vge.4 \ viapm.4 \ ${_viawd.4} \ - vinum.4 \ ${_virtio.4} \ ${_virtio_balloon.4} \ ${_virtio_blk.4} \ From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 08:55:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E2826B84; Sat, 16 Mar 2013 08:55:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A52557F2; Sat, 16 Mar 2013 08:55:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G8tLku085257; Sat, 16 Mar 2013 08:55:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G8tLvf085256; Sat, 16 Mar 2013 08:55:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303160855.r2G8tLvf085256@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 16 Mar 2013 08:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248371 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 08:55:22 -0000 Author: glebius Date: Sat Mar 16 08:55:21 2013 New Revision: 248371 URL: http://svnweb.freebsd.org/changeset/base/248371 Log: Contrary to what the deleted comment said, the m_move_pkthdr() will not smash the M_EXT and data pointer, so it is safe to pass an mbuf with external storage procuded by m_getcl() to m_move_pkthdr(). Reviewed by: andre Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sat Mar 16 08:51:47 2013 (r248370) +++ head/sys/kern/uipc_mbuf.c Sat Mar 16 08:55:21 2013 (r248371) @@ -1968,43 +1968,18 @@ m_unshare(struct mbuf *m0, int how) } /* - * Allocate new space to hold the copy... - */ - /* XXX why can M_PKTHDR be set past the first mbuf? */ - if (mprev == NULL && (m->m_flags & M_PKTHDR)) { - /* - * NB: if a packet header is present we must - * allocate the mbuf separately from any cluster - * because M_MOVE_PKTHDR will smash the data - * pointer and drop the M_EXT marker. - */ - MGETHDR(n, how, m->m_type); - if (n == NULL) { - m_freem(m0); - return (NULL); - } - M_MOVE_PKTHDR(n, m); - MCLGET(n, how); - if ((n->m_flags & M_EXT) == 0) { - m_free(n); - m_freem(m0); - return (NULL); - } - } else { - n = m_getcl(how, m->m_type, m->m_flags); - if (n == NULL) { - m_freem(m0); - return (NULL); - } - } - /* - * ... and copy the data. We deal with jumbo mbufs - * (i.e. m_len > MCLBYTES) by splitting them into - * clusters. We could just malloc a buffer and make - * it external but too many device drivers don't know - * how to break up the non-contiguous memory when + * Allocate new space to hold the copy and copy the data. + * We deal with jumbo mbufs (i.e. m_len > MCLBYTES) by + * splitting them into clusters. We could just malloc a + * buffer and make it external but too many device drivers + * don't know how to break up the non-contiguous memory when * doing DMA. */ + n = m_getcl(how, m->m_type, m->m_flags); + if (n == NULL) { + m_freem(m0); + return (NULL); + } len = m->m_len; off = 0; mfirst = n; From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 08:57:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B1418D05; Sat, 16 Mar 2013 08:57:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B2B27FE; Sat, 16 Mar 2013 08:57:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G8vaVI085580; Sat, 16 Mar 2013 08:57:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G8va2g085579; Sat, 16 Mar 2013 08:57:36 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303160857.r2G8va2g085579@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 16 Mar 2013 08:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248372 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 08:57:36 -0000 Author: glebius Date: Sat Mar 16 08:57:36 2013 New Revision: 248372 URL: http://svnweb.freebsd.org/changeset/base/248372 Log: - Replace compat macros with function calls. - Remove superfluous cleaning of m_len after allocating. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sat Mar 16 08:55:21 2013 (r248371) +++ head/sys/kern/uipc_mbuf.c Sat Mar 16 08:57:36 2013 (r248372) @@ -530,8 +530,8 @@ m_dup_pkthdr(struct mbuf *to, struct mbu #if 0 /* * The mbuf allocator only initializes the pkthdr - * when the mbuf is allocated with MGETHDR. Many users - * (e.g. m_copy*, m_prepend) use MGET and then + * when the mbuf is allocated with m_gethdr(). Many users + * (e.g. m_copy*, m_prepend) use m_get() and then * smash the pkthdr as needed causing these * assertions to trip. For now just disable them. */ @@ -563,15 +563,15 @@ m_prepend(struct mbuf *m, int len, int h struct mbuf *mn; if (m->m_flags & M_PKTHDR) - MGETHDR(mn, how, m->m_type); + mn = m_gethdr(how, m->m_type); else - MGET(mn, how, m->m_type); + mn = m_get(how, m->m_type); if (mn == NULL) { m_freem(m); return (NULL); } if (m->m_flags & M_PKTHDR) - M_MOVE_PKTHDR(mn, m); + m_move_pkthdr(mn, m); mn->m_next = m; m = mn; if(m->m_flags & M_PKTHDR) { @@ -621,9 +621,9 @@ m_copym(struct mbuf *m, int off0, int le break; } if (copyhdr) - MGETHDR(n, wait, m->m_type); + n = m_gethdr(wait, m->m_type); else - MGET(n, wait, m->m_type); + n = m_get(wait, m->m_type); *np = n; if (n == NULL) goto nospace; @@ -822,7 +822,7 @@ m_copypacket(struct mbuf *m, int how) struct mbuf *top, *n, *o; MBUF_CHECKSLEEP(how); - MGET(n, how, m->m_type); + n = m_get(how, m->m_type); top = n; if (n == NULL) goto nospace; @@ -840,7 +840,7 @@ m_copypacket(struct mbuf *m, int how) m = m->m_next; while (m) { - MGET(o, how, m->m_type); + o = m_get(how, m->m_type); if (o == NULL) goto nospace; @@ -1096,12 +1096,11 @@ m_pullup(struct mbuf *n, int len) } else { if (len > MHLEN) goto bad; - MGET(m, M_NOWAIT, n->m_type); + m = m_get(M_NOWAIT, n->m_type); if (m == NULL) goto bad; - m->m_len = 0; if (n->m_flags & M_PKTHDR) - M_MOVE_PKTHDR(m, n); + m_move_pkthdr(m, n); } space = &m->m_dat[MLEN] - (m->m_data + m->m_len); do { @@ -1144,12 +1143,11 @@ m_copyup(struct mbuf *n, int len, int ds if (len > (MHLEN - dstoff)) goto bad; - MGET(m, M_NOWAIT, n->m_type); + m = m_get(M_NOWAIT, n->m_type); if (m == NULL) goto bad; - m->m_len = 0; if (n->m_flags & M_PKTHDR) - M_MOVE_PKTHDR(m, n); + m_move_pkthdr(m, n); m->m_data += dstoff; space = &m->m_dat[MLEN] - (m->m_data + m->m_len); do { @@ -1200,7 +1198,7 @@ m_split(struct mbuf *m0, int len0, int w return (NULL); remain = m->m_len - len; if (m0->m_flags & M_PKTHDR) { - MGETHDR(n, wait, m0->m_type); + n = m_gethdr(wait, m0->m_type); if (n == NULL) return (NULL); n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; @@ -1226,7 +1224,7 @@ m_split(struct mbuf *m0, int len0, int w m->m_next = NULL; return (n); } else { - MGET(n, wait, m->m_type); + n = m_get(wait, m->m_type); if (n == NULL) return (NULL); M_ALIGN(n, remain); From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 08:58: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]) by hub.freebsd.org (Postfix) with ESMTP id 785E4E72; Sat, 16 Mar 2013 08:58:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5314C804; Sat, 16 Mar 2013 08:58:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2G8wTOG085743; Sat, 16 Mar 2013 08:58:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2G8wSBZ085736; Sat, 16 Mar 2013 08:58:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303160858.r2G8wSBZ085736@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 16 Mar 2013 08:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248373 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 08:58:29 -0000 Author: glebius Date: Sat Mar 16 08:58:28 2013 New Revision: 248373 URL: http://svnweb.freebsd.org/changeset/base/248373 Log: - Replace compat macros with function calls. Modified: head/sys/netinet/igmp.c head/sys/netinet/ip_options.c head/sys/netinet/tcp_output.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sat Mar 16 08:57:36 2013 (r248372) +++ head/sys/netinet/igmp.c Sat Mar 16 08:58:28 2013 (r248373) @@ -2203,7 +2203,7 @@ igmp_v1v2_queue_report(struct in_multi * ifp = inm->inm_ifp; - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return (ENOMEM); MH_ALIGN(m, sizeof(struct ip) + sizeof(struct igmp)); Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Sat Mar 16 08:57:36 2013 (r248372) +++ head/sys/netinet/ip_options.c Sat Mar 16 08:58:28 2013 (r248373) @@ -500,7 +500,7 @@ ip_insertoptions(struct mbuf *m, struct *phlen = 0; return (m); } - M_MOVE_PKTHDR(n, m); + m_move_pkthdr(n, m); n->m_pkthdr.rcvif = NULL; n->m_pkthdr.len += optlen; m->m_len -= sizeof(struct ip); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sat Mar 16 08:57:36 2013 (r248372) +++ head/sys/netinet/tcp_output.c Sat Mar 16 08:58:28 2013 (r248373) @@ -898,7 +898,7 @@ send: else TCPSTAT_INC(tcps_sndwinup); - MGETHDR(m, M_NOWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; goto out; From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 16:54: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]) by hub.freebsd.org (Postfix) with ESMTP id 6AA15DEA; Sat, 16 Mar 2013 16:54:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 4CAED81B; Sat, 16 Mar 2013 16:54:03 +0000 (UTC) Received: from [IPv6:2601:9:4d00:90:432:5031:8b00:e11] (unknown [IPv6:2601:9:4d00:90:432:5031:8b00:e11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 413C03981E; Sat, 16 Mar 2013 09:54:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf From: Rui Paulo In-Reply-To: <201303131108.27005.jhb@freebsd.org> Date: Sat, 16 Mar 2013 09:54:01 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6B59A612-B737-4E1F-AF56-0DA1D0733F0A@FreeBSD.org> References: <201303042118.r24LIj5e008913@svn.freebsd.org> <20130312210921.GB1390@garage.freebsd.pl> <201303131108.27005.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1503) Cc: svn-src-head@freebsd.org, "Kenneth D. Merry" , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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, 16 Mar 2013 16:54:03 -0000 On 2013/03/13, at 8:08, John Baldwin wrote: > On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote: >> On Mon, Mar 04, 2013 at 09:18:45PM +0000, Kenneth D. Merry wrote: >>> Author: ken >>> Date: Mon Mar 4 21:18:45 2013 >>> New Revision: 247814 >>> URL: http://svnweb.freebsd.org/changeset/base/247814 >>>=20 >>> Log: >>> Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL = disable >>> tunable by default. >>>=20 >>> This will allow GENERIC configurations to boot on small memory = boxes, but >>> not require end users who want to use CTL to recompile their = kernel. They >>> can simply set kern.cam.ctl.disable=3D0 in loader.conf. >>=20 >> Could you rename it to kern.cam.ctl.enable(d)? There was discussion = at >> some point about sysctl/tunable names and the consensus was, AFAIR, = to >> use positive(?) names as they are more obvious. >=20 > Except that all the hints we use for devices are hint.foo.X.disable=3D1 = :) I think this is not correct. The `disabled' hint comes from = resource_disabled(), which checks for "resource_int_value(name, unit, = "disabled", &value);" Regards, -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 17:57:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9C5346E3; Sat, 16 Mar 2013 17:57:01 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 76294CC7; Sat, 16 Mar 2013 17:57:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GHv1Ae049476; Sat, 16 Mar 2013 17:57:01 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GHv1AG049474; Sat, 16 Mar 2013 17:57:01 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303161757.r2GHv1AG049474@svn.freebsd.org> From: Joel Dahl Date: Sat, 16 Mar 2013 17:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248381 - head/sys/dev/sound/pcm 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.14 Precedence: list List-Id: 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, 16 Mar 2013 17:57:01 -0000 Author: joel (doc committer) Date: Sat Mar 16 17:57:00 2013 New Revision: 248381 URL: http://svnweb.freebsd.org/changeset/base/248381 Log: Hide version string under verbose. Approved by: mav Modified: head/sys/dev/sound/pcm/sndstat.c Modified: head/sys/dev/sound/pcm/sndstat.c ============================================================================== --- head/sys/dev/sound/pcm/sndstat.c Sat Mar 16 17:38:59 2013 (r248380) +++ head/sys/dev/sound/pcm/sndstat.c Sat Mar 16 17:57:00 2013 (r248381) @@ -345,8 +345,12 @@ sndstat_prepare(struct sbuf *s) struct snddev_info *d; int i, j; - sbuf_printf(s, "FreeBSD Audio Driver (newpcm: %ubit %d/%s)\n", - (u_int)sizeof(intpcm32_t) << 3, SND_DRV_VERSION, MACHINE_ARCH); + if (snd_verbose > 0) { + sbuf_printf(s, "FreeBSD Audio Driver (%ubit %d/%s)\n", + (u_int)sizeof(intpcm32_t) << 3, SND_DRV_VERSION, + MACHINE_ARCH); + } + if (SLIST_EMPTY(&sndstat_devlist)) { sbuf_printf(s, "No devices installed.\n"); sbuf_finish(s); From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 21:50:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9EDF0E57; Sat, 16 Mar 2013 21:50:07 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9098D388; Sat, 16 Mar 2013 21:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GLo6QM020443; Sat, 16 Mar 2013 21:50:06 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GLo6uQ020417; Sat, 16 Mar 2013 21:50:06 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303162150.r2GLo6uQ020417@svn.freebsd.org> From: Joel Dahl Date: Sat, 16 Mar 2013 21:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248384 - head/sbin/gvinum 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.14 Precedence: list List-Id: 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, 16 Mar 2013 21:50:07 -0000 Author: joel (doc committer) Date: Sat Mar 16 21:50:06 2013 New Revision: 248384 URL: http://svnweb.freebsd.org/changeset/base/248384 Log: Remove reference to vinum(4). The manual page was removed in r248370. Modified: head/sbin/gvinum/gvinum.8 Modified: head/sbin/gvinum/gvinum.8 ============================================================================== --- head/sbin/gvinum/gvinum.8 Sat Mar 16 21:02:42 2013 (r248383) +++ head/sbin/gvinum/gvinum.8 Sat Mar 16 21:50:06 2013 (r248384) @@ -422,9 +422,9 @@ This may leave data unprotected and is p Currently, .Nm does not yet fully implement all of the functions found in -.Xr vinum 4 . +.Nm vinum . Specifically, the following commands from -.Xr vinum 4 +.Nm vinum are not supported: .Bl -tag -width indent .It Ic debug From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:02:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A6A4B224; Sat, 16 Mar 2013 22:02:49 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7FABD3F1; Sat, 16 Mar 2013 22:02:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GM2mY1024302; Sat, 16 Mar 2013 22:02:48 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GM2lcR024290; Sat, 16 Mar 2013 22:02:47 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303162202.r2GM2lcR024290@svn.freebsd.org> From: Joel Dahl Date: Sat, 16 Mar 2013 22:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248385 - in head: sbin/ccdconfig sbin/ffsinfo sbin/geom/class/concat sbin/geom/class/mirror sbin/geom/class/raid sbin/geom/class/stripe 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:02:49 -0000 Author: joel (doc committer) Date: Sat Mar 16 22:02:47 2013 New Revision: 248385 URL: http://svnweb.freebsd.org/changeset/base/248385 Log: Cross-reference gvinum(8) instead of vinum(8). Modified: head/sbin/ccdconfig/ccdconfig.8 head/sbin/ffsinfo/ffsinfo.8 head/sbin/geom/class/concat/gconcat.8 head/sbin/geom/class/mirror/gmirror.8 head/sbin/geom/class/raid/graid.8 head/sbin/geom/class/stripe/gstripe.8 head/share/man/man4/ccd.4 Modified: head/sbin/ccdconfig/ccdconfig.8 ============================================================================== --- head/sbin/ccdconfig/ccdconfig.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/ccdconfig/ccdconfig.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -234,14 +234,14 @@ RAID controllers (see GENERIC), or software RAID systems such as .Xr geom 8 and -.Xr vinum 8 . +.Xr gvinum 8 . .Sh SEE ALSO .Xr dd 1 , .Xr ccd 4 , .Xr disklabel 8 , .Xr fdisk 8 , -.Xr rc 8 , -.Xr vinum 8 +.Xr gvinum 8 , +.Xr rc 8 .Sh HISTORY The .Nm Modified: head/sbin/ffsinfo/ffsinfo.8 ============================================================================== --- head/sbin/ffsinfo/ffsinfo.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/ffsinfo/ffsinfo.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -125,9 +125,9 @@ with all available information. .Xr dumpfs 8 , .Xr fsck 8 , .Xr growfs 8 , +.Xr gvinum 8 , .Xr newfs 8 , -.Xr tunefs 8 , -.Xr vinum 8 +.Xr tunefs 8 .Sh HISTORY The .Nm Modified: head/sbin/geom/class/concat/gconcat.8 ============================================================================== --- head/sbin/geom/class/concat/gconcat.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/geom/class/concat/gconcat.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -183,11 +183,11 @@ growfs /dev/concat/data .Xr loader.conf 5 , .Xr geom 8 , .Xr growfs 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr sysctl 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: head/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- head/sbin/geom/class/mirror/gmirror.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/geom/class/mirror/gmirror.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -340,11 +340,11 @@ there. .Xr geom 4 , .Xr dumpon 8 , .Xr geom 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr savecore 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/geom/class/raid/graid.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -314,7 +314,7 @@ Exit status is 0 on success, and non-zer .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , -.Xr vinum 8 +.Xr gvinum 8 .Sh HISTORY The .Nm Modified: head/sbin/geom/class/stripe/gstripe.8 ============================================================================== --- head/sbin/geom/class/stripe/gstripe.8 Sat Mar 16 21:50:06 2013 (r248384) +++ head/sbin/geom/class/stripe/gstripe.8 Sat Mar 16 22:02:47 2013 (r248385) @@ -232,11 +232,11 @@ for .Xr atacontrol 8 , .Xr ccdconfig 8 , .Xr geom 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr sysctl 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: head/share/man/man4/ccd.4 ============================================================================== --- head/share/man/man4/ccd.4 Sat Mar 16 21:50:06 2013 (r248384) +++ head/share/man/man4/ccd.4 Sat Mar 16 22:02:47 2013 (r248385) @@ -279,9 +279,9 @@ device special files .Xr config 8 , .Xr disklabel 8 , .Xr fsck 8 , +.Xr gvinum 8 , .Xr mount 8 , -.Xr newfs 8 , -.Xr vinum 8 +.Xr newfs 8 .Sh HISTORY The concatenated disk driver was originally written at the University of Utah. From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:36: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]) by hub.freebsd.org (Postfix) with ESMTP id 0B391988; Sat, 16 Mar 2013 22:36:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F109B6BF; Sat, 16 Mar 2013 22:36:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMaOuq034003; Sat, 16 Mar 2013 22:36:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMaOLM034002; Sat, 16 Mar 2013 22:36:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162236.r2GMaOLM034002@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 22:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248386 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:36:25 -0000 Author: pjd Date: Sat Mar 16 22:36:24 2013 New Revision: 248386 URL: http://svnweb.freebsd.org/changeset/base/248386 Log: Style: Remove redundant space. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Mar 16 22:02:47 2013 (r248385) +++ head/sys/kern/vfs_syscalls.c Sat Mar 16 22:36:24 2013 (r248386) @@ -2854,7 +2854,7 @@ kern_fchmodat(struct thread *td, int fd, AUDIT_ARG_MODE(mode); follow = (flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; - NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, + NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, pathseg, path, fd, CAP_FCHMOD, td); if ((error = namei(&nd)) != 0) return (error); From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:37:31 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]) by hub.freebsd.org (Postfix) with ESMTP id 60A56AF9; Sat, 16 Mar 2013 22:37:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 523C76C9; Sat, 16 Mar 2013 22:37:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMbVex034188; Sat, 16 Mar 2013 22:37:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMbVdp034187; Sat, 16 Mar 2013 22:37:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162237.r2GMbVdp034187@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 22:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248387 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:37:31 -0000 Author: pjd Date: Sat Mar 16 22:37:30 2013 New Revision: 248387 URL: http://svnweb.freebsd.org/changeset/base/248387 Log: Style: Whitespace fixes. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Mar 16 22:36:24 2013 (r248386) +++ head/sys/kern/vfs_syscalls.c Sat Mar 16 22:37:30 2013 (r248387) @@ -445,7 +445,7 @@ sys_getfsstat(td, uap) /* * If (bufsize > 0 && bufseg == UIO_SYSSPACE) - * The caller is responsible for freeing memory which will be allocated + * The caller is responsible for freeing memory which will be allocated * in '*buf'. */ int @@ -2843,7 +2843,6 @@ sys_lchmod(td, uap) uap->mode, AT_SYMLINK_NOFOLLOW)); } - int kern_fchmodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, mode_t mode, int flag) @@ -4679,7 +4678,7 @@ kern_posix_fadvise(struct thread *td, in new = fa; fp->f_advice = NULL; } else if (offset <= fa->fa_start && - end >= fa->fa_start) + end >= fa->fa_start) fa->fa_start = end + 1; else if (offset <= fa->fa_end && end >= fa->fa_end) fa->fa_end = offset - 1; From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:37:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 914D3C64; Sat, 16 Mar 2013 22:37:57 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6B03B6D0; Sat, 16 Mar 2013 22:37:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMbvts034273; Sat, 16 Mar 2013 22:37:57 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMbvDj034272; Sat, 16 Mar 2013 22:37:57 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201303162237.r2GMbvDj034272@svn.freebsd.org> From: Sergey Kandaurov Date: Sat, 16 Mar 2013 22:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248388 - head/usr.bin/script 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:37:57 -0000 Author: pluknet Date: Sat Mar 16 22:37:56 2013 New Revision: 248388 URL: http://svnweb.freebsd.org/changeset/base/248388 Log: Fix version in the .Fx macro. Reported by: Modified: head/usr.bin/script/script.1 Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Sat Mar 16 22:37:30 2013 (r248387) +++ head/usr.bin/script/script.1 Sat Mar 16 22:37:56 2013 (r248388) @@ -178,7 +178,7 @@ and options first appeared in .Nx 2.0 and were ported to -.Fx 10 . +.Fx 10.0 . .Sh BUGS The .Nm From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:40: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]) by hub.freebsd.org (Postfix) with ESMTP id 9606FEF5; Sat, 16 Mar 2013 22:40:21 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6D86E6; Sat, 16 Mar 2013 22:40:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMeLke035697; Sat, 16 Mar 2013 22:40:21 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMeKPU035103; Sat, 16 Mar 2013 22:40:20 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201303162240.r2GMeKPU035103@svn.freebsd.org> From: Neel Natu Date: Sat, 16 Mar 2013 22:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248389 - in head/sys/amd64/vmm: . intel 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:40:21 -0000 Author: neel Date: Sat Mar 16 22:40:20 2013 New Revision: 248389 URL: http://svnweb.freebsd.org/changeset/base/248389 Log: Allow vmm stats to be specific to the underlying hardware assist technology. This can be done by using the new macros VMM_STAT_INTEL() and VMM_STAT_AMD(). Statistic counters that are common across the two are defined using VMM_STAT(). Suggested by: Anish Gupta Discussed with: grehan Obtained from: NetApp Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_stat.h Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Mar 16 22:37:56 2013 (r248388) +++ head/sys/amd64/vmm/intel/vmx.c Sat Mar 16 22:40:20 2013 (r248389) @@ -153,10 +153,7 @@ static int cap_unrestricted_guest; static int cap_monitor_trap; /* statistics */ -static VMM_STAT_DEFINE(VCPU_MIGRATIONS, "vcpu migration across host cpus"); -static VMM_STAT_DEFINE(VMEXIT_EXTINT, "vm exits due to external interrupt"); -static VMM_STAT_DEFINE(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); -static VMM_STAT_DEFINE(VMEXIT_HLT, "number of times hlt was intercepted"); +static VMM_STAT_INTEL(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); #ifdef KTR static const char * @@ -1216,6 +1213,8 @@ vmx_exit_process(struct vmx *vmx, int vc qual = vmexit->u.vmx.exit_qualification; vmexit->exitcode = VM_EXITCODE_BOGUS; + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_COUNT, 1); + switch (vmexit->u.vmx.exit_reason) { case EXIT_REASON_CR_ACCESS: handled = vmx_emulate_cr_access(vmx, vcpu, qual); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Mar 16 22:37:56 2013 (r248388) +++ head/sys/amd64/vmm/vmm.c Sat Mar 16 22:40:20 2013 (r248389) @@ -139,7 +139,7 @@ static MALLOC_DEFINE(M_VM, "vm", "vm"); CTASSERT(VMM_MSR_NUM <= 64); /* msr_mask can keep track of up to 64 msrs */ /* statistics */ -static VMM_STAT_DEFINE(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); +static VMM_STAT(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); static void vcpu_cleanup(struct vcpu *vcpu) @@ -612,7 +612,7 @@ save_guest_fpustate(struct vcpu *vcpu) fpu_start_emulating(); } -static VMM_STAT_DEFINE(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); +static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); int vm_run(struct vm *vm, struct vm_run *vmrun) @@ -717,7 +717,7 @@ vm_inject_event(struct vm *vm, int vcpui return (VMINJECT(vm->cookie, vcpuid, type, vector, code, code_valid)); } -static VMM_STAT_DEFINE(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); +static VMM_STAT(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); int vm_inject_nmi(struct vm *vm, int vcpuid) Modified: head/sys/amd64/vmm/vmm_stat.c ============================================================================== --- head/sys/amd64/vmm/vmm_stat.c Sat Mar 16 22:37:56 2013 (r248388) +++ head/sys/amd64/vmm/vmm_stat.c Sat Mar 16 22:40:20 2013 (r248389) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "vmm_util.h" #include "vmm_stat.h" static int vstnum; @@ -52,6 +53,12 @@ vmm_stat_init(void *arg) if (vst->desc == NULL) return; + if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) + return; + + if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) + return; + if (vstnum >= MAX_VMM_STAT_TYPES) { printf("Cannot accomodate vmm stat type \"%s\"!\n", vst->desc); return; @@ -102,3 +109,9 @@ vmm_stat_desc(int index) else return (NULL); } + +/* global statistics */ +VMM_STAT(VCPU_MIGRATIONS, "vcpu migration across host cpus"); +VMM_STAT(VMEXIT_COUNT, "total number of vm exits"); +VMM_STAT(VMEXIT_EXTINT, "vm exits due to external interrupt"); +VMM_STAT(VMEXIT_HLT, "number of times hlt was intercepted"); Modified: head/sys/amd64/vmm/vmm_stat.h ============================================================================== --- head/sys/amd64/vmm/vmm_stat.h Sat Mar 16 22:37:56 2013 (r248388) +++ head/sys/amd64/vmm/vmm_stat.h Sat Mar 16 22:40:20 2013 (r248389) @@ -36,19 +36,36 @@ struct vm; #define MAX_VMM_STAT_TYPES 64 /* arbitrary */ +enum vmm_stat_scope { + VMM_STAT_SCOPE_ANY, + VMM_STAT_SCOPE_INTEL, /* Intel VMX specific statistic */ + VMM_STAT_SCOPE_AMD, /* AMD SVM specific statistic */ +}; + struct vmm_stat_type { - const char *desc; /* description of statistic */ int index; /* position in the stats buffer */ + const char *desc; /* description of statistic */ + enum vmm_stat_scope scope; }; void vmm_stat_init(void *arg); -#define VMM_STAT_DEFINE(type, desc) \ +#define VMM_STAT_DEFINE(type, desc, scope) \ struct vmm_stat_type type[1] = { \ - { desc, -1 } \ + { -1, desc, scope } \ }; \ SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_init, type) +#define VMM_STAT_DECLARE(type) \ + extern struct vmm_stat_type type[1] + +#define VMM_STAT(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_ANY) +#define VMM_STAT_INTEL(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_INTEL) +#define VMM_STAT_AMD(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_AMD) + void *vmm_stat_alloc(void); void vmm_stat_free(void *vp); @@ -68,4 +85,8 @@ vmm_stat_incr(struct vm *vm, int vcpu, s #endif } +VMM_STAT_DECLARE(VCPU_MIGRATIONS); +VMM_STAT_DECLARE(VMEXIT_COUNT); +VMM_STAT_DECLARE(VMEXIT_EXTINT); +VMM_STAT_DECLARE(VMEXIT_HLT); #endif From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:44:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 241D130F; Sat, 16 Mar 2013 22:44:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F0B9A713; Sat, 16 Mar 2013 22:44:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMiEXP036854; Sat, 16 Mar 2013 22:44:14 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMiEbw036853; Sat, 16 Mar 2013 22:44:14 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162244.r2GMiEbw036853@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 22:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248391 - head/lib/libc/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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:44:15 -0000 Author: pjd Date: Sat Mar 16 22:44:14 2013 New Revision: 248391 URL: http://svnweb.freebsd.org/changeset/base/248391 Log: Add a note to the HISTORY section about lchflags(2) being introduced in FreeBSD 5.0. Modified: head/lib/libc/sys/chflags.2 Modified: head/lib/libc/sys/chflags.2 ============================================================================== --- head/lib/libc/sys/chflags.2 Sat Mar 16 22:43:08 2013 (r248390) +++ head/lib/libc/sys/chflags.2 Sat Mar 16 22:44:14 2013 (r248391) @@ -232,3 +232,7 @@ and .Fn fchflags system calls first appeared in .Bx 4.4 . +The +.Fn lchflags +system call first appeared in +.Fx 5.0 . From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:53: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]) by hub.freebsd.org (Postfix) with ESMTP id CFD5C5EE; Sat, 16 Mar 2013 22:53:06 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AC7C4758; Sat, 16 Mar 2013 22:53:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMr5IU039600; Sat, 16 Mar 2013 22:53:05 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMr5O0039599; Sat, 16 Mar 2013 22:53:05 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201303162253.r2GMr5O0039599@svn.freebsd.org> From: Neel Natu Date: Sat, 16 Mar 2013 22:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248392 - head/sys/amd64/vmm 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:53:06 -0000 Author: neel Date: Sat Mar 16 22:53:05 2013 New Revision: 248392 URL: http://svnweb.freebsd.org/changeset/base/248392 Log: Fix the '-Wtautological-compare' warning emitted by clang for comparing the unsigned enum type with a negative value. Obtained from: NetApp Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sat Mar 16 22:44:14 2013 (r248391) +++ head/sys/amd64/vmm/vmm.c Sat Mar 16 22:53:05 2013 (r248392) @@ -937,7 +937,7 @@ vm_set_x2apic_state(struct vm *vm, int v if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (state < 0 || state >= X2APIC_STATE_LAST) + if (state >= X2APIC_STATE_LAST) return (EINVAL); vm->vcpu[vcpuid].x2apic_state = state; From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 22:53: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]) by hub.freebsd.org (Postfix) with ESMTP id AB2D6757; Sat, 16 Mar 2013 22:53:39 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DD9875D; Sat, 16 Mar 2013 22:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GMrdtl039703; Sat, 16 Mar 2013 22:53:39 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GMrdNi039700; Sat, 16 Mar 2013 22:53:39 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201303162253.r2GMrdNi039700@svn.freebsd.org> From: Joel Dahl Date: Sat, 16 Mar 2013 22:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248393 - in head/usr.bin: head tail 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.14 Precedence: list List-Id: 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, 16 Mar 2013 22:53:39 -0000 Author: joel (doc committer) Date: Sat Mar 16 22:53:38 2013 New Revision: 248393 URL: http://svnweb.freebsd.org/changeset/base/248393 Log: Add a couple of examples. Obtained from: OpenBSD Modified: head/usr.bin/head/head.1 head/usr.bin/tail/tail.1 Modified: head/usr.bin/head/head.1 ============================================================================== --- head/usr.bin/head/head.1 Sat Mar 16 22:53:05 2013 (r248392) +++ head/usr.bin/head/head.1 Sat Mar 16 22:53:38 2013 (r248393) @@ -28,7 +28,7 @@ .\" @(#)head.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd March 16, 2013 .Dt HEAD 1 .Os .Sh NAME @@ -57,6 +57,19 @@ where is the name of the file. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +To display the first 500 lines of the file +.Ar foo : +.Pp +.Dl $ head -n 500 foo +.Pp +.Nm +can be used in conjunction with +.Xr tail 1 +in the following way to, for example, display only line 500 from the file +.Ar foo : +.Pp +.Dl $ head -n 500 foo | tail -n 1 .Sh SEE ALSO .Xr tail 1 .Sh HISTORY Modified: head/usr.bin/tail/tail.1 ============================================================================== --- head/usr.bin/tail/tail.1 Sat Mar 16 22:53:05 2013 (r248392) +++ head/usr.bin/tail/tail.1 Sat Mar 16 22:53:38 2013 (r248393) @@ -31,7 +31,7 @@ .\" @(#)tail.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 5, 2009 +.Dd March 16, 2013 .Dt TAIL 1 .Os .Sh NAME @@ -147,6 +147,17 @@ is the name of the file unless flag is specified. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +To display the last 500 lines of the file +.Ar foo : +.Pp +.Dl $ tail -n 500 foo +.Pp +Keep +.Pa /var/log/messages +open, displaying to the standard output anything appended to the file: +.Pp +.Dl $ tail -f /var/log/messages .Sh SEE ALSO .Xr cat 1 , .Xr head 1 , From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 23:10: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]) by hub.freebsd.org (Postfix) with ESMTP id BCF4FC94; Sat, 16 Mar 2013 23:10:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95C857F5; Sat, 16 Mar 2013 23:10:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GNAfTW045633; Sat, 16 Mar 2013 23:10:41 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GNAf2i045632; Sat, 16 Mar 2013 23:10:41 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162310.r2GNAf2i045632@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 23:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248394 - head/tools/regression/security/cap_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.14 Precedence: list List-Id: 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, 16 Mar 2013 23:10:41 -0000 Author: pjd Date: Sat Mar 16 23:10:40 2013 New Revision: 248394 URL: http://svnweb.freebsd.org/changeset/base/248394 Log: The mode argument for open(2)/openat(2) only makes sense if the O_CREAT flag was given. Sponsored by: The FreeBSD Foundation Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- head/tools/regression/security/cap_test/cap_test_capabilities.c Sat Mar 16 22:53:38 2013 (r248393) +++ head/tools/regression/security/cap_test/cap_test_capabilities.c Sat Mar 16 23:10:40 2013 (r248394) @@ -207,27 +207,27 @@ try_file_ops(int filefd, int dirfd, cap_ ret = openat(dirfd, "cap_fsync", O_CREAT, 0600); CHECK(ret >= 0); CHECK(close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDONLY, 0600); + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDONLY); CHECK_RESULT(openat(O_FSYNC | O_RDONLY), CAP_FSYNC | CAP_READ | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY, 0600); + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY); CHECK_RESULT(openat(O_FSYNC | O_WRONLY), CAP_FSYNC | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR, 0600); + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR); CHECK_RESULT(openat(O_FSYNC | O_RDWR), CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDONLY, 0600); + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDONLY); CHECK_RESULT(openat(O_SYNC | O_RDONLY), CAP_FSYNC | CAP_READ | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY, 0600); + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY); CHECK_RESULT(openat(O_SYNC | O_WRONLY), CAP_FSYNC | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR, 0600); + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR); CHECK_RESULT(openat(O_SYNC | O_RDWR), CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 23:11:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D772E6C; Sat, 16 Mar 2013 23:11:56 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 06D1A805; Sat, 16 Mar 2013 23:11:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GNBt7h045946; Sat, 16 Mar 2013 23:11:55 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GNBtf0045941; Sat, 16 Mar 2013 23:11:55 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303162311.r2GNBtf0045941@svn.freebsd.org> From: Andrew Turner Date: Sat, 16 Mar 2013 23:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248395 - in head/sys: conf libkern/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.14 Precedence: list List-Id: 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, 16 Mar 2013 23:11:56 -0000 Author: andrew Date: Sat Mar 16 23:11:55 2013 New Revision: 248395 URL: http://svnweb.freebsd.org/changeset/base/248395 Log: Add __aeabi_memset to libkern, implemented using memset, as clang may generate calls to it. Added: head/sys/libkern/arm/memset.S (contents, props changed) Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Mar 16 23:10:40 2013 (r248394) +++ head/sys/conf/files.arm Sat Mar 16 23:11:55 2013 (r248395) @@ -78,6 +78,7 @@ libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard libkern/arm/ldivmod_helper.c standard libkern/arm/memcpy.S standard +libkern/arm/memset.S standard libkern/arm/muldi3.c standard libkern/ashldi3.c standard libkern/ashrdi3.c standard Added: head/sys/libkern/arm/memset.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/arm/memset.S Sat Mar 16 23:11:55 2013 (r248395) @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2013 Andrew Turner + * 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$"); + +#ifdef __ARM_EABI__ + +/* + * This implements + * void __aeabi_memset(void *dest, size_t len, int c) + * by calling: + * void *memset(dest, c, len) + * + * The arguments are in r0-r2, r3 can be used as a scratch register. + */ +ENTRY_NP(__aeabi_memset) + mov r3, r2 + mov r2, r1 + mov r1, r3 + b memset +END(__aeabi_memset) + +#endif + From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 23:13: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]) by hub.freebsd.org (Postfix) with ESMTP id CDE83FF6; Sat, 16 Mar 2013 23:13:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B1A9981A; Sat, 16 Mar 2013 23:13:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GNDnVt046305; Sat, 16 Mar 2013 23:13:49 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GNDnbD046304; Sat, 16 Mar 2013 23:13:49 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162313.r2GNDnbD046304@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 23:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248396 - head/tools/regression/security/cap_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.14 Precedence: list List-Id: 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, 16 Mar 2013 23:13:49 -0000 Author: pjd Date: Sat Mar 16 23:13:49 2013 New Revision: 248396 URL: http://svnweb.freebsd.org/changeset/base/248396 Log: Update the tests now that absence of the O_APPEND flag requires CAP_SEEK capability. Add some more tests. Sponsored by: The FreeBSD Foundation Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- head/tools/regression/security/cap_test/cap_test_capabilities.c Sat Mar 16 23:11:55 2013 (r248395) +++ head/tools/regression/security/cap_test/cap_test_capabilities.c Sat Mar 16 23:13:49 2013 (r248396) @@ -184,19 +184,19 @@ try_file_ops(int filefd, int dirfd, cap_ MAP_SHARED, fd_cap, 0); CHECK_MMAP_RESULT(CAP_MMAP_RWX); - /* TODO: openat(O_APPEND) */ ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDONLY, 0600); CHECK_RESULT(openat(O_CREATE | O_RDONLY), CAP_CREATE | CAP_READ | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0); - ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY, 0600); - CHECK_RESULT(openat(O_CREATE | O_WRONLY), + ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY | O_APPEND, + 0600); + CHECK_RESULT(openat(O_CREATE | O_WRONLY | O_APPEND), CAP_CREATE | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0); - ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600); - CHECK_RESULT(openat(O_CREATE | O_RDWR), + ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600); + CHECK_RESULT(openat(O_CREATE | O_RDWR | O_APPEND), CAP_CREATE | CAP_READ | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0); @@ -211,24 +211,24 @@ try_file_ops(int filefd, int dirfd, cap_ CHECK_RESULT(openat(O_FSYNC | O_RDONLY), CAP_FSYNC | CAP_READ | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY); - CHECK_RESULT(openat(O_FSYNC | O_WRONLY), + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY | O_APPEND); + CHECK_RESULT(openat(O_FSYNC | O_WRONLY | O_APPEND), CAP_FSYNC | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR); - CHECK_RESULT(openat(O_FSYNC | O_RDWR), + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR | O_APPEND); + CHECK_RESULT(openat(O_FSYNC | O_RDWR | O_APPEND), CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDONLY); CHECK_RESULT(openat(O_SYNC | O_RDONLY), CAP_FSYNC | CAP_READ | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY); - CHECK_RESULT(openat(O_SYNC | O_WRONLY), + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY | O_APPEND); + CHECK_RESULT(openat(O_SYNC | O_WRONLY | O_APPEND), CAP_FSYNC | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); - ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR); - CHECK_RESULT(openat(O_SYNC | O_RDWR), + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR | O_APPEND); + CHECK_RESULT(openat(O_SYNC | O_RDWR | O_APPEND), CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_LOOKUP, ret >= 0); CHECK(ret == -1 || close(ret) == 0); CHECK(unlinkat(dirfd, "cap_fsync", 0) == 0); @@ -253,6 +253,39 @@ try_file_ops(int filefd, int dirfd, cap_ CHECK(ret == -1 || close(ret) == 0); CHECK(unlinkat(dirfd, "cap_ftruncate", 0) == 0); + ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY, 0600); + CHECK_RESULT(openat(O_CREATE | O_WRONLY), + CAP_CREATE | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0); + ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600); + CHECK_RESULT(openat(O_CREATE | O_RDWR), + CAP_CREATE | CAP_READ | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, + ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + CHECK(ret == -1 || unlinkat(dirfd, "cap_create", 0) == 0); + + ret = openat(dirfd, "cap_fsync", O_CREAT, 0600); + CHECK(ret >= 0); + CHECK(close(ret) == 0); + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY); + CHECK_RESULT(openat(O_FSYNC | O_WRONLY), + CAP_FSYNC | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR); + CHECK_RESULT(openat(O_FSYNC | O_RDWR), + CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY); + CHECK_RESULT(openat(O_SYNC | O_WRONLY), + CAP_FSYNC | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR); + CHECK_RESULT(openat(O_SYNC | O_RDWR), + CAP_FSYNC | CAP_READ | CAP_WRITE | CAP_SEEK | CAP_LOOKUP, ret >= 0); + CHECK(ret == -1 || close(ret) == 0); + CHECK(unlinkat(dirfd, "cap_fsync", 0) == 0); + /* * Note: this is not expected to work over NFS. */ From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 23:19:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0F5374DD; Sat, 16 Mar 2013 23:19:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 02431864; Sat, 16 Mar 2013 23:19:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2GNJDmb047068; Sat, 16 Mar 2013 23:19:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2GNJDFL047067; Sat, 16 Mar 2013 23:19:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201303162319.r2GNJDFL047067@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 16 Mar 2013 23:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248397 - 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.14 Precedence: list List-Id: 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, 16 Mar 2013 23:19:14 -0000 Author: pjd Date: Sat Mar 16 23:19:13 2013 New Revision: 248397 URL: http://svnweb.freebsd.org/changeset/base/248397 Log: Require CAP_SEEK if both O_APPEND and O_TRUNC flags are absent. In other words we don't require CAP_SEEK if either O_APPEND or O_TRUNC flag is given, because O_APPEND doesn't allow to overwrite existing data and O_TRUNC requires CAP_FTRUNCATE already. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Mar 16 23:13:49 2013 (r248396) +++ head/sys/kern/vfs_syscalls.c Sat Mar 16 23:19:13 2013 (r248397) @@ -971,7 +971,7 @@ flags_to_rights(int flags) /* FALLTHROUGH */ case O_WRONLY: rights |= CAP_WRITE; - if (!(flags & O_APPEND)) + if (!(flags & (O_APPEND | O_TRUNC))) rights |= CAP_SEEK; break; } From owner-svn-src-head@FreeBSD.ORG Sat Mar 16 23:29: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]) by hub.freebsd.org (Postfix) with ESMTP id 271957FE for ; Sat, 16 Mar 2013 23:29:20 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id B40F38A7 for ; Sat, 16 Mar 2013 23:29:19 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id es5so4146441wgb.29 for ; Sat, 16 Mar 2013 16:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=x+A/esHxCTaQyYJFN1lBxJSKugA34G7hrdcb1Fu87kQ=; b=pd5bukqT9vqPElSntk7SBkpPorH35JfnANtUWtkyNQUQcBaM/OPD6hfcQbGfOdzKr3 vQmIdeRfAhZEkQ+UCSKknv84ntWi5Q7JsPXKqeuc9CxC96vgMEigv4f38LE72+ZqO5if R5eSFpvOqFzFgrBIorHStbiMUjMWdXiD+Fx3U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=x+A/esHxCTaQyYJFN1lBxJSKugA34G7hrdcb1Fu87kQ=; b=VJcRQml4UqbF1ySXDjeO6b+/+FmBSlRSPzQxVLWRKokZLXDIo9lqnPJy4zJV1TjuER fgO/RB5j1uONFakDaLLMzjEXj+hQPRGQLGIBpFoNt4co0Ly8gty5AIwHnbZxPJGLCLB7 53conV/cmd6eGkVCPKR7spLsLtxv7GP4mq1n38RGtVR7qeCQMkmd/CMK+WSYtzUzwiPK K8h4bOQvgO8rUyykY0Shkotl0aPRpI27n3w9sAajGeen/jIZZj9vfu5x00gUMC+iG9oh RZX/mMegbuRYIvjzTSSpadFaAwEvXJnlrTZeeuhFNCnemqYrsi23Pploh6hihaMIbSt7 x8hg== X-Received: by 10.194.63.240 with SMTP id j16mr17743360wjs.45.1363476558593; Sat, 16 Mar 2013 16:29:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.108.106 with HTTP; Sat, 16 Mar 2013 16:28:48 -0700 (PDT) In-Reply-To: <201303162150.r2GLo6uQ020417@svn.freebsd.org> References: <201303162150.r2GLo6uQ020417@svn.freebsd.org> From: Eitan Adler Date: Sat, 16 Mar 2013 19:28:48 -0400 Message-ID: Subject: Re: svn commit: r248384 - head/sbin/gvinum To: Joel Dahl Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQms885JbKOTMoolOFouTwOA+0mVEw1cIcs0533+OFLWQckfmJLiiYg1LIVG2VxH905d1hao 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.14 Precedence: list List-Id: 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, 16 Mar 2013 23:29:20 -0000 On 16 March 2013 17:50, Joel Dahl wrote: > Author: joel (doc committer) > Date: Sat Mar 16 21:50:06 2013 > New Revision: 248384 > URL: http://svnweb.freebsd.org/changeset/base/248384 > > Log: > Remove reference to vinum(4). The manual page was removed in r248370. The handbook still makes some references to this manual page: ./handbook/disks/chapter.xml: storage. &man.vinum.4; implements the RAID-0, RAID-1 and ./handbook/disks/chapter.xml: information about &man.vinum.4;. ./handbook/disks/chapter.xml: Also, since &man.vinum.4; does not use the Perhaps this document needs further work or is this entirely a mechanical change? -- Eitan Adler